-
Notifications
You must be signed in to change notification settings - Fork 21
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
fix(host/cdc): Fix TX timeout reaction #41
Conversation
@radiotommy I'd like to close your #40 in favor of this PR. Could you please check that this fix works for you? @david-cermak PTAL too, we'd like to release |
@peter-marcisovsky we discussed similar issue earlier today :) |
The issue reported in espressif/esp-protocols#589 is unrelated to this fix (although I noticed some of the related errors when testing this with more verbose output, probably causing some transmits to timeout).
The best choice would be I assume that it's been a design decision to return an error when trying to transmit more bytes than the configured Tx buffer rather then iterate over the bigger size until we transmit everything (as we see in some other IDF drivers, like uart, or essl). If this is the case then I agree there's nothing else to fix in |
just tested it on my board. It fixes my problem as well. |
@david-cermak yes, this is intentional. We will consider this feature in the future ;) |
1134177
to
57af889
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.
Just a few minor comments. LGTM.
host/class/cdc/usb_host_cdc_acm/test_app/main/test_cdc_acm_host.c
Outdated
Show resolved
Hide resolved
host/class/cdc/usb_host_cdc_acm/test_app/main/test_cdc_acm_host.c
Outdated
Show resolved
Hide resolved
57af889
to
37c4dfb
Compare
@peter-marcisovsky thanks for the review! |
37c4dfb
to
6e1ee7c
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.
Just one nitpick about the constant value in the code.
Otherwise, LGTM.
Closes espressif/esp-protocols#514 Closes #40 Closes espressif/esp-idf#13797
6e1ee7c
to
e711bf1
Compare
After TX transfer timeout we reset the endpoint which causes all in-flight transfers to complete. The transfer finished callback gives a transfer finished semaphore which we must take, so we would not affect next TX transfers.
Test included
Closes espressif/esp-protocols#514
Closes #40
Closes espressif/esp-idf#13797