Thread (2 messages) flat view 2 messages, 2 authors, 2d ago
WARM2d

[PATCH] usb: dwc3: Resend full Data Packet for non-compliant USB3.1 devices

From: Konrad Dybcio <konradybcio@kernel.org>
Date: 2026-09-15 19:03:49
Also in: lkml
Subsystem: designware usb3 drd ip driver, the rest, usb subsystem · Maintainers: Thinh Nguyen, Linus Torvalds, Greg Kroah-Hartman

From: Konrad Dybcio <redacted>

Some non-compliant devices require that a full Data Packet (and not
only the header) is resent upon LBAD. One such device is the USB3
protocol adapter within the Qualcomm USB4 router.

DWC3 has a toggle to enable that behavior within LLINKDBGCTRL, use it.

Signed-off-by: Konrad Dybcio <redacted>
---
 drivers/usb/dwc3/core.c | 8 ++++++++
 drivers/usb/dwc3/core.h | 2 ++
 2 files changed, 10 insertions(+)
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
index fd5c2cd36c59..d375ebee297b 100644
--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -1514,6 +1514,14 @@ int dwc3_core_init(struct dwc3 *dwc)
 		}
 	}
 
+	if (DWC3_IP_IS(DWC31) || DWC3_IP_IS(DWC32)) {
+		for (int i = 0; i < dwc->num_usb3_ports; i++) {
+			reg = dwc3_readl(dwc, DWC3_LLINKDBGCTRL(i));
+			reg |= DWC3_LLINKDBGCTRL_RETRY_DP;
+			dwc3_writel(dwc, DWC3_LLINKDBGCTRL(i), reg);
+		}
+	}
+
 	/*
 	 * STAR 9001346572: This issue affects DWC_usb31 versions 1.80a and
 	 * prior. When an active endpoint not currently cached in the host
diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index 608daeb7ef10..6af644a9672d 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -180,6 +180,8 @@
 #define DWC3_OSTS		0xcc10
 
 #define DWC3_LLUCTL(n)		(0xd024 + ((n) * 0x80))
+#define DWC3_LLINKDBGCTRL(n)	(0xd058 + ((n) * 0x80))
+#define DWC3_LLINKDBGCTRL_RETRY_DP	BIT(31)
 
 /* Bit fields */
 
---
base-commit: 1a1de54f7369cd2b5bac0f265910e60ad3a6b4c3
change-id: 20260915-topic-usb3_tunneling_fixup-8c0fb73edec8

Best regards,
--  
Konrad Dybcio [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help