From patchwork Tue Aug 30 16:31:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Glathe X-Patchwork-Id: 12959558 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3A1DECAAA1 for ; Tue, 30 Aug 2022 16:31:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229823AbiH3Qb6 (ORCPT ); Tue, 30 Aug 2022 12:31:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbiH3Qb5 (ORCPT ); Tue, 30 Aug 2022 12:31:57 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A60B8B980; Tue, 30 Aug 2022 09:31:54 -0700 (PDT) Received: from [192.168.0.74] ([91.64.235.177]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Mj8Vx-1p5xjd0PHJ-00fCHk; Tue, 30 Aug 2022 18:31:48 +0200 From: "Jens Glathe" To: mathias.nyman@intel.com Subject: [PATCH] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 30 Aug 2022 16:31:47 +0000 Message-Id: Reply-To: "Jens Glathe" User-Agent: eM_Client/9.1.2109.0 MIME-Version: 1.0 X-Antivirus: Avast (VPS 220830-6, 30.8.2022), Outbound message X-Antivirus-Status: Clean X-Provags-ID: V03:K1:06BnlqnG/Q1vMM+tYaQjtE+/EPWOxCcUeMYUonqvD1llIz9ZNbH OR1yJNab236L7Jzf8y8knJbfR8e16B1nv0/JXRL8QED6YjNvgIWaQ99fL7Kvqv8ttO4eejE DohW2pBGGg5beePDEBNp+JTyKt0/5ovl1WEHPLD6ge3xkNdLovio+h3zvsOa3ZiPHoCVnbO 4HxMO8J+N/rWQ9LMn88jQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:2KGciDdT2wc=:ct5ZKgbBHpmYjwhpkOVLK7 iEcr+HA9Z2b8SFqfgkP4gIXozO9+Cogf9b2K/XDau+PONNdF7pud51q4pCo6F1np8yQZx5P3g YH6OPN+RlCcAegv72oubPRVCdYXH51zOH/MgAqIpPIaCt0iKVrChM/2GC7kOE6hXgzaZxjkTS ke3QRMtxWWuOCUTeaIn97p4+diVFFmy5Lz+RBAS0Oj2GcQObHesoSLBRgYzG4EFExs4zEAUfl 5VZh3QyzZ7eBWAzgyubnMph3/ESQzxlUyNluX/B+qSW5vb3+D2M0/pMe6Mhaj6cbCAnZHJ2Bl dGuuHAKteSd744nsfgT4LbPj2aMi0mguXHLFIEi9BBHYKqkPw7xOu2lomvNZ0RSPXGNq+k3tC jYHbAFuV0pG+p2r2WAjzQBxftytACgMgjEpWKVFxK9jRiilsciEeEP33icOVNxM3ffJvMVMgP cZX/yBn3onDQM1OfeII+MYEVeHBHV6XPP3qgKCIqS+10QPRt3Bw6QQgCnYyLVIrB18mq+TO0D PDYB0mbvQAOd+zwGpEzaIm6pjR2yv54Ia5y2adXXw1dVdtEsBMwwxPO+CQgAL09xDTA6Px79w eEXmVuZZdPWgEYFAM8IJzNZl57mR5cywmHDks+l9L3t0X/2rGH1VjcEhB2p/t5GBUwms96Y7q T4TBe78JqyULGXdJRNkyru6GHcDN1ajXNwUtV/oUX1Vd6DEsF1+vo59lg3nYHOhuLJNE/ACqX jEyPM6I8r1oIzYIf9YeL1dk0q5CNDP2xefhPYnwQRFSnSsOuviHnZbmROmQ= Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Hi there, first 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. wiith best regards Jens Glathe From eac3410eeaf03c111add4dce247c4002fc58ba5d Mon Sep 17 00:00:00 2001 From: Jens Glathe 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
; 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. --- drivers/usb/host/xhci-pci.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c index dce6c0ec8d34..035229bc6d29 100644 --- a/drivers/usb/host/xhci-pci.c +++ b/drivers/usb/host/xhci-pci.c @@ -306,8 +306,14 @@ 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;