All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: xhci: pci: do not perform Soft Retry on AMD 500 series chipset host
@ 2026-11-17 19:33 Riley Wagner
  2026-11-17 19:35 ` sashiko-bot
  2026-11-20 11:13 ` Michal Pecio
  0 siblings, 2 replies; 3+ messages in thread
From: Riley Wagner @ 2026-11-17 19:33 UTC (permalink / raw)
  To: mathias.nyman, linux-usb; +Cc: gregkh, Riley Wagner, stable

Full-speed HID devices hot-plugged into a root port of the AMD 500
series chipset xHCI host (1022:43ee) enumerate and bind, but never
deliver any input. The device then resets itself after ~10 seconds,
re-enumerates, and the cycle repeats. Devices present at boot are not
affected.

With xhci_hcd dynamic debug enabled, the first poll of the interrupt IN
endpoint fails with a transaction error, the driver performs a Soft
Retry, and the endpoint never completes another transfer:

  [ 6658.313453] xhci_hcd 0000:02:00.0: Successful Endpoint Configure command
  [ 6658.352348] input: ELECOM TrackBall Mouse HUGE TrackBall as ...
  [ 6659.424165] xhci_hcd 0000:02:00.0: Transfer error for slot 29 ep 2 on endpoint
  [ 6659.424170] xhci_hcd 0000:02:00.0: Soft-reset ep 2, slot 29
  [ 6659.424290] xhci_hcd 0000:02:00.0: Ignoring reset ep completion code of 1
  [ 6667.989369] usb 1-9: USB disconnect, device number 30

usbmon shows the interrupt URB submitted at enumeration and only given
back by the disconnect, 9.6 seconds later:

  2562187476 S Ii:1:030:1 -115:1 8 <
  2571824873 C Ii:1:030:1 -108:1 0

No further transfer events or errors are reported for the endpoint after
the soft reset completes and the doorbell is rung, so the TD is never
retried or failed.

This matches commit a4a251f8c235 ("usb: xhci: do not perform Soft Retry
for some xHCI hosts"), which disabled Soft Retry on the AMD Promontory A
hosts (43b9, 43bb) for the same class of failure. Booting with
xhci_hcd.quirks=0x10000000000 (XHCI_NO_SOFT_RETRY) makes the device work
reliably after hot-plug on the chipset root ports tested (1-3, 1-9); the
same device also works after hot-plug on the CPU's xHCI host (1022:149c)
without the quirk.

Tested on an ASUS ROG STRIX B550-F GAMING (BIOS 3621) with an ELECOM
HUGE trackball (056e:010c) and a PFU HHKB Professional HYBRID Type-S
(04fe:0021), on 7.3.4 with commit 6895dbdc19d9 ("xhci: give back TDs
and clean up ep0 after disconnect") applied. The trackball showed the
same behaviour on 7.2.x.

Add the AMD 500 series chipset xHCI to the hosts that do not perform
Soft Retry.

Fixes: f8f80be501aa ("xhci: Use soft retry to recover faster from transaction errors")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=202541
Cc: stable@vger.kernel.org
Signed-off-by: Riley Wagner <riwiwa00@gmail.com>
---
 drivers/usb/host/xhci-pci.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -88,6 +88,7 @@
 #define PCI_DEVICE_ID_AMD_PROMONTORYA_3			0x43ba
 #define PCI_DEVICE_ID_AMD_PROMONTORYA_2			0x43bb
 #define PCI_DEVICE_ID_AMD_PROMONTORYA_1			0x43bc
+#define PCI_DEVICE_ID_AMD_500_SERIES_XHCI		0x43ee
 
 #define PCI_DEVICE_ID_ATI_NAVI10_7316_XHCI		0x7316
 
@@ -493,7 +494,8 @@
 
 	if (pdev->vendor == PCI_VENDOR_ID_AMD &&
 	    (pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_2 ||
-	     pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_4))
+	     pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_4 ||
+	     pdev->device == PCI_DEVICE_ID_AMD_500_SERIES_XHCI))
 		xhci->quirks |= XHCI_NO_SOFT_RETRY;
 
 	if (pdev->vendor == PCI_VENDOR_ID_ZHAOXIN) {
-- 
2.56.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] usb: xhci: pci: do not perform Soft Retry on AMD 500 series chipset host
  2026-11-17 19:33 [PATCH] usb: xhci: pci: do not perform Soft Retry on AMD 500 series chipset host Riley Wagner
