On Sunday 10 October 2004 9:43 am, Russell King wrote: > 7. This one is the killer. Once it's been hacked to compile, plugging > in a USB flash key results in: > > usb 1-1: new full speed USB device using address 2 > usb 1-1: device not accepting address 2, error -110 > usb 1-1: new full speed USB device using address 3 > usb 1-1: device not accepting address 3, error -110 > > which is the same error as the previous driver gave.
I suspect that problem isn't associated with Lothar's code at all; a lot of folk have been running into problems like that lately. It's been bothering me, since that failure is "new" (first reports of it came from 2.6.6 or so) and, despite being very nasty, also wouldn't repeat for me ... until just now. Can you see if the attached patch makes a difference? It made that problem go away for me. Of course, your system may have other problems too! - Dave
This patch lets at least some devices enumerate instead of giving the dread (and fatal) "device not accepting address" error message. - Be as certain as possible that usbcore cleaned up "old" state about device address zero within the HCD. Something seems to have changed in one of the reset/enumeration paths that prevents it from getting scrubbed out in all the cases that need it ... causing intermittent failures with some configurations. - More useful diagnostics: the "new device" message says which HCD it's using (so fewer problem reports will hide that info!), and the "bad maxpacket" message uses the driver model diagnostics so we can see what device had the problem (and avoid nasty long pathnames). Signed-off-by: David Brownell <[EMAIL PROTECTED]> --- a/drivers/usb/core/hub.c 2004-10-10 18:09:20 -07:00 +++ b/drivers/usb/core/hub.c 2004-10-10 18:09:20 -07:00 @@ -1981,6 +2013,8 @@ NULL, 0, HZ * USB_CTRL_SET_TIMEOUT); if (retval == 0) usb_set_device_state(udev, USB_STATE_ADDRESS); + usb_disable_endpoint(udev, 0 + USB_DIR_OUT); + udev->epmaxpacketout[0] = udev->epmaxpacketin [0]; return retval; } @@ -2057,7 +2091,7 @@ udev->epmaxpacketout[0] = i; dev_info (&udev->dev, - "%s %s speed USB device using address %d\n", + "%s %s speed USB device using %s and address %d\n", (udev->config) ? "reset" : "new", ({ char *speed; switch (udev->speed) { case USB_SPEED_LOW: speed = "low"; break; @@ -2065,6 +2099,7 @@ case USB_SPEED_HIGH: speed = "high"; break; default: speed = "?"; break; }; speed;}), + udev->bus->controller->driver->name, udev->devnum); /* Set up TT records, if needed */ --- a/drivers/usb/core/urb.c 2004-10-10 18:09:20 -07:00 +++ b/drivers/usb/core/urb.c 2004-10-10 18:09:20 -07:00 @@ -264,11 +264,10 @@ max = usb_maxpacket (dev, pipe, is_out); if (max <= 0) { - dbg ("%s: bogus endpoint %d-%s on usb-%s-%s (bad maxpacket %d)", - __FUNCTION__, - usb_pipeendpoint (pipe), is_out ? "OUT" : "IN", - dev->bus->bus_name, dev->devpath, - max); + dev_dbg(&dev->dev, + "bogus endpoint ep%d%s in %s (bad maxpacket %d)", + usb_pipeendpoint (pipe), is_out ? "out" : "in", + __FUNCTION__, max); return -EMSGSIZE; }