linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller
@ 2022-09-24  8:16 Jens Glathe
  2022-09-24  8:47 ` Greg KH
  0 siblings, 1 reply; 9+ messages in thread
From: Jens Glathe @ 2022-09-24  8:16 UTC (permalink / raw)
  To: mathias.nyman; +Cc: gregkh, linux-usb, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 612 bytes --]

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

[-- Attachment #2: 0001-fix-add-XHCI_SPURIOUS_SUCCESS-to-ASM1042-despite-bei.patch --]
[-- Type: text/plain, Size: 1614 bytes --]

From ffb3a70a48b91b79943a0131ddd470e5f09c0f41 Mon Sep 17 00:00:00 2001
From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
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@oldschoolsolutions.biz>
---
 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


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

* Re: [PATCH v2] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller
  2022-09-24  8:16 [PATCH v2] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller Jens Glathe
@ 2022-09-24  8:47 ` Greg KH
  2022-09-25  7:50   ` Re[2]: " Jens Glathe
  0 siblings, 1 reply; 9+ messages in thread
From: Greg KH @ 2022-09-24  8:47 UTC (permalink / raw)
  To: Jens Glathe; +Cc: mathias.nyman, linux-usb, linux-kernel

On Sat, Sep 24, 2022 at 08:16:34AM +0000, Jens Glathe wrote:
> 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@oldschoolsolutions.biz>
> 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@oldschoolsolutions.biz>
> ---
>  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
> 

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch contains warnings and/or errors noticed by the
  scripts/checkpatch.pl tool.

- Your patch was attached, please place it inline so that it can be
  applied directly from the email message itself.

- This looks like a new version of a previously submitted patch, but you
  did not list below the --- line any changes from the previous version.
  Please read the section entitled "The canonical patch format" in the
  kernel file, Documentation/SubmittingPatches for what needs to be done
  here to properly describe this.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

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

* Re[2]: [PATCH v2] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller
  2022-09-24  8:47 ` Greg KH
@ 2022-09-25  7:50   ` Jens Glathe
  2022-09-25  8:07     ` Greg KH
  0 siblings, 1 reply; 9+ messages in thread
From: Jens Glathe @ 2022-09-25  7:50 UTC (permalink / raw)
  To: Greg KH; +Cc: mathias.nyman, linux-usb, linux-kernel

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". I also 
got some about proper indentation... what now? Anyway. I have 
reformatted the whole section that replaces the three lines, all tab 
indents. Script/bot doesn't really like it, but looks proper to me as a 
coder.
Anyway, the issue at hand is a bit bigger. I installed mutt and git-mail 
on the dev machine, and it actually works. But guess what, when I want 
to mail out the patch to the maintainers, it gets rejected by the mailer 
daemon (not on my machine, some MTA on the way) because 1und1 (my isp 
where the email address I use is registered) has a low reputation and 
gets blacklisted. So I go and use the eMClient on my Windows machine and 
attach the patch file... I could do an uuencode and copy/paste the text, 
maybe next time.
Also, I happen to not understand this patch and patch resend business, 
apparrently. I tried to fix all check errors of scripts/checkpatch.pl, 
and amended my commit in my branch (apparrently this). So this is still 
one commit... and the patch is one patch that should go into an upstream 
commit... and that should be it.
To conclude,

- I tried to fix the format
- I can't fix the other MTA (and I won't go out and get employed at 
intel or something to have a respectable email address)
- I don't understand this resubmit business.

Can you please help? In the meantime I will re-read "The canonical patch 
format" for further insight.

with best regards

Jens Glathe


------ Originalnachricht ------
Von "Greg KH" <gregkh@linuxfoundation.org>
An "Jens Glathe" <jens.glathe@oldschoolsolutions.biz>
Cc mathias.nyman@intel.com; linux-usb@vger.kernel.org; 
linux-kernel@vger.kernel.org
Datum 24.09.2022 10:47:48
Betreff Re: [PATCH v2] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite 
being a V0.96 controller

>On Sat, Sep 24, 2022 at 08:16:34AM +0000, Jens Glathe wrote:
>>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@oldschoolsolutions.biz>
>>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@oldschoolsolutions.biz>
>>---
>>  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
>>
>
>Hi,
>
>This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
>a patch that has triggered this response.  He used to manually respond
>to these common problems, but in order to save his sanity (he kept
>writing the same thing over and over, yet to different people), I was
>created.  Hopefully you will not take offence and will fix the problem
>in your patch and resubmit it so that it can be accepted into the Linux
>kernel tree.
>
>You are receiving this message because of the following common error(s)
>as indicated below:
>
>- Your patch contains warnings and/or errors noticed by the
>  scripts/checkpatch.pl tool.
>
>- Your patch was attached, please place it inline so that it can be
>  applied directly from the email message itself.
>
>- This looks like a new version of a previously submitted patch, but you
>  did not list below the --- line any changes from the previous version.
>  Please read the section entitled "The canonical patch format" in the
>  kernel file, Documentation/SubmittingPatches for what needs to be done
>  here to properly describe this.
>
>If you wish to discuss this problem further, or you have questions about
>how to resolve this issue, please feel free to respond to this email and
>Greg will reply once he has dug out from the pending patches received
>from other developers.
>
>thanks,
>
>greg k-h's patch email bot

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

