esp-idf/components/usb/include
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
..
esp_private usb: Add usb_phy driver to support operations on USB PHY 2021-09-13 12:39:56 +08:00
usb usb: Fix how the HCD handles sudden disconnection 2021-11-02 14:30:58 +08:00