svn commit: r196493 - in head/sys/dev/usb: . serial

Alfred Perlstein alfred at FreeBSD.org
Mon Aug 24 05:01:06 UTC 2009


Author: alfred
Date: Mon Aug 24 05:01:06 2009
New Revision: 196493
URL: http://svn.freebsd.org/changeset/base/196493

Log:
           - Fix false positive uipaq probe
  
  Reported by: Alexander Motin <mav at freebsd.org>
  
  Submitted by:	hps

Modified:
  head/sys/dev/usb/serial/uipaq.c
  head/sys/dev/usb/usb.h

Modified: head/sys/dev/usb/serial/uipaq.c
==============================================================================
--- head/sys/dev/usb/serial/uipaq.c	Mon Aug 24 05:00:33 2009	(r196492)
+++ head/sys/dev/usb/serial/uipaq.c	Mon Aug 24 05:01:06 2009	(r196493)
@@ -1103,6 +1103,10 @@ uipaq_probe(device_t dev)
 	if (uaa->info.bIfaceIndex != UIPAQ_IFACE_INDEX) {
 		return (ENXIO);
 	}
+	if (uaa->info.bInterfaceClass == UICLASS_IAD) {
+		DPRINTF("IAD detected - not UIPAQ serial device\n");
+		return (ENXIO);
+	}
 	return (usbd_lookup_id_by_uaa(uipaq_devs, sizeof(uipaq_devs), uaa));
 }
 

Modified: head/sys/dev/usb/usb.h
==============================================================================
--- head/sys/dev/usb/usb.h	Mon Aug 24 05:00:33 2009	(r196492)
+++ head/sys/dev/usb/usb.h	Mon Aug 24 05:01:06 2009	(r196493)
@@ -484,6 +484,8 @@ typedef struct usb_interface_assoc_descr
 #define	UISUBCLASS_RF			0x01
 #define	UIPROTO_BLUETOOTH		0x01
 
+#define	UICLASS_IAD		0xEF	/* Interface Association Descriptor */
+
 #define	UICLASS_APPL_SPEC	0xfe
 #define	UISUBCLASS_FIRMWARE_DOWNLOAD	1
 #define	UISUBCLASS_IRDA			2


More information about the svn-src-all mailing list