* Re: [PATCH v2] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller
  2022-09-25  7:50   ` Re[2]: " Jens Glathe
@ 2022-09-25  8:07     ` Greg KH
  2022-09-25 10:02       ` Re[2]: " Jens Glathe
  0 siblings, 1 reply; 9+ messages in thread
From: Greg KH @ 2022-09-25  8:07 UTC (permalink / raw)
  To: Jens Glathe; +Cc: mathias.nyman, linux-usb, linux-kernel

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

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

* Re[2]: [PATCH v2] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller
  2022-09-25  8:07     ` Greg KH
@ 2022-09-25 10:02       ` Jens Glathe
  2022-09-25 10:07         ` Greg KH
  0 siblings, 1 reply; 9+ messages in thread
From: Jens Glathe @ 2022-09-25 10:02 UTC (permalink / raw)
  To: Greg KH; +Cc: mathias.nyman, linux-usb, linux-kernel

Yep, found it. Them pesky editors...

thanks,

Jens Glathe

---

From 8d6e467569118b83a4622edf09768ba20aef5086 Mon Sep 17 00:00:00 2001
From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
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@oldschoolsolutions.biz>
---
  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@linuxfoundation.org>
An "Jens Glathe" <jens.glathe@oldschoolsolutions.biz>
Cc mathias.nyman@intel.com; linux-usb@vger.kernel.org; 
linux-kernel@vger.kernel.org
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

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

* Re: [PATCH v2] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller
  2022-09-25 10:02       ` Re[2]: " Jens Glathe
@ 2022-09-25 10:07         ` Greg KH
  2022-09-25 10:21           ` Re[2]: " Jens Glathe
  0 siblings, 1 reply; 9+ messages in thread
From: Greg KH @ 2022-09-25 10:07 UTC (permalink / raw)
  To: Jens Glathe; +Cc: mathias.nyman, linux-usb, linux-kernel

On Sun, Sep 25, 2022 at 10:02:53AM +0000, Jens Glathe wrote:
> Yep, found it. Them pesky editors...
> 
> thanks,
> 
> Jens Glathe
> 
> ---
> 
> > From 8d6e467569118b83a4622edf09768ba20aef5086 Mon Sep 17 00:00:00 2001
> From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
> 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@oldschoolsolutions.biz>
> ---
>  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


Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch is malformed (tabs converted to spaces, linewrapped, etc.)
  and can not be applied.  Please read the file,
  Documentation/email-clients.txt in order to fix this.

- Your patch was attached, please place it inline so that it can be
  applied directly from the email message itself.

- This looks like a new version of a previously submitted patch, but you
  did not list below the --- line any changes from the previous version.
  Please read the section entitled "The canonical patch format" in the
  kernel file, Documentation/SubmittingPatches for what needs to be done
  here to properly describe this.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot

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

* Re[2]: [PATCH v2] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller
  2022-09-25 10:07         ` Greg KH
@ 2022-09-25 10:21           ` Jens Glathe
  2022-09-25 10:34             ` Greg KH
  0 siblings, 1 reply; 9+ messages in thread
From: Jens Glathe @ 2022-09-25 10:21 UTC (permalink / raw)
  To: Greg KH; +Cc: mathias.nyman, linux-usb, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 3828 bytes --]

... and this is the moment where I append the patch file in hope that 
this somehow works.

with best regards

Jens Glathe

------ Originalnachricht ------
Von "Greg KH" <gregkh@linuxfoundation.org>
An "Jens Glathe" <jens.glathe@oldschoolsolutions.biz>
Cc mathias.nyman@intel.com; linux-usb@vger.kernel.org; 
linux-kernel@vger.kernel.org
Datum 25.09.2022 12:07:15
Betreff Re: [PATCH v2] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite 
being a V0.96 controller

