Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74940
b: refs/heads/master
c: 565227c
h: refs/heads/master
v: v3
  • Loading branch information
Benjamin Herrenschmidt authored and Greg Kroah-Hartman committed Dec 17, 2007
1 parent 225d779 commit 984d750
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 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: 08cbc706acd2dd601b0663e28fa97ffb0564e105
refs/heads/master: 565227c08226e458da191518251dbff6831624c2
23 changes: 13 additions & 10 deletions trunk/drivers/usb/host/ohci-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -732,24 +732,27 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd)
struct ohci_regs __iomem *regs = ohci->regs;
int ints;

/* we can eliminate a (slow) ohci_readl()
* if _only_ WDH caused this irq
/* Read interrupt status (and flush pending writes). We ignore the
* optimization of checking the LSB of hcca->done_head; it doesn't
* work on all systems (edge triggering for OHCI can be a factor).
*/
if ((ohci->hcca->done_head != 0)
&& ! (hc32_to_cpup (ohci, &ohci->hcca->done_head)
& 0x01)) {
ints = OHCI_INTR_WDH;
ints = ohci_readl(ohci, &regs->intrstatus);

/* cardbus/... hardware gone before remove() */
} else if ((ints = ohci_readl (ohci, &regs->intrstatus)) == ~(u32)0) {
/* Check for an all 1's result which is a typical consequence
* of dead, unclocked, or unplugged (CardBus...) devices
*/
if (ints == ~(u32)0) {
disable (ohci);
ohci_dbg (ohci, "device removed!\n");
return IRQ_HANDLED;
}

/* We only care about interrupts that are enabled */
ints &= ohci_readl(ohci, &regs->intrenable);

/* interrupt for some other device? */
} else if ((ints &= ohci_readl (ohci, &regs->intrenable)) == 0) {
if (ints == 0)
return IRQ_NOTMINE;
}

if (ints & OHCI_INTR_UE) {
// e.g. due to PCI Master/Target Abort
Expand Down

0 comments on commit 984d750

Please sign in to comment.