Greg:
This patch fixes two small problems in the port suspend/resume handling
for the UHCI driver. There were a couple of spots where I neglected to
store I/O addresses in unsigned _long_ variables (required for 64-bit
architectures). And it turns out the host controller will continue to
indicate a resume is in progress for a few microseconds after it has been
turned off, so an extra delay is needed.
Please apply.
Alan Stern
Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
===== drivers/usb/host/uhci-hub.c 1.15 vs edited =====
--- 1.15/drivers/usb/host/uhci-hub.c 2004-11-05 13:06:32 -05:00
+++ edited/drivers/usb/host/uhci-hub.c 2004-12-01 17:06:25 -05:00
@@ -69,7 +69,7 @@
* FIXME: Synchronize access to these fields by a spinlock.
*/
static void uhci_finish_suspend(struct uhci_hcd *uhci, int port,
- unsigned int port_addr)
+ unsigned long port_addr)
{
int status;
@@ -78,13 +78,19 @@
clear_bit(port, &uhci->suspended_ports);
clear_bit(port, &uhci->resuming_ports);
set_bit(port, &uhci->port_c_suspend);
+
+ /* The controller won't actually turn off the RD bit until
+ * it has had a chance to send a low-speed EOP sequence,
+ * which takes 3 bit times (= 2 microseconds). We'll delay
+ * slightly longer for good luck. */
+ udelay(4);
}
}
static void uhci_check_resume(struct uhci_hcd *uhci)
{
unsigned int port;
- unsigned int port_addr;
+ unsigned long port_addr;
for (port = 0; port < uhci->rh_numports; ++port) {
port_addr = uhci->io_addr + USBPORTSC1 + 2 * port;
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel