This is a note to let you know that we have just queued up the patch titled

     Subject: UHCI: fix port resume problem

to the 2.6.20-stable tree.  Its filename is

     uhci-fix-port-resume-problem.patch

A git repo of this tree can be found at 
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary


>From [EMAIL PROTECTED] Mon Feb 26 14:17:37 2007
From: Alan Stern <[EMAIL PROTECTED]>
Date: Mon, 26 Feb 2007 17:16:06 -0500 (EST)
Subject: UHCI: fix port resume problem
To: Greg KH <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]>
Cc: Guilherme Salgado <[EMAIL PROTECTED]>, USB development list 
<linux-usb-devel@lists.sourceforge.net>
Message-ID: <[EMAIL PROTECTED]>

From: Alan Stern <[EMAIL PROTECTED]>

This patch (as863) fixes a problem encountered sometimes when resuming
a port on a UHCI controller.  The hardware may turn off the
Resume-Detect bit before turning off the Suspend bit, leading usbcore
to think that the port is still suspended and the resume has failed.
The patch makes uhci_finish_suspend() wait until both bits are safely
off.

Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>

--- usb-2.6.orig/drivers/usb/host/uhci-hub.c
+++ usb-2.6/drivers/usb/host/uhci-hub.c
@@ -33,6 +33,9 @@ static __u8 root_hub_hub_des[] =
 /* status change bits:  nonzero writes will clear */
 #define RWC_BITS       (USBPORTSC_OCC | USBPORTSC_PEC | USBPORTSC_CSC)
 
+/* suspend/resume bits: port suspended or port resuming */
+#define SUSPEND_BITS   (USBPORTSC_SUSP | USBPORTSC_RD)
+
 /* A port that either is connected or has a changed-bit set will prevent
  * us from AUTO_STOPPING.
  */
@@ -96,8 +99,8 @@ static void uhci_finish_suspend(struct u
        int status;
        int i;
 
-       if (inw(port_addr) & (USBPORTSC_SUSP | USBPORTSC_RD)) {
-               CLR_RH_PORTSTAT(USBPORTSC_SUSP | USBPORTSC_RD);
+       if (inw(port_addr) & SUSPEND_BITS) {
+               CLR_RH_PORTSTAT(SUSPEND_BITS);
                if (test_bit(port, &uhci->resuming_ports))
                        set_bit(port, &uhci->port_c_suspend);
 
@@ -107,7 +110,7 @@ static void uhci_finish_suspend(struct u
                 * Experiments show that some controllers take longer, so
                 * we'll poll for completion. */
                for (i = 0; i < 10; ++i) {
-                       if (!(inw(port_addr) & USBPORTSC_RD))
+                       if (!(inw(port_addr) & SUSPEND_BITS))
                                break;
                        udelay(1);
                }
@@ -289,7 +292,7 @@ static int uhci_hub_control(struct usb_h
                        wPortStatus |= USB_PORT_STAT_CONNECTION;
                if (status & USBPORTSC_PE) {
                        wPortStatus |= USB_PORT_STAT_ENABLE;
-                       if (status & (USBPORTSC_SUSP | USBPORTSC_RD))
+                       if (status & SUSPEND_BITS)
                                wPortStatus |= USB_PORT_STAT_SUSPEND;
                }
                if (status & USBPORTSC_OC)

_______________________________________________
stable mailing list
[EMAIL PROTECTED]
http://linux.kernel.org/mailman/listinfo/stable


Patches currently in stable-queue which might be from [EMAIL PROTECTED] are


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to