]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/usb/host/xhci-ring.c
xhci: fix 10 second timeout on removal of PCI hotpluggable xhci controllers
[karo-tx-linux.git] / drivers / usb / host / xhci-ring.c
index db0f0831b94fc2d0c86f270134058a78974cbbdd..2b63969c2bbf8e5f202cb99d3d5c13e5e6f0d502 100644 (file)
@@ -4008,7 +4008,8 @@ static int queue_command(struct xhci_hcd *xhci, struct xhci_command *cmd,
        int reserved_trbs = xhci->cmd_ring_reserved_trbs;
        int ret;
 
-       if (xhci->xhc_state) {
+       if ((xhci->xhc_state & XHCI_STATE_DYING) ||
+               (xhci->xhc_state & XHCI_STATE_HALTED)) {
                xhci_dbg(xhci, "xHCI dying or halted, can't queue_command\n");
                return -ESHUTDOWN;
        }