diff options
| author | hathach <[email protected]> | 2026-08-28 00:36:38 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2026-08-28 00:36:38 +0700 |
| commit | f748c01c4fa1104168a0f3317c37e6586d0027f7 (patch) | |
| tree | 90ddab4dcdc8917c90664ba06e55d79e61b0c71a /examples/build_system/make | |
| parent | 42db982e7c6e8ee7d2f80d15a93a7092d3b708c9 (diff) | |
usbh: add enumeration control transfer timeoutclaude/usbh-enum-timeout
A device that ACKs SETUP but never completes the following stage (e.g. NAKs
the EP0 IN data stage forever) froze the control state machine: enumeration
never finishes and hub interrupt polling never resumes, so one dead device
blocks all further enumeration on the bus. Observed with a degraded USB disk
behind a hub on a rp2040 PIO-USB host: wire capture shows SETUP ACKed then
an endless IN/NAK storm with no completion event.
Arm a watchdog (CFG_TUH_ENUM_TIMEOUT_MS, default 5s to match Linux's
USB_CTRL_GET_TIMEOUT, 0 disables) on enumeration-owned control transfers
using the existing call_after slot, which already wakes a blocked host task.
On expiry abort the transfer at hcd level and complete it as FAILED so the
normal enumeration failure path frees dev0 and resumes hub polling.
Non-enumeration control transfers keep their current behavior.
Diffstat (limited to 'examples/build_system/make')
0 files changed, 0 insertions, 0 deletions