@ 2026-11-17 19:35 ` sashiko-bot
  2026-11-20 11:13 ` Michal Pecio
  1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-11-17 19:35 UTC (permalink / raw)
  To: Riley Wagner, linux-usb

> Full-speed HID devices hot-plugged into a root port of the AMD 500
> series chipset xHCI host (1022:43ee) enumerate and bind, but never
> deliver any input. The device then resets itself after ~10 seconds,
> re-enumerates, and the cycle repeats. Devices present at boot are not
> affected.
> 
> With xhci_hcd dynamic debug enabled, the first poll of the interrupt IN
> endpoint fails with a transaction error, the driver performs a Soft
> Retry, and the endpoint never completes another transfer:
> 
>   [ 6658.313453] xhci_hcd 0000:02:00.0: Successful Endpoint Configure command
>   [ 6658.352348] input: ELECOM TrackBall Mouse HUGE TrackBall as ...
>   [ 6659.424165] xhci_hcd 0000:02:00.0: Transfer error for slot 29 ep 2 on endpoint
>   [ 6659.424170] xhci_hcd 0000:02:00.0: Soft-reset ep 2, slot 29
>   [ 6659.424290] xhci_hcd 0000:02:00.0: Ignoring reset ep completion code of 1
> [ ... ]
> 
> Fixes: f8f80be501aa ("xhci: Use soft retry to recover faster from transaction errors")
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=202541
> Cc: stable@vger.kernel.org
> Signed-off-by: Riley Wagner <riwiwa00@gmail.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261117193300.25897-1-riwiwa00@gmail.com?part=1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] usb: xhci: pci: do not perform Soft Retry on AMD 500 series chipset host
  2026-11-17 19:33 [PATCH] usb: xhci: pci: do not perform Soft Retry on AMD 500 series chipset host Riley Wagner
  2026-11-17 19:35 ` sashiko-bot
@ 2026-11-20 11:13 ` Michal Pecio
  1 sibling, 0 replies; 3+ messages in thread
From: Michal Pecio @ 2026-11-20 11:13 UTC (permalink / raw)
  To: Riley Wagner
  Cc: mathias.nyman, linux-usb, gregkh, stable, Mario Limonciello (AMD),
	Shyam Sundar S K

On Tue, 17 Nov 2026 11:33:00 -0800, Riley Wagner wrote:
> Full-speed HID devices hot-plugged into a root port of the AMD 500
> series chipset xHCI host (1022:43ee) enumerate and bind, but never
> deliver any input. The device then resets itself after ~10 seconds,
> re-enumerates, and the cycle repeats. Devices present at boot are not
> affected.

I doubt that this affects all HID devices, people would have noticed.

What if it's not connected to the root hub? Is this important?

> With xhci_hcd dynamic debug enabled, the first poll of the interrupt IN
> endpoint fails with a transaction error, the driver performs a Soft
> Retry, and the endpoint never completes another transfer:
> 
>   [ 6658.313453] xhci_hcd 0000:02:00.0: Successful Endpoint Configure command
>   [ 6658.352348] input: ELECOM TrackBall Mouse HUGE TrackBall as ...
>   [ 6659.424165] xhci_hcd 0000:02:00.0: Transfer error for slot 29 ep 2 on endpoint
>   [ 6659.424170] xhci_hcd 0000:02:00.0: Soft-reset ep 2, slot 29
>   [ 6659.424290] xhci_hcd 0000:02:00.0: Ignoring reset ep completion code of 1
>   [ 6667.989369] usb 1-9: USB disconnect, device number 30
> 
> usbmon shows the interrupt URB submitted at enumeration and only given
> back by the disconnect, 9.6 seconds later:
> 
>   2562187476 S Ii:1:030:1 -115:1 8 <
>   2571824873 C Ii:1:030:1 -108:1 0
> 
> No further transfer events or errors are reported for the endpoint after
> the soft reset completes and the doorbell is rung, so the TD is never
> retried or failed.

