svn commit: r223489 - in head: sys/dev/usb tools/tools/bus_autoconf
Hans Petter Selasky
hselasky at FreeBSD.org
Fri Jun 24 04:16:07 UTC 2011
Author: hselasky
Date: Fri Jun 24 04:16:06 2011
New Revision: 223489
URL: http://svn.freebsd.org/changeset/base/223489
Log:
- Add additional information to the PnP info of USB HUBs children which
is now required by bus_autoconf.
- Allow interface class matching even if device class is vendor specific.
- Update bus_autoconf tool to not generate system and subsystem match lines
for the nomatch event.
PR: misc/157903
MFC after: 14 days
Modified:
head/sys/dev/usb/usb_hub.c
head/sys/dev/usb/usb_lookup.c
head/tools/tools/bus_autoconf/bus_autoconf.c
Modified: head/sys/dev/usb/usb_hub.c
==============================================================================
--- head/sys/dev/usb/usb_hub.c Fri Jun 24 03:50:54 2011 (r223488)
+++ head/sys/dev/usb/usb_hub.c Fri Jun 24 04:16:06 2011 (r223489)
@@ -1334,15 +1334,19 @@ uhub_child_pnpinfo_string(device_t paren
"devclass=0x%02x devsubclass=0x%02x "
"sernum=\"%s\" "
"release=0x%04x "
- "intclass=0x%02x intsubclass=0x%02x" "%s%s",
+ "mode=%s "
+ "intclass=0x%02x intsubclass=0x%02x "
+ "intprotocol=0x%02x " "%s%s",
UGETW(res.udev->ddesc.idVendor),
UGETW(res.udev->ddesc.idProduct),
res.udev->ddesc.bDeviceClass,
res.udev->ddesc.bDeviceSubClass,
usb_get_serial(res.udev),
UGETW(res.udev->ddesc.bcdDevice),
+ (res.udev->flags.usb_mode == USB_MODE_HOST) ? "host" : "device",
iface->idesc->bInterfaceClass,
iface->idesc->bInterfaceSubClass,
+ iface->idesc->bInterfaceProtocol,
iface->pnpinfo ? " " : "",
iface->pnpinfo ? iface->pnpinfo : "");
} else {
Modified: head/sys/dev/usb/usb_lookup.c
==============================================================================
--- head/sys/dev/usb/usb_lookup.c Fri Jun 24 03:50:54 2011 (r223488)
+++ head/sys/dev/usb/usb_lookup.c Fri Jun 24 04:16:06 2011 (r223489)
@@ -105,13 +105,6 @@ usbd_lookup_id_by_info(const struct usb_
(id->bDeviceProtocol != info->bDeviceProtocol)) {
continue;
}
- if ((info->bDeviceClass == 0xFF) &&
- (!(id->match_flag_vendor)) &&
- ((id->match_flag_int_class) ||
- (id->match_flag_int_subclass) ||
- (id->match_flag_int_protocol))) {
- continue;
- }
if ((id->match_flag_int_class) &&
(id->bInterfaceClass != info->bInterfaceClass)) {
continue;
Modified: head/tools/tools/bus_autoconf/bus_autoconf.c
==============================================================================
--- head/tools/tools/bus_autoconf/bus_autoconf.c Fri Jun 24 03:50:54 2011 (r223488)
+++ head/tools/tools/bus_autoconf/bus_autoconf.c Fri Jun 24 04:16:06 2011 (r223489)
@@ -148,15 +148,8 @@ usb_dump(struct usb_device_id *id, uint3
usb_dump_sub(id, &info);
- if (info.is_iface) {
+ if (info.is_any) {
printf("nomatch 10 {\n"
- " match \"system\" \"USB\";\n"
- " match \"subsystem\" \"INTERFACE\";\n"
- " match \"mode\" \"%s\";\n", mode);
- } else if (info.is_any) {
- printf("nomatch 10 {\n"
- " match \"system\" \"USB\";\n"
- " match \"subsystem\" \"DEVICE\";\n"
" match \"mode\" \"%s\";\n", mode);
} else {
return (n);
More information about the svn-src-all
mailing list