aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/uhci-hub.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/uhci-hub.c')
-rw-r--r--drivers/usb/host/uhci-hub.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/host/uhci-hub.c b/drivers/usb/host/uhci-hub.c
index fc34fee2ab07..13652de52203 100644
--- a/drivers/usb/host/uhci-hub.c
+++ b/drivers/usb/host/uhci-hub.c
@@ -54,6 +54,9 @@ static int uhci_hub_status_data(struct usb_hcd *hcd, char *buf)
54 struct uhci_hcd *uhci = hcd_to_uhci(hcd); 54 struct uhci_hcd *uhci = hcd_to_uhci(hcd);
55 int port; 55 int port;
56 56
57 if (uhci->hc_inaccessible)
58 return 0;
59
57 *buf = 0; 60 *buf = 0;
58 for (port = 0; port < uhci->rh_numports; ++port) { 61 for (port = 0; port < uhci->rh_numports; ++port) {
59 if ((inw(uhci->io_addr + USBPORTSC1 + port * 2) & RWC_BITS) || 62 if ((inw(uhci->io_addr + USBPORTSC1 + port * 2) & RWC_BITS) ||
@@ -150,6 +153,9 @@ static int uhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
150 u16 wPortChange, wPortStatus; 153 u16 wPortChange, wPortStatus;
151 unsigned long flags; 154 unsigned long flags;
152 155
156 if (uhci->hc_inaccessible)
157 return -ETIMEDOUT;
158
153 spin_lock_irqsave(&uhci->lock, flags); 159 spin_lock_irqsave(&uhci->lock, flags);
154 switch (typeReq) { 160 switch (typeReq) {
155 161