aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/uhci-hcd.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2007-12-06 14:47:08 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2007-12-17 13:47:15 -0500
commit442258e2ff69276ff767f3703b30ce6a31fdd181 (patch)
treedf533130d4736a01242a27c7c3278efc5df26b1f /drivers/usb/host/uhci-hcd.c
parentd48bd977e0dd8c17081d12242bfc09d743ea0d26 (diff)
USB: use IRQF_DISABLED for HCD interrupt handlers
Host controller IRQs are supposed to be serviced with interrupts disabled. This patch (as1026) adds an IRQF_DISABLED flag to all the controller drivers that lack it. It also replaces the spin_lock_irqsave() and spin_unlock_irqrestore() calls in uhci_irq() with simple spin_lock() and spin_unlock(). This fixes Bugzilla #9335. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/uhci-hcd.c')
-rw-r--r--drivers/usb/host/uhci-hcd.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
index 4db17f75f4f1..ec987897b8ed 100644
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -378,7 +378,6 @@ static irqreturn_t uhci_irq(struct usb_hcd *hcd)
378{ 378{
379 struct uhci_hcd *uhci = hcd_to_uhci(hcd); 379 struct uhci_hcd *uhci = hcd_to_uhci(hcd);
380 unsigned short status; 380 unsigned short status;
381 unsigned long flags;
382 381
383 /* 382 /*
384 * Read the interrupt status, and write it back to clear the 383 * Read the interrupt status, and write it back to clear the
@@ -398,7 +397,7 @@ static irqreturn_t uhci_irq(struct usb_hcd *hcd)
398 dev_err(uhci_dev(uhci), "host controller process " 397 dev_err(uhci_dev(uhci), "host controller process "
399 "error, something bad happened!\n"); 398 "error, something bad happened!\n");
400 if (status & USBSTS_HCH) { 399 if (status & USBSTS_HCH) {
401 spin_lock_irqsave(&uhci->lock, flags); 400 spin_lock(&uhci->lock);
402 if (uhci->rh_state >= UHCI_RH_RUNNING) { 401 if (uhci->rh_state >= UHCI_RH_RUNNING) {
403 dev_err(uhci_dev(uhci), 402 dev_err(uhci_dev(uhci),
404 "host controller halted, " 403 "host controller halted, "
@@ -415,16 +414,16 @@ static irqreturn_t uhci_irq(struct usb_hcd *hcd)
415 * pending unlinks */ 414 * pending unlinks */
416 mod_timer(&hcd->rh_timer, jiffies); 415 mod_timer(&hcd->rh_timer, jiffies);
417 } 416 }
418 spin_unlock_irqrestore(&uhci->lock, flags); 417 spin_unlock(&uhci->lock);
419 } 418 }
420 } 419 }
421 420
422 if (status & USBSTS_RD) 421 if (status & USBSTS_RD)
423 usb_hcd_poll_rh_status(hcd); 422 usb_hcd_poll_rh_status(hcd);
424 else { 423 else {
425 spin_lock_irqsave(&uhci->lock, flags); 424 spin_lock(&uhci->lock);
426 uhci_scan_schedule(uhci); 425 uhci_scan_schedule(uhci);
427 spin_unlock_irqrestore(&uhci->lock, flags); 426 spin_unlock(&uhci->lock);
428 } 427 }
429 428
430 return IRQ_HANDLED; 429 return IRQ_HANDLED;