PERFORCE change 155193 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Tue Dec 23 11:16:44 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=155193
Change 155193 by hselasky at hselasky_laptop001 on 2008/12/23 19:16:34
Be more persistant towards set config failures.
Affected files ...
.. //depot/projects/usb/src/sys/dev/usb2/core/usb2_device.c#41 edit
Differences ...
==== //depot/projects/usb/src/sys/dev/usb2/core/usb2_device.c#41 (text+ko) ====
@@ -1556,6 +1556,7 @@
if (udev->flags.usb2_mode == USB_MODE_HOST) {
uint8_t config_index;
uint8_t config_quirk;
+ uint8_t set_config_failed = 0;
/*
* Most USB devices should attach to config index 0 by
@@ -1591,6 +1592,14 @@
sx_unlock(udev->default_sx + 1);
if (err) {
if (udev->ddesc.bNumConfigurations != 0) {
+ if (!set_config_failed) {
+ set_config_failed = 1;
+ /* XXX try to re-enumerate the device */
+ err = usb2_req_re_enumerate(
+ udev, &Giant);
+ if (err == 0)
+ goto repeat_set_config;
+ }
DPRINTFN(0, "Failure selecting "
"configuration index %u: %s, port %u, "
"addr %u (ignored)\n",
@@ -1598,7 +1607,7 @@
udev->address);
}
/*
- * Some USB devices does not have any
+ * Some USB devices do not have any
* configurations. Ignore any set config
* failures!
*/
More information about the p4-projects
mailing list