diff options
author | davidxu <davidxu@FreeBSD.org> | 2003-01-08 05:03:35 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2003-01-08 05:03:35 +0000 |
commit | 6989b48751fe7b17558ed8f93abe8cf87fdd2b9a (patch) | |
tree | 3eeee6998a55e17d879ee98dfbf81056950ada98 /sys/dev/usb | |
parent | 4c9db55d76b9b05f1e9da310616fc2a385c0dda5 (diff) | |
download | FreeBSD-src-6989b48751fe7b17558ed8f93abe8cf87fdd2b9a.zip FreeBSD-src-6989b48751fe7b17558ed8f93abe8cf87fdd2b9a.tar.gz |
Retry to get full device descriptor, this let my slow CD Tower device work.
Diffstat (limited to 'sys/dev/usb')
-rw-r--r-- | sys/dev/usb/usb_subr.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index 2d7f445..ee5b875 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -1106,9 +1106,15 @@ usbd_status usbd_reload_device_desc(usbd_device_handle dev) { usbd_status err; + int i; /* Get the full device descriptor. */ - err = usbd_get_device_desc(dev, &dev->ddesc); + for (i = 0; i < 3; ++i) { + err = usbd_get_device_desc(dev, &dev->ddesc); + if (!err) + break; + usbd_delay_ms(dev, 200); + } if (err) return (err); |