IIRC that's the same HW bug which broke some high-speed Realtek WiFi
dongle and caused Soft Retry to be disabled in multiple variants of
Promontory chipsets. I actually obtained that WiFi dongle (long after
the fact) and reproduced the issue - it happens when a device fails
the first URB and it gets retried. Most HCs handle this normally, but
Promontory generates no transfer events and later fails Stop Endpoint
with Context State Error and the endpoint is "halted".

And I think I have seen similar issues on other ASMedia HCs in case of
disconnection and repeated retries and endpoint resets. OTOH, in other
cases this controllers perform retries correctly.

I will look into that, because maybe we could only avoid the particular
retries which fail (and also add a whole lot more PCI IDs).

> This matches commit a4a251f8c235 ("usb: xhci: do not perform Soft Retry
> for some xHCI hosts"), which disabled Soft Retry on the AMD Promontory A
> hosts (43b9, 43bb) for the same class of failure. Booting with
> xhci_hcd.quirks=0x10000000000 (XHCI_NO_SOFT_RETRY) makes the device work
> reliably after hot-plug on the chipset root ports tested (1-3, 1-9); the
> same device also works after hot-plug on the CPU's xHCI host (1022:149c)
> without the quirk.
> 
> Tested on an ASUS ROG STRIX B550-F GAMING (BIOS 3621) with an ELECOM
> HUGE trackball (056e:010c) and a PFU HHKB Professional HYBRID Type-S
> (04fe:0021), on 7.3.4 with commit 6895dbdc19d9 ("xhci: give back TDs
> and clean up ep0 after disconnect") applied. The trackball showed the
> same behaviour on 7.2.x.

I suppose the keyboard also had problems on 7.2?
IIRC it's that one which always disconnects itself on initialization.

> Add the AMD 500 series chipset xHCI to the hosts that do not perform
> Soft Retry.
> 
> Fixes: f8f80be501aa ("xhci: Use soft retry to recover faster from transaction errors")
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=202541
> Cc: stable@vger.kernel.org
> Signed-off-by: Riley Wagner <riwiwa00@gmail.com>
> ---
>  drivers/usb/host/xhci-pci.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
> --- a/drivers/usb/host/xhci-pci.c
> +++ b/drivers/usb/host/xhci-pci.c
> @@ -88,6 +88,7 @@
>  #define PCI_DEVICE_ID_AMD_PROMONTORYA_3			0x43ba
>  #define PCI_DEVICE_ID_AMD_PROMONTORYA_2			0x43bb
>  #define PCI_DEVICE_ID_AMD_PROMONTORYA_1			0x43bc
> +#define PCI_DEVICE_ID_AMD_500_SERIES_XHCI		0x43ee

I think "PROMONTORY_19" or "PROM19" would be better for consistency
with other entries (see also: commit 9e896b4a48c4).

And isn't 1022:43ec another PROM19 ID?
Does anyone know if 400-series or PROM21 have the same bug?

Adding some AMD people...

>  
>  #define PCI_DEVICE_ID_ATI_NAVI10_7316_XHCI		0x7316
>  
> @@ -493,7 +494,8 @@
>  
>  	if (pdev->vendor == PCI_VENDOR_ID_AMD &&
>  	    (pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_2 ||
> -	     pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_4))
> +	     pdev->device == PCI_DEVICE_ID_AMD_PROMONTORYA_4 ||
> +	     pdev->device == PCI_DEVICE_ID_AMD_500_SERIES_XHCI))
>  		xhci->quirks |= XHCI_NO_SOFT_RETRY;
>  
>  	if (pdev->vendor == PCI_VENDOR_ID_ZHAOXIN) {
> -- 
> 2.56.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-20 11:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17 19:33 [PATCH] usb: xhci: pci: do not perform Soft Retry on AMD 500 series chipset host Riley Wagner
2026-11-17 19:35 ` sashiko-bot
2026-11-20 11:13 ` Michal Pecio

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.