Commit 6fd75b19 authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman

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: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 615ae11b
...@@ -417,6 +417,8 @@ ohci_hub_status_data (struct usb_hcd *hcd, char *buf) ...@@ -417,6 +417,8 @@ ohci_hub_status_data (struct usb_hcd *hcd, char *buf)
unsigned long flags; unsigned long flags;
spin_lock_irqsave (&ohci->lock, flags); spin_lock_irqsave (&ohci->lock, flags);
if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags))
goto done;
/* undocumented erratum seen on at least rev D */ /* undocumented erratum seen on at least rev D */
if ((ohci->flags & OHCI_QUIRK_AMD756) if ((ohci->flags & OHCI_QUIRK_AMD756)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment