ChangeSet 1.1757.66.38, 2004/07/14 15:08:21-07:00, david-b@pacbell.net

[PATCH] USB: usb hub, don't check speed before reset

Signaling (even D- vs D+ pullup) may not be stable
for a while.

At least one OTG root hub won't reliably (<10%) report device speed until
after reset (and the OTG state transitions have quiesced for a while).

This patch makes that not matter.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>


 drivers/usb/core/hub.c |    7 +------
 1 files changed, 1 insertion(+), 6 deletions(-)


diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
--- a/drivers/usb/core/hub.c	2004-07-14 16:42:59 -07:00
+++ b/drivers/usb/core/hub.c	2004-07-14 16:42:59 -07:00
@@ -1635,12 +1635,7 @@
 		}
 
 		usb_set_device_state(udev, USB_STATE_POWERED);
-
-		/* hub can tell if it's lowspeed already:  D- pullup (not D+) */
-		if (portstatus & USB_PORT_STAT_LOW_SPEED)
-			udev->speed = USB_SPEED_LOW;
-		else
-			udev->speed = USB_SPEED_UNKNOWN;
+		udev->speed = USB_SPEED_UNKNOWN;
  
 		/* set the address */
 		choose_address(udev);