All of lore.kernel.org
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] usb: dwc3: gadget: Don't set IMI for no_interrupt" failed to apply to 4.9-stable tree
@ 2022-10-31  5:46 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2022-10-31  5:46 UTC (permalink / raw)
  To: Thinh.Nguyen, gregkh, jdv1029; +Cc: stable


The patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

Possible dependencies:

308c316d16cb ("usb: dwc3: gadget: Don't set IMI for no_interrupt")
0a695d4c75ff ("usb: dwc3: gadget: never ever kill the machine")
6b9018d4c1e5 ("usb: dwc3: gadget: set PCM1 field of isochronous-first TRBs")

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 308c316d16cbad99bb834767382baa693ac42169 Mon Sep 17 00:00:00 2001
From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Date: Tue, 25 Oct 2022 15:10:20 -0700
Subject: [PATCH] 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: 72246da40f37 ("usb: Introduce DesignWare USB3 DRD Driver")
Cc: stable@vger.kernel.org
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Reviewed-by: Jeff Vanhoof <jdv1029@gmail.com>
Tested-by: Jeff Vanhoof <jdv1029@gmail.com>
Link: https://lore.kernel.org/r/ced336c84434571340c07994e3667a0ee284fefe.1666735451.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 230b3c660054..5fe2d136dff5 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -1292,8 +1292,8 @@ static void dwc3_prepare_one_trb(struct dwc3_ep *dep,
 			trb->ctrl = DWC3_TRBCTL_ISOCHRONOUS;
 		}
 
-		/* always enable Interrupt on Missed ISOC */
-		trb->ctrl |= DWC3_TRB_CTRL_ISP_IMI;
+		if (!no_interrupt && !chain)
+			trb->ctrl |= DWC3_TRB_CTRL_ISP_IMI;
 		break;
 
 	case USB_ENDPOINT_XFER_BULK:


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-31  5:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-31  5:46 FAILED: patch "[PATCH] usb: dwc3: gadget: Don't set IMI for no_interrupt" failed to apply to 4.9-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.