diff options
author | Felipe Balbi <felipe.balbi@linux.intel.com> | 2018-03-29 13:07:16 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2018-05-21 10:00:53 +0300 |
commit | 4d588a145b3e5e096804b71714db6a8bb82e8f49 (patch) | |
tree | e660bff630d0fa169fe5f4ed304070eb0005ef06 /drivers/usb/dwc3/gadget.c | |
parent | 6d8a019614f3a7630e0a2c1be4bf1cfc23acf56e (diff) | |
download | linux-stable-4d588a145b3e5e096804b71714db6a8bb82e8f49.tar.gz linux-stable-4d588a145b3e5e096804b71714db6a8bb82e8f49.tar.bz2 linux-stable-4d588a145b3e5e096804b71714db6a8bb82e8f49.zip |
usb: dwc3: gadget: remove duplicated missed isoc handling
Now, this part of the code is duplicated and brings no extra value to
the driver. Let's remove it.
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3/gadget.c')
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index d378f3e92e18..452f76e8ea97 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -1333,8 +1333,7 @@ static int __dwc3_gadget_ep_queue(struct dwc3_ep *dep, struct dwc3_request *req) return 0; } - if ((dep->flags & DWC3_EP_TRANSFER_STARTED) && - !(dep->flags & DWC3_EP_MISSED_ISOC)) + if (dep->flags & DWC3_EP_TRANSFER_STARTED) goto out; return 0; @@ -2229,7 +2228,6 @@ static int dwc3_gadget_ep_reclaim_completed_trb(struct dwc3_ep *dep, { unsigned int count; unsigned int s_pkt = 0; - unsigned int trb_status; dwc3_ep_inc_deq(dep); @@ -2264,35 +2262,7 @@ static int dwc3_gadget_ep_reclaim_completed_trb(struct dwc3_ep *dep, if ((trb->ctrl & DWC3_TRB_CTRL_HWO) && status != -ESHUTDOWN) return 1; - if (dep->direction) { - if (count) { - trb_status = DWC3_TRB_SIZE_TRBSTS(trb->size); - if (trb_status == DWC3_TRBSTS_MISSED_ISOC) { - /* - * If missed isoc occurred and there is - * no request queued then issue END - * TRANSFER, so that core generates - * next xfernotready and we will issue - * a fresh START TRANSFER. - * If there are still queued request - * then wait, do not issue either END - * or UPDATE TRANSFER, just attach next - * request in pending_list during - * giveback.If any future queued request - * is successfully transferred then we - * will issue UPDATE TRANSFER for all - * request in the pending_list. - */ - dep->flags |= DWC3_EP_MISSED_ISOC; - } else { - dev_err(dep->dwc->dev, "incomplete IN transfer %s\n", - dep->name); - status = -ECONNRESET; - } - } else { - dep->flags &= ~DWC3_EP_MISSED_ISOC; - } - } else { + if (!dep->direction) { if (count && (event->status & DEPEVT_STATUS_SHORT)) s_pkt = 1; } |