]> git.baikalelectronics.ru Git - uboot.git/commit
usb: gadget: fastboot: detach usb just before rebooting
authorDario Binacchi <dario.binacchi@amarulasolutions.com>
Sat, 7 Jan 2023 16:48:07 +0000 (17:48 +0100)
committerMarek Vasut <marex@denx.de>
Sat, 14 Jan 2023 13:10:30 +0000 (14:10 +0100)
commit5b15b20b48fe9667df0851ce103e8b807b52629a
treeaeedad0440a0a618eba75782b65a721fba79a31c
parentf4df76749e1d35bcfa5e56a785e152efcfe2f26b
usb: gadget: fastboot: detach usb just before rebooting

The patch fixes the following error when updating a BSH SMM S2 board:
3:72>Start Cmd:FB[-t 8000]: ucmd nand write ${loadaddr} nanddtb ${filesize}
3:72>Okay (0.023s)
3:72>Start Cmd:FB: reboot
3:72>Fail Bulk(R):LIBUSB_ERROR_IO(0s)

The "fastboot reboot" command detaches the USB when it still needs to be
used. So let's detach the USB just before the reset.

CC: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Fixes: 51691b197559f9 ("usb: gadget: fastboot: detach usb on reboot commands")
Suggested-by: Michael Trimarchi <michael@amarulasolutions.com>
Co-developed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
drivers/usb/gadget/f_fastboot.c