aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2007-05-04 11:57:00 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-06-08 19:24:31 -0400
commit6fd75b19483b2f6e6619602a535b4939e46921c1 (patch)
treeb558ebc17728b2f92763f3ddc2fa94f54796e8a0 /drivers
parent615ae11b3b4af7a5adb0819ff11b3b764eb92268 (diff)
OHCI: Fix machine check in ohci_hub_status_data
This patch (as901) fixes an oversight in ohci-hcd. The hub_status_data routine must not try to access the controller's memory-mapped registers if the controller is in a low-power state; such attempts will cause a crash on some architectures (such as PPC). Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/ohci-hub.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
index 216c9c9d4d6d..bb9cc595219e 100644
--- a/drivers/usb/host/ohci-hub.c
+++ b/drivers/usb/host/ohci-hub.c
@@ -417,6 +417,8 @@ ohci_hub_status_data (struct usb_hcd *hcd, char *buf)
417 unsigned long flags; 417 unsigned long flags;
418 418
419 spin_lock_irqsave (&ohci->lock, flags); 419 spin_lock_irqsave (&ohci->lock, flags);
420 if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags))
421 goto done;
420 422
421 /* undocumented erratum seen on at least rev D */ 423 /* undocumented erratum seen on at least rev D */
422 if ((ohci->flags & OHCI_QUIRK_AMD756) 424 if ((ohci->flags & OHCI_QUIRK_AMD756)