PERFORCE change 106149 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Fri Sep 15 08:09:37 PDT 2006
http://perforce.freebsd.org/chv.cgi?CH=106149
Change 106149 by hselasky at hselasky_mini_itx on 2006/09/15 15:09:28
The "ucom" layer currently only supports devices that are in
the "ucom_devclass", due to the need for unique unit numbers.
Affected files ...
.. //depot/projects/usb/src/sys/dev/usb/ucom.c#8 edit
Differences ...
==== //depot/projects/usb/src/sys/dev/usb/ucom.c#8 (text+ko) ====
@@ -153,6 +153,15 @@
mtx_assert(&Giant, MA_OWNED);
+ if (device_get_devclass(dev) != ucom_devclass) {
+ /* NOTE: if all devices are not in the same
+ * devclass, we get duplicate unit numbers
+ * which will crash the TTY layer!
+ */
+ error = EINVAL;
+ goto done;
+ }
+
unit = device_get_unit(dev);
tp = ttyalloc();
More information about the p4-projects
mailing list