Re: [PATCH] xhci: enable XHCI_TRUST_TX_LENGTH quirk for ThunderX2 builtin hosts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27.11.2019 18.16, Ard Biesheuvel wrote:
On Wed, 27 Nov 2019 at 16:56, Mathias Nyman
<mathias.nyman@xxxxxxxxxxxxxxx> 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@xxxxxxxxxx>

and please consider cc'ing stable as well.


Will do, thanks

-Mathias



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux