CHROMIUM: xhci: fix hung task timeout when rm xhci-hcd
[firefly-linux-kernel-4.4.55.git] / drivers / usb / host / xhci-ring.c
index 62a5c8d5e0280ef1090bb32e9ba2cb0573e1e9b0..3bc2295669c84890cf619af3f904f3efd6572608 100644 (file)
@@ -4033,7 +4033,8 @@ static int queue_command(struct xhci_hcd *xhci, struct xhci_command *cmd,
        int ret;
 
        if ((xhci->xhc_state & XHCI_STATE_DYING) ||
-               (xhci->xhc_state & XHCI_STATE_HALTED)) {
+               (xhci->xhc_state & XHCI_STATE_HALTED) ||
+               (xhci->xhc_state & XHCI_STATE_REMOVING)) {
                xhci_dbg(xhci, "xHCI dying or halted, can't queue_command\n");
                return -ESHUTDOWN;
        }