ChangeSet 1.2168, 2004/12/09 12:22:49-08:00, [EMAIL PROTECTED] [PATCH] USB UHCI: minor bugfix for port resume
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. Signed-off-by: Alan Stern <[EMAIL PROTECTED]> Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]> drivers/usb/host/uhci-hub.c | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff -Nru a/drivers/usb/host/uhci-hub.c b/drivers/usb/host/uhci-hub.c --- a/drivers/usb/host/uhci-hub.c 2004-12-09 14:54:37 -08:00 +++ b/drivers/usb/host/uhci-hub.c 2004-12-09 14:54:37 -08: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