On Tuesday 28 November 2006 2:10 pm, Larry Fenske XX (BO/EUS) wrote:
> usb 5-1: new full speed USB device using address 2 
> usb 5-1: device not accepting address 2, error -71 

Can you see if this patch helps?


++++++++++++++++++++    CUT HERE

Tweak some early enumeration code paths:

 - After a set_address() error, reset the port.  Failures in that particular
   protocol request leave the device's address indeterminate.

 - Let devices settle longer after successful SET_ADDRESS

EXPERIMENTAL ... 

Index: g26/drivers/usb/core/hub.c
===================================================================
--- g26.orig/drivers/usb/core/hub.c     2006-11-06 13:08:45.000000000 -0800
+++ g26/drivers/usb/core/hub.c  2006-11-06 14:13:55.000000000 -0800
@@ -2010,6 +2010,8 @@ static int hub_set_address(struct usb_de
        if (retval == 0) {
                usb_set_device_state(udev, USB_STATE_ADDRESS);
                ep0_reinit(udev);
+               /* allow HCD and peripheral time to settle */
+               msleep(40);
        }
        return retval;
 }
@@ -2195,24 +2197,27 @@ hub_port_init (struct usb_hub *hub, stru
 #undef GET_DESCRIPTOR_BUFSIZE
                }
 
+               /* after set_address faults it's not clear what the device's
+                * address will be.  reset and be sure.
+                *
+                * REVISIT peripherals could trigger erroneous faults...
+                */
                for (j = 0; j < SET_ADDRESS_TRIES; ++j) {
                        retval = hub_set_address(udev);
                        if (retval >= 0)
                                break;
-                       msleep(200);
+                       (void) hub_port_reset(hub, port1, udev, delay);
                }
                if (retval < 0) {
                        dev_err(&udev->dev,
                                "device not accepting address %d, error %d\n",
                                udev->devnum, retval);
-                       goto fail;
+                       continue;
                }
- 
+
                /* cope with hardware quirkiness:
-                *  - let SET_ADDRESS settle, some device hardware wants it
                 *  - read ep0 maxpacket even for high and low speed,
-                */
-               msleep(10);
+                */
                if (USE_NEW_SCHEME(retry_counter))
                        break;
 

-------------------------------------------------------------------------
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