patch "usb: xhci: do not perform Soft Retry for some xHCI hosts" added to usb-linus
Subsystems (3)
This is a note to let you know that I've just added the patch titled
usb: xhci: do not perform Soft Retry for some xHCI hosts
to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.
The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)
The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.
If you have any questions about this process, please let me know.
From a4a251f8c23518899d2078c320cf9ce2fa459c9f Mon Sep 17 00:00:00 2001
From: Stanislaw Gruszka <[email protected]>
Date: Thu, 11 Mar 2021 13:53:50 +0200
Subject: usb: xhci: do not perform Soft Retry for some xHCI hosts
On some systems rt2800usb and mt7601u devices are unable to operate since commit f8f80be501aa ("xhci: Use soft retry to recover faster from transaction errors")
Seems that some xHCI controllers can not perform Soft Retry correctly, affecting those devices.
To avoid the problem add xhci->quirks flag that restore pre soft retry xhci behaviour for affected xHCI controllers. Currently those are AMD_PROMONTORYA_4 and AMD_PROMONTORYA_2, since it was confirmed by the users: on those xHCI hosts issue happen and is gone after disabling Soft Retry.
[minor commit message rewording for checkpatch -Mathias]
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202541
--- drivers/usb/host/xhci-pci.c | 5 +++++ drivers/usb/host/xhci-ring.c | 3 ++- drivers/usb/host/xhci.h | 1 + 3 files changed, 8 insertions(+), 1 deletion(-)
drivers/usb/host/xhci-pci.c +5 -0
@@ -295,6 +295,11 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci) pdev->device == 0x9026) xhci->quirks |=XHCI_RESET_PLL_ON_DISCONNECT ; +if (pdev->vendor ==PCI_VENDOR_ID_AMD && + (pdev->device ==PCI_DEVICE_ID_AMD_PROMONTORYA_2 || + pdev->device ==PCI_DEVICE_ID_AMD_PROMONTORYA_4 )) + xhci->quirks |=XHCI_NO_SOFT_RETRY ; +if (xhci->quirks &XHCI_RESET_ON_RESUME )xhci_dbg_trace (xhci, trace_xhci_dbg_quirks,"QUIRK: Resetting on resume" );
drivers/usb/host/xhci-ring.c +2 -1
@@ -2484,7 +2484,8 @@ static int process_bulk_intr_td(struct xhci_hcd *xhci, struct xhci_td *td, remaining =0 ;break ;case COMP_USB_TRANSACTION_ERROR : -if ((ep_ring->err_count++ >MAX_SOFT_RETRY ) || +if (xhci->quirks &XHCI_NO_SOFT_RETRY || + (ep_ring->err_count++ >MAX_SOFT_RETRY ) ||le32_to_cpu (slot_ctx->tt_info) &TT_SLOT )break ;
drivers/usb/host/xhci.h +1 -0
@@ -1891,6 +1891,7 @@ struct xhci_hcd {#define XHCI_SKIP_PHY_INIT BIT_ULL(37)#define XHCI_DISABLE_SPARSE BIT_ULL(38)#define XHCI_SG_TRB_CACHE_SIZE_QUIRK BIT_ULL(39) +#define XHCI_NO_SOFT_RETRY BIT_ULL(40)unsigned int num_active_eps;unsigned int limit_active_eps;
Signature · 1 line
2.30.2