linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Mathias Nyman <mathias.nyman@linux.intel.com>
Cc: Ard Biesheuvel <ardb@kernel.org>,
	linux-usb <linux-usb@vger.kernel.org>,
	Mathias Nyman <mathias.nyman@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] xhci: enable XHCI_TRUST_TX_LENGTH quirk for ThunderX2 builtin hosts
Date: Wed, 27 Nov 2019 17:16:23 +0100	[thread overview]
Message-ID: <CAKv+Gu8Rgmn9EywOOY6niKwN40v8sNLDZq3eHapB7pUo_-JHtA@mail.gmail.com> (raw)
In-Reply-To: <b9f82108-edd8-d701-4a4f-f5d0e918d863@linux.intel.com>

On Wed, 27 Nov 2019 at 16:56, Mathias Nyman
<mathias.nyman@linux.intel.com> wrote:
>
> On 27.11.2019 17.30, Ard Biesheuvel wrote:
> > When using a USB webcam on a ThunderX2 workstation, the kernel log
> > gets flooded with messages like
> >
> >    xhci_hcd 0000:00:0f.0:
> >    WARN Successful completion on short TX for slot 7 ep 2: needs XHCI_TRUST_TX_LENGTH quirk?
> >
> > Enabling the quirk manually makes the issue go away, so let's enable
> > it unconditionally for this hardware.
> >
>
> This issue starts to be common for many vendors, many report successful
> completions after a initial short transfer in a TD
>
> Does the patch below help in your case? It worked for a Renesas controller
> with similar issues. It's a more generic solution.
>
> diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
> index 9ebaa8e132a9..d23f7408c81f 100644
> --- a/drivers/usb/host/xhci-ring.c
> +++ b/drivers/usb/host/xhci-ring.c
> @@ -2381,7 +2381,8 @@ static int handle_tx_event(struct xhci_hcd *xhci,
>          case COMP_SUCCESS:
>                  if (EVENT_TRB_LEN(le32_to_cpu(event->transfer_len)) == 0)
>                          break;
> -               if (xhci->quirks & XHCI_TRUST_TX_LENGTH)
> +               if (xhci->quirks & XHCI_TRUST_TX_LENGTH ||
> +                   ep_ring->last_td_was_short)
>                          trb_comp_code = COMP_SHORT_PACKET;
>                  else
>                          xhci_warn_ratelimited(xhci,

Yes, that works too. If you roll that into a patch

Tested-by: Ard Biesheuvel <ardb@kernel.org>

and please consider cc'ing stable as well.

  reply	other threads:[~2019-11-27 16:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-27 15:30 [PATCH] xhci: enable XHCI_TRUST_TX_LENGTH quirk for ThunderX2 builtin hosts Ard Biesheuvel
2019-11-27 15:58 ` Mathias Nyman
2019-11-27 16:16   ` Ard Biesheuvel [this message]
2019-11-28 14:36     ` Mathias Nyman

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=CAKv+Gu8Rgmn9EywOOY6niKwN40v8sNLDZq3eHapB7pUo_-JHtA@mail.gmail.com \
    --to=ard.biesheuvel@linaro.org \
    --cc=ardb@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=mathias.nyman@linux.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;
as well as URLs for NNTP newsgroup(s).