-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
usb: cdc: Do not duplicate USB transfer slots for OUT transfers #27025
usb: cdc: Do not duplicate USB transfer slots for OUT transfers #27025
Conversation
I can drop e77a1b8 if needed. |
@stephanosio Could You please have a look as well? |
#26970 explains why I can't combine the CDC ACM composite sample with a USB console and get anything useful. The fix here seems to solve that. |
e77a1b8
to
2c72565
Compare
2c72565
to
7faef15
Compare
@stephanosio @jfischer-phytec-iot Could You please have a look? This PR is fixing an issue. |
9b8e41c
to
eacf3c0
Compare
eacf3c0
to
c2a8af8
Compare
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.
Fixes hid-cdc
now, fixed the problem I had three weeks ago then.
@emob-nordic #26725 seems already closed. Is this PR description accurate? |
This commit fixes an issue when more than one USB transfer is reserved for same OUT endpoint. There are 2 scenarios when this could happen: - The Host sends SET_CONFIGURATION(1) request twice. - The Host triggers Suspend->Resume->Configured event sequence for the device. USB tranfers are not canceled on SUSPEND event when the device was not configred previously. Because of that USB transfer slot is reserved twice for the same OUT endpoint and lead to shortage of USB transfer slots quickly. Without this patch CDC ACM class reserves duplicated USB transfer slots for one transfer. The sequence of Suspend->Resume events is genereted alongside with Configured and the stack will shortly run out of transfer slots. If the Host, for some reason, decides to send SET_CONFIGURATION request twice the same issue is seen. This patch prevents from reserving additional USB transfer slots twice. Signed-off-by: Emil Obalski <[email protected]>
c2a8af8
to
abf7007
Compare
This commit fixes an issue when more than one USB transfer is
reserved for same OUT endpoint.
There are 2 scenarios when this could happen:
event sequence for the device.
USB tranfers are not canceled on SUSPEND event
when the device was not configred previously.
Because of that USB transfer slot is reserved twice
for the same OUT endpoint and lead to shortage of USB
transfer slots quickly.
Without this patch CDC ACM class reserves duplicated USB
transfer slots for one transfer. The sequence of
Suspend->Resume events is genereted alongside with
Configured and the stack will shortly run out of transfer
slots.
If the Host, for some reason, decides to send
SET_CONFIGURATION request twice the same issue is seen.
This patch prevents from reserving additional USB transfer
slots twice.
Fixes #26970