esp-idf/components/usb/test/hcd
Darian Leung 0c758c8557 usb: Fix how the HCD handles sudden disconnection
This commit fixes how the USB Host HCD handles sudden disconnections.

Bugs:
- HW channels remain active when the port suddenly disconnects, and
previously the channel would be disabled by setting the disabled bit,
then waiting for a disabled interrupt. However, ISOC channels do not
generate the disabled interrupt when the port is invalid, thus leading
to tasks getting indefinitely blocked in hcd_pipe_command().

Fix:
On a sudden disconnection, forcibly treat all channels as halted even
if their HCCHAR.ChEna bit is still set. We do a soft reset after a port
error anyways, so the channels will eventually be reset.

Closes https://github.com/espressif/esp-idf/issues/7505
2021-11-02 14:30:58 +08:00
..
test_hcd_bulk.c Add USB Host Library 2021-08-24 23:28:00 +08:00
test_hcd_common.c usb: Fix how the HCD handles sudden disconnection 2021-11-02 14:30:58 +08:00
test_hcd_common.h Add USB Host Library 2021-08-24 23:28:00 +08:00
test_hcd_ctrl.c Add USB Host Library 2021-08-24 23:28:00 +08:00
test_hcd_intr.c Add USB Host Library 2021-08-24 23:28:00 +08:00
test_hcd_isoc.c usb: Fix how the HCD handles sudden disconnection 2021-11-02 14:30:58 +08:00
test_hcd_port.c usb: Fix how the HCD handles sudden disconnection 2021-11-02 14:30:58 +08:00