mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Jens Glathe <jens.glathe@oldschoolsolutions.biz>,
	mathias.nyman@intel.com
Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix: add XHCI_SPURIOUS_SUCCESS to ASM1042 despite being a V0.96 controller
Date: Mon, 26 Sep 2022 14:31:42 +0300	[thread overview]
Message-ID: <c1857a88-2303-43d7-5539-37afd2401a12@linux.intel.com> (raw)
In-Reply-To: <20220925172236.2288-1-jens.glathe@oldschoolsolutions.biz>

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

  parent reply	other threads:[~2022-09-26 13:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-25 17:22 Jens Glathe
2022-09-26  8:37 ` Greg KH
2022-09-26 11:31 ` Mathias Nyman [this message]
2022-09-26 12:25   ` Re[2]: " Jens Glathe
2022-09-26 15:18   ` Alan Stern
     [not found] <20220830160035.10333-1-jens.glathe@oldschoolsolutions.biz>
2022-09-22 12:00 ` Greg KH
     [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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c1857a88-2303-43d7-5539-37afd2401a12@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jens.glathe@oldschoolsolutions.biz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®