mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 04:42:04 -04:00
Merge "usb: dwc3: gadget: handle ep_dequeue in LPM properly"
This commit is contained in:
commit
c4f62dcc12
1 changed files with 5 additions and 5 deletions
|
|
@ -1805,11 +1805,6 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep,
|
|||
unsigned long flags;
|
||||
int ret = 0;
|
||||
|
||||
if (atomic_read(&dwc->in_lpm)) {
|
||||
dev_err(dwc->dev, "Unable to dequeue while in LPM\n");
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
trace_dwc3_ep_dequeue(req);
|
||||
dbg_ep_dequeue(dep->number, req);
|
||||
|
||||
|
|
@ -3537,6 +3532,11 @@ int dwc3_stop_active_transfer(struct dwc3_ep *dep, bool force, bool interrupt)
|
|||
u32 cmd;
|
||||
int ret;
|
||||
|
||||
if (atomic_read(&dwc->in_lpm)) {
|
||||
dev_err(dwc->dev, "cannot stop transfers while in LPM\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!(dep->flags & DWC3_EP_TRANSFER_STARTED) ||
|
||||
(dep->flags & DWC3_EP_END_TRANSFER_PENDING))
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue