summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/uhci-hub.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2005-04-09 17:29:00 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-27 14:43:43 -0700
commita8bed8b6be75bc5a46aa599ab360d5f1db291c8f (patch)
treeef6375ec4109d670f95ee0f8481543d10d5c4a5e /drivers/usb/host/uhci-hub.c
parentc8f4fe4358c5e0a79b4bd47b814d19f1d1d06f21 (diff)
downloadlinux-a8bed8b6be75bc5a46aa599ab360d5f1db291c8f.tar.bz2
[PATCH] USB UHCI: Add root-hub suspend/resume support
This patch implements (finally!) separate suspend and resume routines for the root hub and the controller in the UHCI driver. It also changes the sequence used to reset the controller during initial probing, so as to preserve the existing state during a Resume-From-Disk. (This new sequence is what should be used in the PCI Quirks code for early USB handoffs, incidentally.) Lastly it adds a notion of the controller being "inaccessible" while in a PCI low-power state, when normal I/O operations shouldn't be allowed. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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)
struct uhci_hcd *uhci = hcd_to_uhci(hcd);
int port;
+ if (uhci->hc_inaccessible)
+ return 0;
+
*buf = 0;
for (port = 0; port < uhci->rh_numports; ++port) {
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,
u16 wPortChange, wPortStatus;
unsigned long flags;
+ if (uhci->hc_inaccessible)
+ return -ETIMEDOUT;
+
spin_lock_irqsave(&uhci->lock, flags);
switch (typeReq) {