Author: hselasky
Date: Fri Jun 24 22:01:56 2011
New Revision: 223521
URL: http://svn.freebsd.org/changeset/base/223521

Log:
  - Export more USB device ID's.
  - Update bus_auto.conf accordingly.
  
  MFC after:    3 days

Modified:
  head/etc/devd/bus_auto.conf
  head/sys/dev/usb/input/uep.c
  head/sys/dev/usb/input/ukbd.c
  head/sys/dev/usb/input/ums.c

Modified: head/etc/devd/bus_auto.conf
==============================================================================
--- head/etc/devd/bus_auto.conf Fri Jun 24 21:39:38 2011        (r223520)
+++ head/etc/devd/bus_auto.conf Fri Jun 24 22:01:56 2011        (r223521)
@@ -86,6 +86,14 @@ nomatch 32 {
 nomatch 32 {
        match "bus" "uhub[0-9]+";
        match "mode" "host";
+       match "vendor" "0x0123";
+       match "product" "0x0001";
+       action "kldload uep";
+};
+
+nomatch 32 {
+       match "bus" "uhub[0-9]+";
+       match "mode" "host";
        match "vendor" "0x03e8";
        match "product" "0x0008";
        action "kldload if_kue";
@@ -1254,6 +1262,14 @@ nomatch 32 {
 nomatch 32 {
        match "bus" "uhub[0-9]+";
        match "mode" "host";
+       match "vendor" "0x0eef";
+       match "product" "(0x0001|0x0002)";
+       action "kldload uep";
+};
+
+nomatch 32 {
+       match "bus" "uhub[0-9]+";
+       match "mode" "host";
        match "vendor" "0x0f3d";
        match "product" "(0x0112|0x0112)";
        action "kldload u3g";
@@ -2263,6 +2279,24 @@ nomatch 32 {
 nomatch 32 {
        match "bus" "uhub[0-9]+";
        match "mode" "host";
+       match "intclass" "0x03";
+       match "intsubclass" "0x01";
+       match "intprotocol" "0x01";
+       action "kldload ukbd";
+};
+
+nomatch 32 {
+       match "bus" "uhub[0-9]+";
+       match "mode" "host";
+       match "intclass" "0x03";
+       match "intsubclass" "0x01";
+       match "intprotocol" "0x02";
+       action "kldload ums";
+};
+
+nomatch 32 {
+       match "bus" "uhub[0-9]+";
+       match "mode" "host";
        match "intclass" "0x07";
        match "intsubclass" "0x01";
        match "intprotocol" "0x01";
@@ -2343,5 +2377,5 @@ nomatch 32 {
        action "kldload umass";
 };
 
-# 1626 usb_host entries processed
+# 1631 usb_host entries processed
 

Modified: head/sys/dev/usb/input/uep.c
==============================================================================
--- head/sys/dev/usb/input/uep.c        Fri Jun 24 21:39:38 2011        
(r223520)
+++ head/sys/dev/usb/input/uep.c        Fri Jun 24 22:01:56 2011        
(r223521)
@@ -288,6 +288,12 @@ static const struct usb_config uep_confi
        },
 };
 
+static const STRUCT_USB_HOST_ID uep_devs[] = {
+       {USB_VPI(USB_VENDOR_EGALAX, USB_PRODUCT_EGALAX_TPANEL, 0)},
+       {USB_VPI(USB_VENDOR_EGALAX, USB_PRODUCT_EGALAX_TPANEL2, 0)},
+       {USB_VPI(USB_VENDOR_EGALAX2, USB_PRODUCT_EGALAX2_TPANEL, 0)},
+};
+
 static int
 uep_probe(device_t dev)
 {
@@ -295,17 +301,12 @@ uep_probe(device_t dev)
 
        if (uaa->usb_mode != USB_MODE_HOST)
                return (ENXIO);
+       if (uaa->info.bConfigIndex != 0)
+               return (ENXIO);
+       if (uaa->info.bIfaceIndex != 0)
+               return (ENXIO);
 
-       if ((uaa->info.idVendor == USB_VENDOR_EGALAX) &&
-           ((uaa->info.idProduct == USB_PRODUCT_EGALAX_TPANEL) ||
-           (uaa->info.idProduct == USB_PRODUCT_EGALAX_TPANEL2)))
-               return (BUS_PROBE_SPECIFIC);
-
-       if ((uaa->info.idVendor == USB_VENDOR_EGALAX2) &&
-           (uaa->info.idProduct == USB_PRODUCT_EGALAX2_TPANEL))
-               return (BUS_PROBE_SPECIFIC);
-
-       return (ENXIO);
+       return (usbd_lookup_id_by_uaa(uep_devs, sizeof(uep_devs), uaa));
 }
 
 static int

Modified: head/sys/dev/usb/input/ukbd.c
==============================================================================
--- head/sys/dev/usb/input/ukbd.c       Fri Jun 24 21:39:38 2011        
(r223520)
+++ head/sys/dev/usb/input/ukbd.c       Fri Jun 24 22:01:56 2011        
(r223521)
@@ -745,6 +745,13 @@ static const struct usb_config ukbd_conf
        },
 };
 
+/* A match on these entries will load ukbd */
+static const STRUCT_USB_HOST_ID __used ukbd_devs[] = {
+       {USB_IFACE_CLASS(UICLASS_HID),
+        USB_IFACE_SUBCLASS(UISUBCLASS_BOOT),
+        USB_IFACE_PROTOCOL(UIPROTO_BOOT_KEYBOARD),},
+};
+
 static int
 ukbd_probe(device_t dev)
 {

Modified: head/sys/dev/usb/input/ums.c
==============================================================================
--- head/sys/dev/usb/input/ums.c        Fri Jun 24 21:39:38 2011        
(r223520)
+++ head/sys/dev/usb/input/ums.c        Fri Jun 24 22:01:56 2011        
(r223521)
@@ -355,6 +355,13 @@ static const struct usb_config ums_confi
        },
 };
 
+/* A match on these entries will load ums */
+static const STRUCT_USB_HOST_ID __used ums_devs[] = {
+       {USB_IFACE_CLASS(UICLASS_HID),
+        USB_IFACE_SUBCLASS(UISUBCLASS_BOOT),
+        USB_IFACE_PROTOCOL(UIPROTO_MOUSE),},
+};
+
 static int
 ums_probe(device_t dev)
 {
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to