
On 1/10/23 09:33, Mattijs Korpershoek wrote:
Hi Dario,
Hello everyone,
Thank you for your patch.
On Sat, Jan 07, 2023 at 17:48, Dario Binacchi dario.binacchi@amarulasolutions.com wrote:
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: 5f7e01e9d5d800 ("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
I've re-ran this on my vim3l. This patch, alongside with an implementation of usb_gadget_ops.pullup() in drivers/usb/gadget/dwc2_udc_otg.c also fixes the issue described in commit 5f7e01e9d5d800 ("usb: gadget: fastboot: detach usb on reboot commands")
Tested-by Mattijs Korpershoek mkorpershoek@baylibre.com
I will submit the pullup() implementation on my end, indepently from this change.
Marek, is it possible to pick this up to resolve Dario's flashing problems?
Applied both to usb/master.
Thanks to both of you for figuring it all out, much appreciated!