vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| hi, if you have a usb device that does not work when booting with "device problem, disabling port X", but works if plugged after, please give it a try and send me the dmesg. the printf will go away when i commit it. thanks, f.- Index: sys/dev/usb/usb_subr.c ================================================== ================= RCS file: /cvs/src/sys/dev/usb/usb_subr.c,v retrieving revision 1.64 diff -u -p -r1.64 usb_subr.c --- sys/dev/usb/usb_subr.c 4 Nov 2007 05:52:36 -0000 1.64 +++ sys/dev/usb/usb_subr.c 9 May 2008 17:26:58 -0000 @@ -979,6 +979,7 @@ usbd_new_device(struct device *parent, u usbd_device_handle dev, adev; struct usbd_device *hub; usb_device_descriptor_t *dd; + usb_port_status_t ps; usbd_status err; int addr; int i; @@ -1051,14 +1052,17 @@ usbd_new_device(struct device *parent, u dd = &dev->ddesc; /* Try a few times in case the device is slow (i.e. outside specs.) */ - for (i = 0; i < 5; i++) { + for (i = 0; i < 15; i++) { /* Get the first 8 bytes of the device descriptor. */ err = usbd_get_desc(dev, UDESC_DEVICE, 0, USB_MAX_IPACKET, dd); if (!err) break; - /* progressively increase the delay */ - usbd_delay_ms(dev, 200 * (i + 1)); + if ((i % 4) == 0) + usbd_reset_port(up->parent, port, &ps); + else + usbd_delay_ms(dev, 200); } + printf("usbd_get_desc() -> %d i=%d\n", err, i); if (err) { DPRINTFN(-1, ("usbd_new_device: addr=%d, getting first desc " "failed\n", addr)); |