Re: HC died

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

 



On 24.2.2023 15.16, Seth Bollinger wrote:
xhci driver does exactly this, but fails to stop the command ring while
trying to abort the command TRB.

Does increasing the timeout for stopping command ring help?

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index f5b0e1ce22af..6cecbca34cca 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -397,7 +397,7 @@ static int xhci_abort_cmd_ring(struct xhci_hcd *xhci, unsigned long flags)
           * and try to recover a -ETIMEDOUT with a host controller reset.
           */
          ret = xhci_handshake(&xhci->op_regs->cmd_ring,
-                       CMD_RING_RUNNING, 0, 5 * 1000 * 1000);
+                       CMD_RING_RUNNING, 0, 10 * 1000 * 1000);
          if (ret < 0) {
                  xhci_err(xhci, "Abort failed to stop command ring: %d\n", ret);
                  xhci_halt(xhci);

Well, for us it doesn't really help as it still ends the life of the
HC, but it doesn't solve the issue either (you can see the 10 second
timeout here).

Ok, thanks, seems that aborting the ring does not work either.

When you earlier bumped the command ring timeout did you notice if
transfer TRBs for other devices were completing normally while waiting
for the address device command TRB to complete?

If so then it could make sense to just increase the XHCI_CMD_DEFAULT_TIMEOUT
for the address device commands to 10 seconds

This can probably be quickly tested by moving a USB mouse while triggering the
address device timeout.

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