[PATCH v2] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there,

second try at a patch which was an actual pain with my Lenovo T500 notebook, augmented with an USB3 PCMCIA card that has an ASM1042 chip. Inspired by this email thread: https://markmail.org/thread/7vzqbe7t6du6qsw3

ASM1042 identifies as a 0x96 XHCI host, brings spurious transfer event errors with a r8152 (Realtek 8153a) USB3 enthernet adapter. Additionally setting quirk XHCI_SPURIOUS_SUCCESS seems to resolve this issue in this case.

with best regards

Jens Glathe

---

v1->v2

intensive use of scripts/checkpatch.pl, reformatted the code
reformatted the commit text for line wraps
From ffb3a70a48b91b79943a0131ddd470e5f09c0f41 Mon Sep 17 00:00:00 2001
From: Jens Glathe <jens.glathe@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 28 Aug 2022 16:23:41 +0200
Subject: [PATCH] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a
 V0.96 controller

only if it reports as a V0.96 XHCI controller. Appears to fix the errors
"xhci_hcd <address>; ERROR Transfer event TRB DMA ptr not part of
current TD ep_index 2 comp_code 13" that appear spuriously (or pretty
often) when using a r8152 USB3 ethernet adapter with integrated hub.

Signed-off-by: Jens Glathe <jens.glathe@xxxxxxxxxxxxxxxxxxxxxx>
---
 drivers/usb/host/xhci-pci.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index dce6c0ec8d34..f8b3b34d257e 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -305,9 +305,13 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
 		xhci->quirks |= XHCI_EP_CTX_BROKEN_DCS;
 	}
 
-	if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
-		pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI)
-		xhci->quirks |= XHCI_BROKEN_STREAMS;
+  if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
+      pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI) {
+    /* try to tame the ASMedia 1042 controller which is 0.96 */
+    if (xhci->hci_version == 0x96)
+      xhci->quirks |= XHCI_SPURIOUS_SUCCESS;
+    xhci->quirks |= XHCI_BROKEN_STREAMS;
+  }
 	if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
 		pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI) {
 		xhci->quirks |= XHCI_TRUST_TX_LENGTH;
-- 
2.25.1


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux