diff options
| author | Ivo Popov <[email protected]> | 2023-04-09 19:10:01 -0400 |
|---|---|---|
| committer | hathach <[email protected]> | 2023-05-29 13:18:16 +0700 |
| commit | 8ad024e51bbc663678d8a357f91021bd39222246 (patch) | |
| tree | 3b620dfa14b91c3d5d628a9c18b7b209367e2f82 /lib/embedded-cli/embedded_cli.h | |
| parent | 069e1ef84f495d2cdd4e5b2fb056a882d2f07787 (diff) | |
Even when we get an empty "status change" interrupt from the hub, schedule another interrupt poll.
During enumeration, when there are multiple devices attached to the
hub as it's plugged into the Pi Pico, enumeration hangs, because we
get a "status change" callback with value zero. With this patch, we
retry several times on "zero" status change callbacks, until
eventually we succeed.
This is the cheapo hub that exhibits this behavior, but I assume it's
not the only one: https://www.amazon.com/gp/product/B083RQMC7S.
While debugging this, I consulted the implementation in the Linux
kernel. There, hub setup explicitly checks each port individually,
before starting to depend on "status change" interrupts:
https://elixir.bootlin.com/linux/latest/source/drivers/usb/core/hub.c#L1133.
We probably should do something like that here, but it's a much bigger
change.
Diffstat (limited to 'lib/embedded-cli/embedded_cli.h')
0 files changed, 0 insertions, 0 deletions
