Skip to content

Commit

Permalink
xHCI: release spinlock when setup interrupt
Browse files Browse the repository at this point in the history
Jiri Slaby reports spinlock is held while calling kmalloc(GFP_KERNEL)
and request_irq() in xhci_resume().

Release the spinlock when setup interrupt.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andiry Xu <andiry.xu@amd.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
  • Loading branch information
Andiry Xu authored and Sarah Sharp committed Nov 11, 2010
1 parent 241b652 commit 74bb844
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/usb/host/xhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
return retval;
}

spin_unlock_irq(&xhci->lock);
/* Re-setup MSI-X */
if (hcd->irq)
free_irq(hcd->irq, hcd);
Expand All @@ -736,6 +737,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
hcd->irq = pdev->irq;
}

spin_lock_irq(&xhci->lock);
/* step 4: set Run/Stop bit */
command = xhci_readl(xhci, &xhci->op_regs->command);
command |= CMD_RUN;
Expand Down

0 comments on commit 74bb844

Please sign in to comment.