diff options
author | Marty Faltesek <mfaltesek@google.com> | 2018-03-15 14:33:20 -0700 |
---|---|---|
committer | Ji Luo <ji.luo@nxp.com> | 2018-08-20 21:25:42 +0800 |
commit | 4f39afdd552c54dced7ddbecdaedf644dfccd24d (patch) | |
tree | b08fbc0ee520677526981c3f154904b463f27881 /drivers | |
parent | 11e294b8e6be3136afd17c0878822f4217892272 (diff) |
[iot] "fastboot reboot bootloader" fails to transmit OKAY back to the host
When running fastboot reboot bootloder, fastboot fails to kick of the
USB transmit of OKAY back to the host. Rearranged the code to match that of
cb_reboot, where it performs the reset in the completion routine.
Bug: 74613660
Test: Ran "fastboot reboot bootloader" and no longer see the FAILED message.
Change-Id: I827a4e5b9f478da2343486f46710e959a5fc22a1
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/f_fastboot.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 7cd70b035e..46902c7414 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -3368,11 +3368,9 @@ static void cb_set_active_avb(struct usb_ep *ep, struct usb_request *req) static void cb_reboot_bootloader(struct usb_ep *ep, struct usb_request *req) { - fastboot_tx_write_str("OKAY"); - - udelay(1000000); enable_fastboot_command(); - do_reset(NULL, 0, 0, NULL); + fastboot_func->in_req->complete = compl_do_reset; + fastboot_tx_write_str("OKAY"); } #else /* CONFIG_FSL_FASTBOOT */ |