linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] usb: xhci: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller
@ 2022-09-26 19:31 Jens Glathe
  2022-09-28 15:24 ` Mathias Nyman
  0 siblings, 1 reply; 3+ messages in thread
From: Jens Glathe @ 2022-09-26 19:31 UTC (permalink / raw)
  To: mathias.nyman; +Cc: gregkh, linux-usb, linux-kernel, stern, Jens Glathe

This appears to fix the error:
"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.

ASM1042 reports as a 0.96 controller, but appears to behave more like 1.0

Inspred by this email thread: https://markmail.org/thread/7vzqbe7t6du6qsw3

Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
---
 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..ef2df1b01168 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 reports 0.96
+		 * but appears to behave more like 1.0
+		 */
+		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

changes v2->v3

reworked commit text to specify subsystem, hopefully also a better explanation why
removed check for 0x96 controller since the outcome is the same as if xhci->hci_version > 0x96


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] usb: xhci: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller
  2022-09-26 19:31 [PATCH v3] usb: xhci: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller Jens Glathe
@ 2022-09-28 15:24 ` Mathias Nyman
  2022-09-28 16:39   ` Jens Glathe
  0 siblings, 1 reply; 3+ messages in thread
From: Mathias Nyman @ 2022-09-28 15:24 UTC (permalink / raw)
  To: Jens Glathe, mathias.nyman; +Cc: gregkh, linux-usb, linux-kernel, stern

On 26.9.2022 22.31, Jens Glathe wrote:
> This appears to fix the error:
> "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.
> 
> ASM1042 reports as a 0.96 controller, but appears to behave more like 1.0
> 
> Inspred by this email thread: https://markmail.org/thread/7vzqbe7t6du6qsw3
> 
> Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>

Adding this to queue

> ---

In the future, As Alan also pointed out, please list the changes since last version here.

Something like:

changes since v2
  - add subsystem to subject line
  - removed host 0.96 version check

Thanks
-Mathias

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3] usb: xhci: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller
  2022-09-28 15:24 ` Mathias Nyman
@ 2022-09-28 16:39   ` Jens Glathe
  0 siblings, 0 replies; 3+ messages in thread
From: Jens Glathe @ 2022-09-28 16:39 UTC (permalink / raw)
  To: Mathias Nyman; +Cc: mathias.nyman, gregkh, linux-usb, linux-kernel, stern

Thank you, will do. This us part of the mail, not the patch, right?

Von meinem iPhone gesendet

> Am 28.09.2022 um 17:23 schrieb Mathias Nyman <mathias.nyman@linux.intel.com>:
> 
> On 26.9.2022 22.31, Jens Glathe wrote:
>> This appears to fix the error:
>> "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.
>> ASM1042 reports as a 0.96 controller, but appears to behave more like 1.0
>> Inspred by this email thread: https://markmail.org/thread/7vzqbe7t6du6qsw3
>> Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
> 
> Adding this to queue
> 
>> ---
> 
> In the future, As Alan also pointed out, please list the changes since last version here.
> 
> Something like:
> 
> changes since v2
> - add subsystem to subject line
> - removed host 0.96 version check
> 
> Thanks
> -Mathias


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-28 16:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-26 19:31 [PATCH v3] usb: xhci: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller Jens Glathe
2022-09-28 15:24 ` Mathias Nyman
2022-09-28 16:39   ` Jens Glathe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).