u-boot/drivers/usb
Mattijs Korpershoek 5f7e01e9d5 usb: gadget: fastboot: detach usb on reboot commands
When host issues "fastboot reboot fastboot", it's expected that the
board drops the USB connection before resetting.

On some boards, such as Khadas VIM3L and SEI610, this is not the case.

We observe the following error:
$ fastboot reboot fastboot
Rebooting into fastboot                            OKAY [  0.004s]
fastboot: error: Failed to boot into userspace fastboot; one or more components might be unbootable.

This does not happen when we use the RST button on the board.
It can be reproduced in linux with:
  # echo b > /proc/sysrq-trigger

In this case, we hit a undefined hardware behavior, where D+ and D-
are in an unknown state. Therefore the host can't detect usb
disconnection.

Make sure we always call usb_gadget_release() when a "fastboot reboot"
command is issued.

Note: usb_gadget_release() should be called before g_dnl_unregister()
because g_dnl_unregister() triggers a complete() call on each
endpoint (thus calling do_reset()).

Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2022-10-10 18:08:18 +02:00
..
cdns3 usb: cdns3: cdns3-ti: Add compatible for AM64 SoC 2021-11-17 17:09:47 -05:00
common usb: add isp1760 family driver 2022-07-12 21:59:54 +02:00
dwc3 usb: dwc3: add a SPL_USB_DWC3_GENERIC option for the dwc3 driver 2022-07-15 14:10:39 +02:00
emul sandbox: scsi: Move request-handling code to scsi_emul 2022-09-25 13:59:38 -06:00
eth cyclic: Use schedule() instead of WATCHDOG_RESET() 2022-09-18 10:26:33 +02:00
gadget usb: gadget: fastboot: detach usb on reboot commands 2022-10-10 18:08:18 +02:00
host usb: ehci: Remove unused ehci_{setup,shutdown}_phy() helpers 2022-10-10 18:08:18 +02:00
isp1760 usb: add isp1760 family driver 2022-07-12 21:59:54 +02:00
mtu3 usb: mtu3: flush cache for the first GPD when allocate GPD ring 2021-11-03 08:47:57 +01:00
musb drivers/usb/musb/musb_udc.c: Fix spelling of "mismatch". 2022-01-13 07:57:49 -05:00
musb-new cyclic: Use schedule() instead of WATCHDOG_RESET() 2022-09-18 10:26:33 +02:00
phy rockchip: usb: phy: add rk3066/rk3188 support 2022-06-29 11:28:15 +08:00
ulpi common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
Kconfig usb: Kconfig: Fix typo in SPL_DM_USB text 2022-09-19 17:45:51 +02:00