aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2013-12-13 15:19:33 -0500
committerFelipe Balbi <balbi@ti.com>2014-03-05 10:44:49 -0500
commitf3af36511e60669a2b5644d17378c7ea4e42d8b1 (patch)
tree6202c1f125fbb03d9297a13b524361d9f1155d87 /drivers/usb/dwc3
parent0e06bcac79ce6bb49adee22a991206933b7ea52d (diff)
usb: dwc3: gadget: always enable IOC on bulk/interrupt transfers
by setting IOC always, we can recycle TRBs a lot sooner at the expense of some increased CPU load. The extra load seems to be quite minimal on OMAP5 devices (instead of 1 IRQ for one MSC transfer, we get CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS). Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r--drivers/usb/dwc3/gadget.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 2da0a5a2803a..9e878d9bc909 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -771,9 +771,6 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep,
771 trb->ctrl = DWC3_TRBCTL_ISOCHRONOUS_FIRST; 771 trb->ctrl = DWC3_TRBCTL_ISOCHRONOUS_FIRST;
772 else 772 else
773 trb->ctrl = DWC3_TRBCTL_ISOCHRONOUS; 773 trb->ctrl = DWC3_TRBCTL_ISOCHRONOUS;
774
775 if (!req->request.no_interrupt && !chain)
776 trb->ctrl |= DWC3_TRB_CTRL_IOC;
777 break; 774 break;
778 775
779 case USB_ENDPOINT_XFER_BULK: 776 case USB_ENDPOINT_XFER_BULK:
@@ -788,6 +785,9 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep,
788 BUG(); 785 BUG();
789 } 786 }
790 787
788 if (!req->request.no_interrupt && !chain)
789 trb->ctrl |= DWC3_TRB_CTRL_IOC;
790
791 if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) { 791 if (usb_endpoint_xfer_isoc(dep->endpoint.desc)) {
792 trb->ctrl |= DWC3_TRB_CTRL_ISP_IMI; 792 trb->ctrl |= DWC3_TRB_CTRL_ISP_IMI;
793 trb->ctrl |= DWC3_TRB_CTRL_CSP; 793 trb->ctrl |= DWC3_TRB_CTRL_CSP;
@@ -1855,9 +1855,6 @@ static int dwc3_cleanup_done_reqs(struct dwc3 *dwc, struct dwc3_ep *dep,
1855 return 1; 1855 return 1;
1856 } 1856 }
1857 1857
1858 if ((event->status & DEPEVT_STATUS_IOC) &&
1859 (trb->ctrl & DWC3_TRB_CTRL_IOC))
1860 return 0;
1861 return 1; 1858 return 1;
1862} 1859}
1863 1860