Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349052
b: refs/heads/master
c: 0f815a0
h: refs/heads/master
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Jan 22, 2013
1 parent f40855f commit 845d769
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ad2e6329666650d9cafcae9ef53fbe09ea759ae2
refs/heads/master: 0f815a0a700bc10547449bde6c106051a035a1b9
15 changes: 9 additions & 6 deletions trunk/drivers/usb/host/uhci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,10 @@ static irqreturn_t uhci_irq(struct usb_hcd *hcd)
return IRQ_NONE;
uhci_writew(uhci, status, USBSTS); /* Clear it */

spin_lock(&uhci->lock);
if (unlikely(!uhci->is_initialized)) /* not yet configured */
goto done;

if (status & ~(USBSTS_USBINT | USBSTS_ERROR | USBSTS_RD)) {
if (status & USBSTS_HSE)
dev_err(uhci_dev(uhci), "host system error, "
Expand All @@ -455,7 +459,6 @@ static irqreturn_t uhci_irq(struct usb_hcd *hcd)
dev_err(uhci_dev(uhci), "host controller process "
"error, something bad happened!\n");
if (status & USBSTS_HCH) {
spin_lock(&uhci->lock);
if (uhci->rh_state >= UHCI_RH_RUNNING) {
dev_err(uhci_dev(uhci),
"host controller halted, "
Expand All @@ -473,15 +476,15 @@ static irqreturn_t uhci_irq(struct usb_hcd *hcd)
* pending unlinks */
mod_timer(&hcd->rh_timer, jiffies);
}
spin_unlock(&uhci->lock);
}
}

if (status & USBSTS_RD)
if (status & USBSTS_RD) {
spin_unlock(&uhci->lock);
usb_hcd_poll_rh_status(hcd);
else {
spin_lock(&uhci->lock);
} else {
uhci_scan_schedule(uhci);
done:
spin_unlock(&uhci->lock);
}

Expand Down Expand Up @@ -662,9 +665,9 @@ static int uhci_start(struct usb_hcd *hcd)
*/
mb();

spin_lock_irq(&uhci->lock);
configure_hc(uhci);
uhci->is_initialized = 1;
spin_lock_irq(&uhci->lock);
start_rh(uhci);
spin_unlock_irq(&uhci->lock);
return 0;
Expand Down

0 comments on commit 845d769

Please sign in to comment.