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

From: Jens Glathe
Date: Sun Aug 28 2022 - 10:23:41 EST


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 | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index dce6c0ec8d34..d1b8e7148dd1 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -306,8 +306,12 @@ static void xhci_pci_quirks(struct device *dev,
struct xhci_hcd *xhci)
}

if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
- pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI)
+ 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

---

replaced spaces with tabs


------ Originalnachricht ------
Von "Greg KH" <gregkh@xxxxxxxxxxxxxxxxxxx>
An "Jens Glathe" <jens.glathe@xxxxxxxxxxxxxxxxxxxxxx>
Cc mathias.nyman@xxxxxxxxx; linux-usb@xxxxxxxxxxxxxxx;
linux-kernel@xxxxxxxxxxxxxxx
Datum 25.09.2022 10:07:32
Betreff Re: [PATCH v2] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite
being a V0.96 controller

>On Sun, Sep 25, 2022 at 07:50:48AM +0000, Jens Glathe wrote:
>>Hi there,
>>
>>I'm a bit at a loss here. This is a three-line change, and I get loads of
>>warnings regarding "please, no spaces at beginning of lines".
>
>Yes, that's not allowed, kernel development uses tabs, not spaces. Fix
>that up and resend and all should be good.
>
>thanks,
>
>greg k-h