PERFORCE change 146914 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Fri Aug 8 15:21:21 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=146914
Change 146914 by hselasky at hselasky_laptop001 on 2008/08/08 15:21:17
Set "subdev" before probe and attach so that "devd" gets
the information it needs.
Affected files ...
.. //depot/projects/usb/src/sys/dev/usb2/core/usb2_device.c#19 edit
Differences ...
==== //depot/projects/usb/src/sys/dev/usb2/core/usb2_device.c#19 (text+ko) ====
@@ -974,12 +974,17 @@
device_set_ivars(uaa->temp_dev, uaa);
device_quiet(uaa->temp_dev);
}
- if (device_probe_and_attach(uaa->temp_dev) == 0) {
+ /*
+ * Set "subdev" before probe and attach so that "devd" gets
+ * the information it needs.
+ */
+ iface->subdev = uaa->temp_dev;
+
+ if (device_probe_and_attach(iface->subdev) == 0) {
/*
* The USB attach arguments are only available during probe
* and attach !
*/
- iface->subdev = uaa->temp_dev;
uaa->temp_dev = NULL;
device_set_ivars(iface->subdev, NULL);
@@ -988,6 +993,9 @@
device_printf(iface->subdev, "Suspend failed\n");
}
return (0); /* success */
+ } else {
+ /* No USB driver found */
+ iface->subdev = NULL;
}
return (1); /* failure */
}
More information about the p4-projects
mailing list