Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: Michal Pecio <michal.pecio@gmail.com>
To: Riley Wagner <riwiwa00@gmail.com>
Cc: mathias.nyman@intel.com, linux-usb@vger.kernel.org,
	gregkh@linuxfoundation.org, stable@vger.kernel.org,
	"Mario Limonciello (AMD)" <superm1@kernel.org>,
	Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Subject: Re: [PATCH] usb: xhci: pci: do not perform Soft Retry on AMD 500 series chipset host
Date: Fri, 20 Nov 2026 12:13:57 +0100	[thread overview]
Message-ID: <20261120121357.1e1a0ce4.michal.pecio@gmail.com> (raw)
In-Reply-To: <20261117193300.25897-1-riwiwa00@gmail.com>

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

      reply	other threads:[~2026-11-20 11:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 19:33 [PATCH] usb: xhci: pci: do not perform Soft Retry on AMD 500 series chipset host Riley Wagner
2026-11-20 11:13 ` Michal Pecio [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261120121357.1e1a0ce4.michal.pecio@gmail.com \
    --to=michal.pecio@gmail.com \
    --cc=Shyam-sundar.S-k@amd.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=riwiwa00@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=superm1@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox