summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPratyush Anand <pratyush.anand@st.com>2012-05-21 12:42:54 +0530
committerFelipe Balbi <balbi@ti.com>2012-06-04 18:17:04 +0300
commit206dd69a62a06197b308fa0decfd0b649fcc2811 (patch)
tree19ca4c3c9ac39b1ee264c27b8a05563846affc51
parent85a781019b9b4b935f6b1792a1f48f1a3aee988f (diff)
USB: DWC3: Generate interrupt on each TRB as default option
Currently in case of isoc, interrupt is programmed after each TRB_NUM/4 ie 8th TRB. A TRB is programmed against each submitted request from gadget. If we do not want to limit the minimum number of necessary request to be submitted from gadget then we must receive interrupt on each TRB submission. There can be such situation with a gadget working with ping-pong buffer. If a gadget does not want to receive interrupt after each request completion then it may set no_interrupt flag. Signed-off-by: Pratyush Anand <pratyush.anand@st.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r--drivers/usb/dwc3/gadget.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index a9fc7c4a5a2..be87e82b36c 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -766,8 +766,7 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep,
case USB_ENDPOINT_XFER_ISOC:
trb->ctrl = DWC3_TRBCTL_ISOCHRONOUS_FIRST;
- /* IOC every DWC3_TRB_NUM / 4 so we can refill */
- if (!(cur_slot % (DWC3_TRB_NUM / 4)))
+ if (!req->request.no_interrupt)
trb->ctrl |= DWC3_TRB_CTRL_IOC;
break;