mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
Merge "usb: gadget: Restart USB session if start xfer fails for ep0"
This commit is contained in:
commit
d1cce4f6ba
1 changed files with 13 additions and 1 deletions
|
|
@ -78,8 +78,20 @@ static int dwc3_ep0_start_trans(struct dwc3_ep *dep)
|
|||
params.param1 = lower_32_bits(dwc->ep0_trb_addr);
|
||||
|
||||
ret = dwc3_send_gadget_ep_cmd(dep, DWC3_DEPCMD_STARTTRANSFER, ¶ms);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
if (ret == -ETIMEDOUT) {
|
||||
/*
|
||||
* If start transfer is timing out then mark it as an error
|
||||
* event since the controller is already in an unknown
|
||||
* state.
|
||||
*/
|
||||
dbg_log_string("%s: error event seen\n", __func__);
|
||||
dwc->err_evt_seen = true;
|
||||
dwc3_notify_event(dwc, DWC3_CONTROLLER_ERROR_EVENT, 0);
|
||||
dwc3_notify_event(dwc, DWC3_CONTROLLER_NOTIFY_CLEAR_DB, 0);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
dwc->ep0_next_event = DWC3_EP0_COMPLETE;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue