-
Notifications
You must be signed in to change notification settings - Fork 7.9k
usb: device_next: prevent ECHO on Linux Kernel based host #82815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
usb: device_next: prevent ECHO on Linux Kernel based host #82815
Conversation
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]>
There was a problem hiding this 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.
That works very well, and not just once. And if there is no line coding request then it is not a Linux host.
Yes, that it how it is implemented. |
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. |
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. |
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. |
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. |
|
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