aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorBernd Walter <ticso@FreeBSD.org>2003-09-01 07:47:42 +0000
committerBernd Walter <ticso@FreeBSD.org>2003-09-01 07:47:42 +0000
commitc4bc00e50954370bdd19911a4a2a07992e74f259 (patch)
tree5a8e1a368fb2c6e26d8d96a9797f6ae03e8ebde3 /sys/dev
parentf02e8e8122a00fe079a942f8de5f35279451b707 (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/usb_subr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c
index 79a65c7bc642..ec88dc6a5a01 100644
--- a/sys/dev/usb/usb_subr.c
+++ b/sys/dev/usb/usb_subr.c
@@ -971,6 +971,7 @@ usbd_new_device(device_ptr_t parent, usbd_bus_handle bus, int depth,
usbd_device_handle dev;
struct usbd_device *hub;
usb_device_descriptor_t *dd;
+ usb_port_status_t ps;
usbd_status err;
int addr;
int i;
@@ -1027,12 +1028,14 @@ usbd_new_device(device_ptr_t parent, usbd_bus_handle bus, int depth,
up->device = dev;
dd = &dev->ddesc;
/* Try a few times in case the device is slow (i.e. outside specs.) */
- for (i = 0; i < 3; 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;
usbd_delay_ms(dev, 200);
+ if ((i & 3) == 3)
+ usbd_reset_port(up->parent, port, &ps);
}
if (err) {
DPRINTFN(-1, ("usbd_new_device: addr=%d, getting first desc "