Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: xhci: Check if the host controller died in IRQ handler.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Sarah Sharp and committed by
Greg Kroah-Hartman
fcf8f576 d3512f63

+4
+4
drivers/usb/host/xhci-hcd.c
··· 277 277 /* Check if the xHC generated the interrupt, or the irq is shared */ 278 278 temp = xhci_readl(xhci, &xhci->op_regs->status); 279 279 temp2 = xhci_readl(xhci, &xhci->ir_set->irq_pending); 280 + if (temp == 0xffffffff && temp2 == 0xffffffff) 281 + goto hw_died; 282 + 280 283 if (!(temp & STS_EINT) && !ER_IRQ_PENDING(temp2)) { 281 284 spin_unlock(&xhci->lock); 282 285 return IRQ_NONE; ··· 297 294 if (temp & STS_FATAL) { 298 295 xhci_warn(xhci, "WARNING: Host System Error\n"); 299 296 xhci_halt(xhci); 297 + hw_died: 300 298 xhci_to_hcd(xhci)->state = HC_STATE_HALT; 301 299 spin_unlock(&xhci->lock); 302 300 return -ESHUTDOWN;