* [PATCH] usb: dwc3: Resend full Data Packet for non-compliant USB3.1 devices
@ 2026-09-15 19:03 Konrad Dybcio
2026-09-23 2:02 ` Thinh Nguyen
0 siblings, 1 reply; 2+ messages in thread
From: Konrad Dybcio @ 2026-09-15 19:03 UTC (permalink / raw)
To: Thinh Nguyen, Greg Kroah-Hartman
Cc: linux-usb, linux-kernel, usb4-upstream, Raghavendra Thoorpu,
Konrad Dybcio
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
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 <konrad.dybcio@oss.qualcomm.com>
---
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 <konrad.dybcio@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] usb: dwc3: Resend full Data Packet for non-compliant USB3.1 devices
2026-09-15 19:03 [PATCH] usb: dwc3: Resend full Data Packet for non-compliant USB3.1 devices Konrad Dybcio
@ 2026-09-23 2:02 ` Thinh Nguyen
0 siblings, 0 replies; 2+ messages in thread
From: Thinh Nguyen @ 2026-09-23 2:02 UTC (permalink / raw)
To: Konrad Dybcio
Cc: Thinh Nguyen, Greg Kroah-Hartman, linux-usb, linux-kernel,
usb4-upstream, Raghavendra Thoorpu, Konrad Dybcio
On Tue, Sep 15, 2026, Konrad Dybcio wrote:
> From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
>
> 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 <konrad.dybcio@oss.qualcomm.com>
> ---
> 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 <konrad.dybcio@oss.qualcomm.com>
>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Thanks,
Thinh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-23 2:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-15 19:03 [PATCH] usb: dwc3: Resend full Data Packet for non-compliant USB3.1 devices Konrad Dybcio
2026-09-23 2:02 ` Thinh Nguyen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®