Skip to content

Conversation

jfischer-no
Copy link
Contributor

@jfischer-no jfischer-no commented Dec 10, 2024

This is similar to the approach implemented for the legacy CDC ACM class
commit 0127d00
("usb: device: cdc_acm: Use ZLP to detect initial host read")
but it uses Set Line Coding request to detect client activity on the
host side.

Cherry-picked from #80985

Fix "warning: 'cdc_acm_send_notification' defined but not used"
when Kconfig option UART_USE_RUNTIME_CONFIGURE is not used and
properly handle enqueue error.

Signed-off-by: Johann Fischer <[email protected]>
This is similar to the approach implemented for the legacy CDC ACM class
commit 0127d00
("usb: device: cdc_acm: Use ZLP to detect initial host read")
but it uses Set Line Coding request to detect client activity on the
host side.

Suggested-by: Tomasz Moń <[email protected]>
Signed-off-by: Johann Fischer <[email protected]>
@jfischer-no jfischer-no added area: USB Universal Serial Bus Experimental Experimental features not enabled by default labels Dec 10, 2024
Copy link
Contributor

@tmon-nordic tmon-nordic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't really work. Set line coding is in no way required. Please just replicate the ZLP handling as this is the only approach that is guaranteed to work.

Note that some applications may actually want to have the echo. The ZLP is transparent to any application using the tty layer and allows the best possible indication to class implementation that host actually started to read the data on IN endpoint.

@jfischer-no
Copy link
Contributor Author

This won't really work. Set line coding is in no way required.

That works very well, and not just once. And if there is no line coding request then it is not a Linux host.

Please just replicate the ZLP handling as this is the only approach that is guaranteed to work.

Yes, that it how it is implemented.

@tmon-nordic
Copy link
Contributor

That works very well, and not just once. And if there is no line coding request then it is not a Linux host.

The original implementation is completely independent of any control transfers. Your spin-off is depending on Set Line Coding. This is essentially different. Please remove the Set Line Coding dependency.

Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Apr 13, 2025
@github-actions github-actions bot closed this Apr 28, 2025
@jfischer-no jfischer-no reopened this Apr 28, 2025
@jfischer-no jfischer-no removed the Stale label Apr 28, 2025
Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Jun 28, 2025
@github-actions github-actions bot closed this Jul 12, 2025
@jfischer-no jfischer-no reopened this Jul 18, 2025
@jfischer-no jfischer-no removed the Stale label Jul 18, 2025
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: USB Universal Serial Bus Experimental Experimental features not enabled by default
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants