mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-26 20:37:16 +00:00
fastboot: Fix fastboot reboot fail by changing functions order
It was revealed that when the fastboot_tx_write_str function is called
without the previously initialized fastboot_func->in_req->complete field,
a copy of in_req will be sent to the I/O requests queue without
an initialized field.
Moving a piece of code with the initializing of the
fastboot_func->in_req->complete field above transmit_tx allows to solve
this problem.
Fixes: 65c96757fe
"usb: fastboot: Convert USB f_fastboot to shared fastboot"
Signed-off-by: yurii.pidhornyi <yurii.pidhornyi@globallogic.com>
This commit is contained in:
parent
405217a033
commit
64af06ce91
1 changed files with 2 additions and 2 deletions
|
@ -441,8 +441,6 @@ static void rx_handler_command(struct usb_ep *ep, struct usb_request *req)
|
||||||
req->length = rx_bytes_expected(ep);
|
req->length = rx_bytes_expected(ep);
|
||||||
}
|
}
|
||||||
|
|
||||||
fastboot_tx_write_str(response);
|
|
||||||
|
|
||||||
if (!strncmp("OKAY", response, 4)) {
|
if (!strncmp("OKAY", response, 4)) {
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case FASTBOOT_COMMAND_BOOT:
|
case FASTBOOT_COMMAND_BOOT:
|
||||||
|
@ -462,6 +460,8 @@ static void rx_handler_command(struct usb_ep *ep, struct usb_request *req)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fastboot_tx_write_str(response);
|
||||||
|
|
||||||
*cmdbuf = '\0';
|
*cmdbuf = '\0';
|
||||||
req->actual = 0;
|
req->actual = 0;
|
||||||
usb_ep_queue(ep, req, 0);
|
usb_ep_queue(ep, req, 0);
|
||||||
|
|
Loading…
Add table
Reference in a new issue