diff options
| author | David Brownell <david-b@pacbell.net> | 2002-06-21 01:11:45 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2002-06-21 01:11:45 -0700 |
| commit | fd4a6fd1869a128dd4dcb983937b2b59500894d8 (patch) | |
| tree | e2e6f601e448ea62c5d50092d232cd9589f37f40 /drivers/usb | |
| parent | 2ffe5f2f17d6698d1b0e78c43a4b9eb91426340d (diff) | |
[PATCH] ohci-hcd cardbus unplug
This is the 2.5 version of that 2.4 patch I sent recently,
which makes the OHCI driver behave usably on at least
some cardbus systems when the card is just ejected without
a clean shutdown.
Diffstat (limited to 'drivers/usb')
| -rw-r--r-- | drivers/usb/host/ohci-dbg.c | 2 | ||||
| -rw-r--r-- | drivers/usb/host/ohci-hcd.c | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/drivers/usb/host/ohci-dbg.c b/drivers/usb/host/ohci-dbg.c index b6aba6fb9c49..1d9bd9c37300 100644 --- a/drivers/usb/host/ohci-dbg.c +++ b/drivers/usb/host/ohci-dbg.c @@ -190,6 +190,8 @@ static void ohci_dump_roothub (struct ohci_hcd *controller, int verbose) __u32 temp, ndp, i; temp = roothub_a (controller); + if (temp == ~(u32)0) + return; ndp = (temp & RH_A_NDP); if (verbose) { diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index bfd4bc4315d6..db4276ead92c 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -502,11 +502,19 @@ static void ohci_irq (struct usb_hcd *hcd) if ((ohci->hcca->done_head != 0) && ! (le32_to_cpup (&ohci->hcca->done_head) & 0x01)) { ints = OHCI_INTR_WDH; - } else if ((ints = (readl (®s->intrstatus) - & readl (®s->intrenable))) == 0) { + + /* cardbus/... hardware gone before remove() */ + } else if ((ints = readl (®s->intrstatus)) == ~(u32)0) { + ohci->disabled++; + err ("%s device removed!", hcd->self.bus_name); + return; + + /* interrupt for some other device? */ + } else if ((ints &= readl (®s->intrenable)) == 0) { return; } + // dbg ("Interrupt: %x frame: %x", ints, le16_to_cpu (ohci->hcca->frame_no)); if (ints & OHCI_INTR_UE) { |
