linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller
       [not found] <20220830160035.10333-1-jens.glathe@oldschoolsolutions.biz>
@ 2022-09-22 12:00 ` Greg KH
  0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2022-09-22 12:00 UTC (permalink / raw)
  To: Jens Glathe; +Cc: mathias.nyman, linux-usb, linux-kernel

On Tue, Aug 30, 2022 at 06:00:35PM +0200, Jens Glathe wrote:
> 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.
> ---
>  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;
> -- 
> 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 does not have a Signed-off-by: line.  Please read the
  kernel file, Documentation/SubmittingPatches and resend it after
  adding that line.  Note, the line needs to be in the body of the
  email, before the patch, not at the bottom of the patch or in the
  email signature.

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] 7+ messages in thread

* Re: [PATCH] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller
  2022-09-26 11:31 ` Mathias Nyman
@ 2022-09-26 15:18   ` Alan Stern
  0 siblings, 0 replies; 7+ messages in thread
From: Alan Stern @ 2022-09-26 15:18 UTC (permalink / raw)
  To: Mathias Nyman; +Cc: Jens Glathe, mathias.nyman, gregkh, linux-usb, linux-kernel

On Mon, Sep 26, 2022 at 02:31:42PM +0300, Mathias Nyman wrote:
> Hi
> 
> Thanks for the patch, some small changes still needed:
> 
> Include subsystem in subject line, something like
> usb: xhci: Add XHCI_SPURIOUS...

And don't forget to include a revision number inside the []'s on the 
Subject line for all revised submissions.

> On 25.9.2022 20.22, Jens Glathe wrote:
> > only if it reports as a V0.96 XHCI controller. Appears to fix the errors

It would be nice if the first sentence (not to mention the later ones) 
of the patch description actually was a complete sentence.  I realize 
that lots of commits don't bother to do this, but IMNSHO they ought to.

> > "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>
> > ---

Likewise, for resubmissions don't forget to include a quick description 
here (just below the "---" line) of how the resubmission differs from 
the earlier versions.

Alan Stern

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

* Re: [PATCH] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller
  2022-09-25 17:22 Jens Glathe
  2022-09-26  8:37 ` Greg KH
@ 2022-09-26 11:31 ` Mathias Nyman
  2022-09-26 15:18   ` Alan Stern
  1 sibling, 1 reply; 7+ messages in thread
From: Mathias Nyman @ 2022-09-26 11:31 UTC (permalink / raw)
  To: Jens Glathe, mathias.nyman; +Cc: gregkh, linux-usb, linux-kernel

Hi

Thanks for the patch, some small changes still needed:

Include subsystem in subject line, something like
usb: xhci: Add XHCI_SPURIOUS...

On 25.9.2022 20.22, Jens Glathe wrote:
> 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)

Do we need this 0x96 check? It's anyway set for 1.0 and newer controllers

> +			xhci->quirks |= XHCI_SPURIOUS_SUCCESS;

This reminds me that I should get rid of this quirk.

If we get a short transfers event for a TRB mid TD, then xhci hosts version 1.0 and later
should send a second event for the last TRB in the TD

so this is default behavior for modern xHCI, not a spurious event.

But your patch is anyways needed for stable kernels.

Thanks
-Mathias

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

* Re: [PATCH] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller
  2022-09-25 17:22 Jens Glathe
@ 2022-09-26  8:37 ` Greg KH
  2022-09-26 11:31 ` Mathias Nyman
  1 sibling, 0 replies; 7+ messages in thread
From: Greg KH @ 2022-09-26  8:37 UTC (permalink / raw)
  To: Jens Glathe; +Cc: mathias.nyman, linux-usb, linux-kernel

On Sun, Sep 25, 2022 at 07:22:37PM +0200, Jens Glathe wrote:
> 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
> 
> ---
> Hi there, a "try again" with git send-email and the corrected patch. Hope this works now.
> 
> with best regards
> 
> Jens Glathe

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:

- You did not write a descriptive Subject: for the patch, allowing Greg,
  and everyone else, to know what this patch is all about.  Please read
  the section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what a proper Subject: line should
  look like.

- 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] 7+ messages in thread

* [PATCH] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller
@ 2022-09-25 17:22 Jens Glathe
  2022-09-26  8:37 ` Greg KH
  2022-09-26 11:31 ` Mathias Nyman
  0 siblings, 2 replies; 7+ messages in thread
From: Jens Glathe @ 2022-09-25 17:22 UTC (permalink / raw)
  To: mathias.nyman; +Cc: gregkh, linux-usb, linux-kernel, Jens Glathe

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

---
Hi there, a "try again" with git send-email and the corrected patch. Hope this works now.

with best regards

Jens Glathe

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

* Re: [PATCH] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller
       [not found] <em007c3aa5-02c9-4a51-b789-6973e5f116ef@607fe812.com>
@ 2022-08-30 16:32 ` Greg KH
  0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2022-08-30 16:32 UTC (permalink / raw)
  To: Jens Glathe; +Cc: mathias.nyman, linux-usb, linux-kernel

On Tue, Aug 30, 2022 at 04:27:42PM +0000, Jens Glathe wrote:
> 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 <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.
> ---
>  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;
> -- 
> 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.

- Your patch does not have a Signed-off-by: line.  Please read the
  kernel file, Documentation/SubmittingPatches and resend it after
  adding that line.  Note, the line needs to be in the body of the
  email, before the patch, not at the bottom of the patch or in the
  email signature.

- You did not specify a description of why the patch is needed, or
  possibly, any description at all, in the email body.  Please read the
  section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what is needed in order to
  properly describe the change.

- You did not write a descriptive Subject: for the patch, allowing Greg,
  and everyone else, to know what this patch is all about.  Please read
  the section entitled "The canonical patch format" in the kernel file,
  Documentation/SubmittingPatches for what a proper Subject: line should
  look like.

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] 7+ messages in thread

* [PATCH] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller
@ 2022-08-30 16:31 Jens Glathe
  0 siblings, 0 replies; 7+ messages in thread
From: Jens Glathe @ 2022-08-30 16:31 UTC (permalink / raw)
  To: mathias.nyman; +Cc: gregkh, linux-usb, linux-kernel

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

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

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

From eac3410eeaf03c111add4dce247c4002fc58ba5d 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.
---
 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;
-- 
2.25.1


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

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20220830160035.10333-1-jens.glathe@oldschoolsolutions.biz>
2022-09-22 12:00 ` [PATCH] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller Greg KH
2022-09-25 17:22 Jens Glathe
2022-09-26  8:37 ` Greg KH
2022-09-26 11:31 ` Mathias Nyman
2022-09-26 15:18   ` Alan Stern
     [not found] <em007c3aa5-02c9-4a51-b789-6973e5f116ef@607fe812.com>
2022-08-30 16:32 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2022-08-30 16:31 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).