mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
usb: xhci: do not perform Soft Retry for some xHCI hosts
commit a4a251f8c23518899d2078c320cf9ce2fa459c9f upstream. 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] Fixes: f8f80be501aa ("xhci: Use soft retry to recover faster from transaction errors") Cc: <stable@vger.kernel.org> # 4.20+ Reported-by: Bernhard <bernhard.gebetsberger@gmx.at> Tested-by: Bernhard <bernhard.gebetsberger@gmx.at> Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202541 Link: https://lore.kernel.org/r/20210311115353.2137560-2-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 2a28c0f457c5563cef9fbad803d9445eee0c1e05) [Vegard: fix conflict in context due to missing commit 9b1f935ae4daefbc6ff8929526875d55b7a53121 ("usb: xhci: Workaround for S3 issue on AMD SNPS 3.0 xHC").] Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
This commit is contained in:
parent
c73496b00b
commit
3f74f1a0bd
@ -277,6 +277,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");
|
||||
|
@ -2361,7 +2361,8 @@ static int process_bulk_intr_td(struct xhci_hcd *xhci, struct xhci_td *td,
|
||||
td->urb->actual_length = sum_trb_lengths(xhci, ep_ring, ep_trb);
|
||||
goto finish_td;
|
||||
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;
|
||||
*status = 0;
|
||||
|
@ -1846,6 +1846,7 @@ struct xhci_hcd {
|
||||
#define XHCI_INTEL_USB_ROLE_SW BIT_ULL(31)
|
||||
#define XHCI_RESET_PLL_ON_DISCONNECT BIT_ULL(34)
|
||||
#define XHCI_SNPS_BROKEN_SUSPEND BIT_ULL(35)
|
||||
#define XHCI_NO_SOFT_RETRY BIT_ULL(40)
|
||||
|
||||
unsigned int num_active_eps;
|
||||
unsigned int limit_active_eps;
|
||||
|
Loading…
x
Reference in New Issue
Block a user