• Sarah Sharp's avatar
    USB: xhci: Handle canceled URBs when HC dies. · e34b2fbf
    Sarah Sharp authored
    When the host controller dies (e.g. it is removed from a PCI card slot),
    the xHCI driver cannot expect commands to complete.  The buggy code this
    patch fixes would mark an URB as canceled and then expect the URB to be
    completed when the stop endpoint command completed.  That would never
    happen if the host controller was dead, so the USB core would just hang in
    the disconnect code.
    
    If the host controller died, and the driver asks to cancel an URB, free
    any structures associated with that URB and immediately give it back.
    Signed-off-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    e34b2fbf
xhci-hcd.c 54.2 KB