>On Sun, Sep 25, 2022 at 10:02:53AM +0000, Jens Glathe wrote:
>>Yep, found it. Them pesky editors...
>>
>>thanks,
>>
>>Jens Glathe
>>
>>---
>>
>> > From 8d6e467569118b83a4622edf09768ba20aef5086 Mon Sep 17 00:00:00 2001
>>From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
>>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@oldschoolsolutions.biz>
>>---
>>  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
>
>
>Hi,
>
>This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
>a patch that has triggered this response.  He used to manually respond
>to these common problems, but in order to save his sanity (he kept
>writing the same thing over and over, yet to different people), I was
>created.  Hopefully you will not take offence and will fix the problem
>in your patch and resubmit it so that it can be accepted into the Linux
>kernel tree.
>
>You are receiving this message because of the following common error(s)
>as indicated below:
>
>- Your patch is malformed (tabs converted to spaces, linewrapped, etc.)
>  and can not be applied.  Please read the file,
>  Documentation/email-clients.txt in order to fix this.
>
>- Your patch was attached, please place it inline so that it can be
>  applied directly from the email message itself.
>
>- This looks like a new version of a previously submitted patch, but you
>  did not list below the --- line any changes from the previous version.
>  Please read the section entitled "The canonical patch format" in the
>  kernel file, Documentation/SubmittingPatches for what needs to be done
>  here to properly describe this.
>
>If you wish to discuss this problem further, or you have questions about
>how to resolve this issue, please feel free to respond to this email and
>Greg will reply once he has dug out from the pending patches received
>from other developers.
>
>thanks,
>
>greg k-h's patch email bot

[-- Attachment #2: 0001-fix-add-XHCI_SPURIOUS_SUCCESS-to-ASM1042-despite-bei.patch --]
[-- Type: text/plain, Size: 1463 bytes --]

From 8d6e467569118b83a4622edf09768ba20aef5086 Mon Sep 17 00:00:00 2001
From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
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@oldschoolsolutions.biz>
---
 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


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

* Re: [PATCH v2] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller
  2022-09-25 10:21           ` Re[2]: " Jens Glathe
@ 2022-09-25 10:34             ` Greg KH
  2022-09-25 17:26               ` Re[2]: " Jens Glathe
  0 siblings, 1 reply; 9+ messages in thread
From: Greg KH @ 2022-09-25 10:34 UTC (permalink / raw)
  To: Jens Glathe; +Cc: mathias.nyman, linux-usb, linux-kernel

On Sun, Sep 25, 2022 at 10:21:39AM +0000, Jens Glathe wrote:
> ... and this is the moment where I append the patch file in hope that this
> somehow works.

I can't take attachments, sorry.  Try using 'git send-email' to get this
to work properly.  This guide might help you out with that:
	https://git-send-email.io/

Also look at your subject line and try to match it up with how other
commits for this driver/file are done, it needs to be tweaked a bit.

thanks,

greg k-h

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

* Re[2]: [PATCH v2] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller
  2022-09-25 10:34             ` Greg KH
@ 2022-09-25 17:26               ` Jens Glathe
  0 siblings, 0 replies; 9+ messages in thread
From: Jens Glathe @ 2022-09-25 17:26 UTC (permalink / raw)
  To: Greg KH; +Cc: mathias.nyman, linux-usb, linux-kernel

Hi there,

thank you for the hint. Got it working on vpenguin with removing 
sendmail :) https://git-send-email.io/ is great.

with best regards

Jens Glathe

------ Originalnachricht ------
Von "Greg KH" <gregkh@linuxfoundation.org>
An "Jens Glathe" <jens.glathe@oldschoolsolutions.biz>
Cc mathias.nyman@intel.com; linux-usb@vger.kernel.org; 
linux-kernel@vger.kernel.org
Datum 25.09.2022 12:34:34
Betreff Re: [PATCH v2] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite 
being a V0.96 controller

>On Sun, Sep 25, 2022 at 10:21:39AM +0000, Jens Glathe wrote:
>>... and this is the moment where I append the patch file in hope that this
>>somehow works.
>
>I can't take attachments, sorry.  Try using 'git send-email' to get this
>to work properly.  This guide might help you out with that:
>https://git-send-email.io/
>
>Also look at your subject line and try to match it up with how other
>commits for this driver/file are done, it needs to be tweaked a bit.
>
>thanks,
>
>greg k-h

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

end of thread, other threads:[~2022-09-25 17:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-24  8:16 [PATCH v2] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller Jens Glathe
2022-09-24  8:47 ` Greg KH
2022-09-25  7:50   ` Re[2]: " Jens Glathe
2022-09-25  8:07     ` Greg KH
2022-09-25 10:02       ` Re[2]: " Jens Glathe
2022-09-25 10:07         ` Greg KH
2022-09-25 10:21           ` Re[2]: " Jens Glathe
2022-09-25 10:34             ` Greg KH
2022-09-25 17:26               ` Re[2]: " 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).