ChangeSet 1.1346, 2003/10/23 22:07:41-07:00, david-b@pacbell.net [PATCH] USB: usb enumeration clears full speed ep0 state This resolves a bug that was recently reported to me by someone enumerating a USB 1.1 modem through a high speed hub. I'm a bit surprised we never saw it before; I think cache/dma timings must usually be strongly in our favor. The problem was that the HC was still using the old ep0 maxpacket value, so when it received an 18 byte device descriptor it would report a packet overrun and enumeration would fail. The fix is straightforward: invalidate the HC's old endpoint state when we change the full speed maxpacket size. (And eventually, we can remove EHCI and OHCI code coping with usbcore not doing this.) drivers/usb/core/usb.c | 3 +++ 1 files changed, 3 insertions(+) diff -Nru a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c --- a/drivers/usb/core/usb.c Thu Oct 23 23:03:55 2003 +++ b/drivers/usb/core/usb.c Thu Oct 23 23:03:55 2003 @@ -1063,6 +1063,9 @@ goto fail; } if (dev->speed == USB_SPEED_FULL) { + usb_disable_endpoint(dev, 0); + usb_endpoint_running(dev, 0, 1); + usb_endpoint_running(dev, 0, 0); dev->epmaxpacketin [0] = dev->descriptor.bMaxPacketSize0; dev->epmaxpacketout[0] = dev->descriptor.bMaxPacketSize0; }