u-boot/drivers/usb
Ye Li e1769da17e usb: ehci-hcd: Add IAA handshake for removing async QH
According to EHCI spec, software needs to do handshake with HC for
safely removing QH from async list. This handshake is implemented by
setting IAAD (Interrupt on Async Advance Doorbell) bit in USB_USBCMD
register and poll the IAA (Interrupt on Async Advance bit) in the
USB_USBSTS to ensure the HC has released all on-chip state that may
potentially reference one of the data structures just removed.

Current codes only check active status of the last QTD, but this can't
ensure the QH is released from HC. We can meet unrecoverable
"EHCI timed out on TD" errors when running UEFI SCT tests on USB disk.
The USB_ASYNCLISTADDR register is changed to a invalid address when the
issue happens. It is fixed after adding the IAA handshake.

Steps to reproduce the issue:
1. Build the UEFI SCT from https://github.com/tianocore/edk2-test
2. Build the EDK2 UEFI Shell from https://github.com/tianocore/edk2
3. Copy SCT files and Shell.efi to USB disk FAT partition
4. Load the Shell.efi from USB FAT, and run bootefi to execute it
5. After booting into Shell, enter the SCT directory and run "sct -a"
   to execute all tests.
6. Tests run about 1 hour and stop with many EHCI timeout errors like
   EHCI timed out on TD - token=0x801f8c80

Signed-off-by: Ye Li <ye.li@nxp.com>
2021-04-22 21:09:57 +02:00
..
cdns3 dm: core: Access device ofnode through functions 2021-01-05 12:24:41 -07:00
common common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
dwc3 lib: string: Implement strlcat 2021-04-12 17:44:55 -04:00
emul dm: treewide: Rename ..._platdata variables to just ..._plat 2020-12-13 16:51:09 -07:00
eth Prepare v2021.01-rc5 2021-01-05 16:20:26 -05:00
gadget usb: Return -ENOSYS when system call is not available 2021-04-06 16:33:19 +12:00
host usb: ehci-hcd: Add IAA handshake for removing async QH 2021-04-22 21:09:57 +02:00
mtu3 usb: mtu3: flush cache for next GPD 2021-03-10 11:48:09 +01:00
musb usb: musb: Ensure that we set musb dynamic FIFO buffer for every endpoint 2021-03-03 04:12:46 +01:00
musb-new common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
phy common: Drop asm/global_data.h from common header 2021-02-02 15:33:42 -05:00
ulpi common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
Kconfig usb: USB keyboard requires DM_KEYBOARD 2021-03-03 04:12:46 +01:00