# HG changeset patch # Parent 6bee70148568d2df54ea0c924f5477c0c18a30f3 diff -r 6bee70148568 -r c113e34f5760 sys/dev/usb/usbdi.h --- a/sys/dev/usb/usbdi.h +++ b/sys/dev/usb/usbdi.h @@ -264,25 +264,6 @@ struct usb_config { */ struct usb_device_id { - /* Hook for driver specific information */ - unsigned long driver_info; - - /* Used for product specific matches; the BCD range is inclusive */ - uint16_t idVendor; - uint16_t idProduct; - uint16_t bcdDevice_lo; - uint16_t bcdDevice_hi; - - /* Used for device class matches */ - uint8_t bDeviceClass; - uint8_t bDeviceSubClass; - uint8_t bDeviceProtocol; - - /* Used for interface class matches */ - uint8_t bInterfaceClass; - uint8_t bInterfaceSubClass; - uint8_t bInterfaceProtocol; - /* Select which fields to match against */ #if _BYTE_ORDER == _LITTLE_ENDIAN uint16_t @@ -316,6 +297,29 @@ struct usb_device_id { match_flag_vendor:1; #endif + /* Used for product specific matches; the BCD range is inclusive */ + uint16_t idVendor; + uint16_t idProduct; + uint16_t bcdDevice_lo; + uint16_t bcdDevice_hi; + + /* Used for device class matches */ + uint8_t bDeviceClass; + uint8_t bDeviceSubClass; + uint8_t bDeviceProtocol; + + /* Used for interface class matches */ + uint8_t bInterfaceClass; + uint8_t bInterfaceSubClass; + uint8_t bInterfaceProtocol; + + /* Hook for driver specific information */ + unsigned long driver_info; + +/* + * XXX can't currently participate in auto driver loading + * XXX making it a union with the match_flag_* above messes up init + */ #if USB_HAVE_COMPAT_LINUX /* which fields to match against */ uint16_t match_flags; @@ -332,11 +336,9 @@ struct usb_device_id { #endif } __aligned(32); -#define USB_STD_PNP_INFO "P:x;U16:vendor;U16:product;L16:product;G16:product;" \ +#define USB_STD_PNP_INFO "M16:mask;U16:vendor;U16:product;L16:product;G16:product;" \ "U8:devclass;U8:devsubclass;U8:devprotocol;" \ - "U8:intclass;U8:intsubclass;U8:intprotocol;" \ - "M16:1,2,3,4,5,6,7,8,9,10;" \ - "M16:1,2,3,4,5,6,7,8,9,10;" + "U8:intclass;U8:intsubclass;U8:intprotocol;" #define USB_PNP_INFO(table) \ MODULE_PNP_INFO(USB_STD_PNP_INFO, usb, table, table, sizeof(table[0]), \ sizeof(table) / sizeof(table[0]))