Skip to content

Commit 308c316

Browse files
Thinh Nguyengregkh
authored andcommitted
usb: dwc3: gadget: Don't set IMI for no_interrupt
The gadget driver may have a certain expectation of how the request completion flow should be from to its configuration. Make sure the controller driver respect that. That is, don't set IMI (Interrupt on Missed Isoc) when usb_request->no_interrupt is set. Also, the driver should only set IMI to the last TRB of a chain. Fixes: 72246da ("usb: Introduce DesignWare USB3 DRD Driver") Cc: [email protected] Signed-off-by: Thinh Nguyen <[email protected]> Reviewed-by: Jeff Vanhoof <[email protected]> Tested-by: Jeff Vanhoof <[email protected]> Link: https://lore.kernel.org/r/ced336c84434571340c07994e3667a0ee284fefe.1666735451.git.Thinh.Nguyen@synopsys.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f78961f commit 308c316

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/usb/dwc3/gadget.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,8 +1292,8 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep,
12921292
trb->ctrl = DWC3_TRBCTL_ISOCHRONOUS;
12931293
}
12941294

1295-
/* always enable Interrupt on Missed ISOC */
1296-
trb->ctrl |= DWC3_TRB_CTRL_ISP_IMI;
1295+
if (!no_interrupt && !chain)
1296+
trb->ctrl |= DWC3_TRB_CTRL_ISP_IMI;
12971297
break;
12981298

12991299
case USB_ENDPOINT_XFER_BULK:

0 commit comments

Comments
 (0)