Date: Fri, 8 Aug 2008 15:21:21 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 146914 for review Message-ID: <200808081521.m78FLL0a078493@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=146914 Change 146914 by hselasky@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 */ }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808081521.m78FLL0a078493>