From 1a324a70fd4fb1fa4ab120f0e39de0e8d91091b9 Mon Sep 17 00:00:00 2001 From: Jonathan Bell Date: Fri, 27 Mar 2026 14:32:52 +0000 Subject: [PATCH] usb: dwc2: only masquerade split-IN interrupt transfers Some hub hardware does not differentiate pipe direction in the non-periodic split handler, so transfers to the same endpoint index will collide. A simple fix is to limit the non-periodic masquerade only to IN transfers, which are also the most affected by interrupt latency. A recurrence of https://github.com/raspberrypi/linux/issues/2024 Signed-off-by: Jonathan Bell --- drivers/usb/dwc2/hcd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index ea8711e2ef67a3..9b8d28f2eb4d29 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -685,7 +685,8 @@ static void dwc2_hc_init(struct dwc2_hsotg *hsotg, struct dwc2_host_chan *chan) * Devices are none the wiser - the handshake tokens are the same. * The fakery is undone in dwc2_hc_n_intr(). */ - if (chan->do_split && chan->ep_type == USB_ENDPOINT_XFER_INT) + if (chan->ep_is_in && chan->do_split && + chan->ep_type == USB_ENDPOINT_XFER_INT) chan->ep_type = USB_ENDPOINT_XFER_CONTROL; hcchar |= chan->ep_type << HCCHAR_EPTYPE_SHIFT & HCCHAR_EPTYPE_MASK;