aboutsummaryrefslogtreecommitdiffstats
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 17:43:43 -0400
commita8bed8b6be75bc5a46aa599ab360d5f1db291c8f (patch)
treeef6375ec4109d670f95ee0f8481543d10d5c4a5e /drivers/usb/host/uhci-hub.c
parentc8f4fe4358c5e0a79b4bd47b814d19f1d1d06f21 (diff)
[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)
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