[Libdlo] [PATCH] udlfb: Restrict device id match on composite devices

Andrew Kephart akephart at akephart.org
Thu Dec 9 11:45:28 PST 2010


Hi all.

I noticed that udlfb was getting bound to the audio and HID interfaces
of my DL-based composite device, so here's a patch that incorporates the
interface class into the match (since the DisplayLink interface proper
always uses a vendor-specific class).

I'm not sure if this is entirely the correct solution, but it seems to
work.  

What do you folks think?

-andrew

==================8<=================================

Restrict match to vendor-specific interfaces of composite DisplayLink
devices

For composite devices with DisplayLink vid, udlfb is matching the non-DL
interfaces (audio, HID, etc.) as well as the primary video interface
(vendor-specific class).  This patch incorporates the interface class
as part of the device id match.


diff --git a/udlfb.c b/udlfb.c
index 59a1925..7b6aa27 100644
--- a/udlfb.c
+++ b/udlfb.c
@@ -50,11 +50,14 @@ static const u32 udlfb_info_flags = FBINFO_DEFAULT |
FBINFO_READS_FAST |
 /*
  * There are many DisplayLink-based products, all with unique PIDs. We
are able
  * to support all volume ones (circa 2009) with a single driver, so we
match
- * globally on VID. TODO: Probe() needs to detect when we might be
running
+ * globally on VID, but select only the interfaces that have
vendor-specific
+ * class designations.
+ *
+ * TODO: Probe() needs to detect when we might be running
  * "future" chips, and bail on those, so a compatible driver can match.
  */
 static struct usb_device_id id_table[] = {
-       {.idVendor = 0x17e9, .match_flags =
USB_DEVICE_ID_MATCH_VENDOR,},
+       {.idVendor = 0x17e9, .bInterfaceClass = 0xFF , .match_flags =
USB_DEVICE_ID_MATCH_VENDOR|USB_DEVICE_ID_MATCH_INT_CLASS,},
        {},
 };
 MODULE_DEVICE_TABLE(usb, id_table);




More information about the Libdlo mailing list