Skip to content

retry transaction up to 3 times for usb host#159

Merged
sekigon-gonnoc merged 3 commits intosekigon-gonnoc:mainfrom
hathach:retry-host-transaction
Mar 7, 2025
Merged

retry transaction up to 3 times for usb host#159
sekigon-gonnoc merged 3 commits intosekigon-gonnoc:mainfrom
hathach:retry-host-transaction

Conversation

@hathach
Copy link
Copy Markdown
Contributor

@hathach hathach commented Feb 19, 2025

Testing with pio-usb as host with hub device, when plugging and unplugging device from hub, the bus can have some interruption and can cause on-going transaction to fail. Not all class driver handle failed transaction nicely. However, most of the time, a couple of retry in the next frame would solve the issue without escalate it to driver (to re-schedule transfer).

This should help to address #149 and #148. I will mark this as ready after doing more entensive tests. If anyone can help to provide feedback, that would be great.

related issue: hathach/tinyusb#2994 enhance hub driver and control transfer to also re-schedule failed transfer as well.

PS: Testing more and it does improve hub with multiple plug/unplug. Therefore this is ready for review

@tannewt @ladyada

@hathach hathach marked this pull request as ready for review February 21, 2025 02:56
@hathach
Copy link
Copy Markdown
Contributor Author

hathach commented Mar 7, 2025

@sekigon-gonnoc PR is ready for ready, let me know if this makes sense to you. retrying failed transaction 3 times before marking it as failed is rather common with other native controller as well.

@sekigon-gonnoc sekigon-gonnoc merged commit 0ca3657 into sekigon-gonnoc:main Mar 7, 2025
4 checks passed
@hathach
Copy link
Copy Markdown
Contributor Author

hathach commented Mar 7, 2025

Thank you

@ladyada
Copy link
Copy Markdown

ladyada commented Mar 7, 2025

yay thanks @sekigon-gonnoc

@hathach hathach deleted the retry-host-transaction branch May 5, 2025 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants