Skip to content

Commit

Permalink
- Move all USB device ID arrays into so-called sections,
Browse files Browse the repository at this point in the history
  sorted according to the mode which they support:
	host, device or dual mode
- Add generic tool to extract these data:
	tools/bus_autoconf

Discussed with:	imp
Suggested by:	Robert Millan <[email protected]>
PR:		misc/157903
MFC after:	14 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@223486 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
  • Loading branch information
hselasky committed Jun 24, 2011
1 parent 80a094f commit 4b84b6d
Show file tree
Hide file tree
Showing 45 changed files with 623 additions and 61 deletions.
9 changes: 9 additions & 0 deletions sys/dev/sound/usb/uaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,15 @@ static driver_t uaudio_driver = {
.size = sizeof(struct uaudio_softc),
};

static const STRUCT_USB_HOST_ID __used uaudio_devs[] = {
/* Generic USB audio class match */
{USB_IFACE_CLASS(UICLASS_AUDIO),
USB_IFACE_SUBCLASS(UISUBCLASS_AUDIOCONTROL),},
/* Generic USB MIDI class match */
{USB_IFACE_CLASS(UICLASS_AUDIO),
USB_IFACE_SUBCLASS(UISUBCLASS_MIDISTREAM),},
};

static int
uaudio_probe(device_t dev)
{
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/input/atp.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ struct atp_dev_params {
},
};

static const struct usb_device_id atp_devs[] = {
static const STRUCT_USB_HOST_ID atp_devs[] = {
/* Core Duo MacBook & MacBook Pro */
{ USB_VPI(USB_VENDOR_APPLE, 0x0217, ATP_DEV_PARAMS_0) },
{ USB_VPI(USB_VENDOR_APPLE, 0x0218, ATP_DEV_PARAMS_0) },
Expand Down
28 changes: 16 additions & 12 deletions sys/dev/usb/input/uhid.c
Original file line number Diff line number Diff line change
Expand Up @@ -607,29 +607,33 @@ uhid_ioctl(struct usb_fifo *fifo, u_long cmd, void *addr,
return (error);
}

static const STRUCT_USB_HOST_ID uhid_devs[] = {
/* generic HID class */
{USB_IFACE_CLASS(UICLASS_HID),},
/* the Xbox 360 gamepad doesn't use the HID class */
{USB_IFACE_CLASS(UICLASS_VENDOR),
USB_IFACE_SUBCLASS(UISUBCLASS_XBOX360_CONTROLLER),
USB_IFACE_PROTOCOL(UIPROTO_XBOX360_GAMEPAD),},
};

static int
uhid_probe(device_t dev)
{
struct usb_attach_arg *uaa = device_get_ivars(dev);
int error;

DPRINTFN(11, "\n");

if (uaa->usb_mode != USB_MODE_HOST) {
if (uaa->usb_mode != USB_MODE_HOST)
return (ENXIO);
}
if (uaa->info.bInterfaceClass != UICLASS_HID) {

/* the Xbox 360 gamepad doesn't use the HID class */
error = usbd_lookup_id_by_uaa(uhid_devs, sizeof(uhid_devs), uaa);
if (error)
return (error);

if ((uaa->info.bInterfaceClass != UICLASS_VENDOR) ||
(uaa->info.bInterfaceSubClass != UISUBCLASS_XBOX360_CONTROLLER) ||
(uaa->info.bInterfaceProtocol != UIPROTO_XBOX360_GAMEPAD)) {
return (ENXIO);
}
}
if (usb_test_quirk(uaa, UQ_HID_IGNORE)) {
if (usb_test_quirk(uaa, UQ_HID_IGNORE))
return (ENXIO);
}

return (BUS_PROBE_GENERIC);
}

Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/net/if_aue.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ SYSCTL_INT(_hw_usb_aue, OID_AUTO, debug, CTLFLAG_RW, &aue_debug, 0,
/*
* Various supported device vendors/products.
*/
static const struct usb_device_id aue_devs[] = {
static const STRUCT_USB_HOST_ID aue_devs[] = {
#define AUE_DEV(v,p,i) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i) }
AUE_DEV(3COM, 3C460B, AUE_FLAG_PII),
AUE_DEV(ABOCOM, DSB650TX_PNA, 0),
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/net/if_axe.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ SYSCTL_INT(_hw_usb_axe, OID_AUTO, debug, CTLFLAG_RW, &axe_debug, 0,
/*
* Various supported device vendors/products.
*/
static const struct usb_device_id axe_devs[] = {
static const STRUCT_USB_HOST_ID axe_devs[] = {
#define AXE_DEV(v,p,i) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i) }
AXE_DEV(ABOCOM, UF200, 0),
AXE_DEV(ACERCM, EP1427X2, 0),
Expand Down
10 changes: 8 additions & 2 deletions sys/dev/usb/net/if_cdce.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ static const struct usb_ether_methods cdce_ue_methods = {
.ue_setpromisc = cdce_setpromisc,
};

static const struct usb_device_id cdce_devs[] = {
static const STRUCT_USB_HOST_ID cdce_host_devs[] = {
{USB_VPI(USB_VENDOR_ACERLABS, USB_PRODUCT_ACERLABS_M5632, CDCE_FLAG_NO_UNION)},
{USB_VPI(USB_VENDOR_AMBIT, USB_PRODUCT_AMBIT_NTL_250, CDCE_FLAG_NO_UNION)},
{USB_VPI(USB_VENDOR_COMPAQ, USB_PRODUCT_COMPAQ_IPAQLINUX, CDCE_FLAG_NO_UNION)},
Expand All @@ -277,7 +277,9 @@ static const struct usb_device_id cdce_devs[] = {
{USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLA300, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)},
{USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLC700, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)},
{USB_VPI(USB_VENDOR_SHARP, USB_PRODUCT_SHARP_SLC750, CDCE_FLAG_ZAURUS | CDCE_FLAG_NO_UNION)},
};

static const STRUCT_USB_DUAL_ID cdce_dual_devs[] = {
{USB_IF_CSI(UICLASS_CDC, UISUBCLASS_ETHERNET_NETWORKING_CONTROL_MODEL, 0)},
{USB_IF_CSI(UICLASS_CDC, UISUBCLASS_MOBILE_DIRECT_LINE_MODEL, 0)},
{USB_IF_CSI(UICLASS_CDC, UISUBCLASS_NETWORK_CONTROL_MODEL, 0)},
Expand Down Expand Up @@ -472,8 +474,12 @@ static int
cdce_probe(device_t dev)
{
struct usb_attach_arg *uaa = device_get_ivars(dev);
int error;

return (usbd_lookup_id_by_uaa(cdce_devs, sizeof(cdce_devs), uaa));
error = usbd_lookup_id_by_uaa(cdce_host_devs, sizeof(cdce_host_devs), uaa);
if (error)
error = usbd_lookup_id_by_uaa(cdce_dual_devs, sizeof(cdce_dual_devs), uaa);
return (error);
}

static void
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/net/if_cue.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ __FBSDID("$FreeBSD$");

/* Belkin F5U111 adapter covered by NETMATE entry */

static const struct usb_device_id cue_devs[] = {
static const STRUCT_USB_HOST_ID cue_devs[] = {
#define CUE_DEV(v,p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) }
CUE_DEV(CATC, NETMATE),
CUE_DEV(CATC, NETMATE2),
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/net/if_ipheth.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ static const struct usb_ether_methods ipheth_ue_methods = {
USB_IFACE_CLASS(c), USB_IFACE_SUBCLASS(sc), \
USB_IFACE_PROTOCOL(pt)

static const struct usb_device_id ipheth_devs[] = {
static const STRUCT_USB_HOST_ID ipheth_devs[] = {
{IPHETH_ID(USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE,
IPHETH_USBINTF_CLASS, IPHETH_USBINTF_SUBCLASS,
IPHETH_USBINTF_PROTO)},
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/net/if_kue.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ __FBSDID("$FreeBSD$");
/*
* Various supported device vendors/products.
*/
static const struct usb_device_id kue_devs[] = {
static const STRUCT_USB_HOST_ID kue_devs[] = {
#define KUE_DEV(v,p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) }
KUE_DEV(3COM, 3C19250),
KUE_DEV(3COM, 3C460),
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/net/if_mos.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ SYSCTL_INT(_hw_usb_mos, OID_AUTO, debug, CTLFLAG_RW, &mos_debug, 0,


/* Various supported device vendors/products. */
static const struct usb_device_id mos_devs[] = {
static const STRUCT_USB_HOST_ID mos_devs[] = {
{USB_VPI(USB_VENDOR_MOSCHIP, USB_PRODUCT_MOSCHIP_MCS7730, MCS7730)},
{USB_VPI(USB_VENDOR_MOSCHIP, USB_PRODUCT_MOSCHIP_MCS7830, MCS7830)},
{USB_VPI(USB_VENDOR_SITECOMEU, USB_PRODUCT_SITECOMEU_LN030, MCS7830)},
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/net/if_rue.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ SYSCTL_INT(_hw_usb_rue, OID_AUTO, debug, CTLFLAG_RW,
* Various supported device vendors/products.
*/

static const struct usb_device_id rue_devs[] = {
static const STRUCT_USB_HOST_ID rue_devs[] = {
{USB_VPI(USB_VENDOR_MELCO, USB_PRODUCT_MELCO_LUAKTX, 0)},
{USB_VPI(USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_USBKR100, 0)},
{USB_VPI(USB_VENDOR_OQO, USB_PRODUCT_OQO_ETHER01, 0)},
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/net/if_udav.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ SYSCTL_INT(_hw_usb_udav, OID_AUTO, debug, CTLFLAG_RW, &udav_debug, 0,
#define UDAV_CLRBIT(sc, reg, x) \
udav_csr_write1(sc, reg, udav_csr_read1(sc, reg) & ~(x))

static const struct usb_device_id udav_devs[] = {
static const STRUCT_USB_HOST_ID udav_devs[] = {
/* ShanTou DM9601 USB NIC */
{USB_VPI(USB_VENDOR_SHANTOU, USB_PRODUCT_SHANTOU_DM9601, 0)},
/* ShanTou ST268 USB NIC */
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/net/uhso.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ static char *uhso_port_type_sysctl[] = {
/* ifnet device unit allocations */
static struct unrhdr *uhso_ifnet_unit = NULL;

static const struct usb_device_id uhso_devs[] = {
static const STRUCT_USB_HOST_ID uhso_devs[] = {
#define UHSO_DEV(v,p,i) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i) }
/* Option GlobeSurfer iCON 7.2 */
UHSO_DEV(OPTION, GSICON72, UHSO_STATIC_IFACE),
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/serial/u3g.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ MODULE_DEPEND(u3g, ucom, 1, 1, 1);
MODULE_DEPEND(u3g, usb, 1, 1, 1);
MODULE_VERSION(u3g, 1);

static const struct usb_device_id u3g_devs[] = {
static const STRUCT_USB_HOST_ID u3g_devs[] = {
#define U3G_DEV(v,p,i) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i) }
U3G_DEV(ACERP, H10, 0),
U3G_DEV(AIRPLUS, MCD650, 0),
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/serial/uark.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ MODULE_DEPEND(uark, ucom, 1, 1, 1);
MODULE_DEPEND(uark, usb, 1, 1, 1);
MODULE_VERSION(uark, 1);

static const struct usb_device_id uark_devs[] = {
static const STRUCT_USB_HOST_ID uark_devs[] = {
{USB_VPI(USB_VENDOR_ARKMICRO, USB_PRODUCT_ARKMICRO_ARK3116, 0)},
};

Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/serial/ubsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ static const struct ucom_callback ubsa_callback = {
.ucom_poll = &ubsa_poll,
};

static const struct usb_device_id ubsa_devs[] = {
static const STRUCT_USB_HOST_ID ubsa_devs[] = {
/* AnyData ADU-500A */
{USB_VPI(USB_VENDOR_ANYDATA, USB_PRODUCT_ANYDATA_ADU_500A, 0)},
/* AnyData ADU-E100A/H */
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/serial/uchcom.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ static const struct uchcom_divider_record dividers[] =

#define NUM_DIVIDERS (sizeof (dividers) / sizeof (dividers[0]))

static const struct usb_device_id uchcom_devs[] = {
static const STRUCT_USB_HOST_ID uchcom_devs[] = {
{USB_VPI(USB_VENDOR_WCH, USB_PRODUCT_WCH_CH341SER, 0)},
{USB_VPI(USB_VENDOR_WCH2, USB_PRODUCT_WCH2_CH341SER, 0)},
};
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/serial/ucycom.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ MODULE_VERSION(ucycom, 1);
/*
* Supported devices
*/
static const struct usb_device_id ucycom_devs[] = {
static const STRUCT_USB_HOST_ID ucycom_devs[] = {
{USB_VPI(USB_VENDOR_DELORME, USB_PRODUCT_DELORME_EARTHMATE, MODEL_CY7C64013)},
};

Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/serial/uftdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ MODULE_DEPEND(uftdi, ucom, 1, 1, 1);
MODULE_DEPEND(uftdi, usb, 1, 1, 1);
MODULE_VERSION(uftdi, 1);

static struct usb_device_id uftdi_devs[] = {
static STRUCT_USB_HOST_ID uftdi_devs[] = {
#define UFTDI_DEV(v,p,t) \
{ USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, UFTDI_TYPE_##t) }
UFTDI_DEV(ATMEL, STK541, 8U232AM),
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/serial/ugensa.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ MODULE_DEPEND(ugensa, ucom, 1, 1, 1);
MODULE_DEPEND(ugensa, usb, 1, 1, 1);
MODULE_VERSION(ugensa, 1);

static const struct usb_device_id ugensa_devs[] = {
static const STRUCT_USB_HOST_ID ugensa_devs[] = {
{USB_VPI(USB_VENDOR_AIRPRIME, USB_PRODUCT_AIRPRIME_PC5220, 0)},
{USB_VPI(USB_VENDOR_CMOTECH, USB_PRODUCT_CMOTECH_CDMA_MODEM1, 0)},
{USB_VPI(USB_VENDOR_KYOCERA2, USB_PRODUCT_KYOCERA2_CDMA_MSM_K, 0)},
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/serial/uipaq.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ static const struct ucom_callback uipaq_callback = {
* support the same hardware. Numeric values are used where no usbdevs
* entries exist.
*/
static const struct usb_device_id uipaq_devs[] = {
static const STRUCT_USB_HOST_ID uipaq_devs[] = {
/* Socket USB Sync */
{USB_VPI(0x0104, 0x00be, 0)},
/* USB Sync 0301 */
Expand Down
35 changes: 25 additions & 10 deletions sys/dev/usb/serial/ulpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -483,24 +483,39 @@ ulpt_ioctl(struct usb_fifo *fifo, u_long cmd, void *data,
return (ENODEV);
}

static const STRUCT_USB_HOST_ID ulpt_devs[] = {
/* Uni-directional USB printer */
{USB_IFACE_CLASS(UICLASS_PRINTER),
USB_IFACE_SUBCLASS(UISUBCLASS_PRINTER),
USB_IFACE_PROTOCOL(UIPROTO_PRINTER_UNI)},

/* Bi-directional USB printer */
{USB_IFACE_CLASS(UICLASS_PRINTER),
USB_IFACE_SUBCLASS(UISUBCLASS_PRINTER),
USB_IFACE_PROTOCOL(UIPROTO_PRINTER_BI)},

/* 1284 USB printer */
{USB_IFACE_CLASS(UICLASS_PRINTER),
USB_IFACE_SUBCLASS(UISUBCLASS_PRINTER),
USB_IFACE_PROTOCOL(UIPROTO_PRINTER_1284)},
};

static int
ulpt_probe(device_t dev)
{
struct usb_attach_arg *uaa = device_get_ivars(dev);
int error;

DPRINTFN(11, "\n");

if (uaa->usb_mode != USB_MODE_HOST) {
if (uaa->usb_mode != USB_MODE_HOST)
return (ENXIO);
}
if ((uaa->info.bInterfaceClass == UICLASS_PRINTER) &&
(uaa->info.bInterfaceSubClass == UISUBCLASS_PRINTER) &&
((uaa->info.bInterfaceProtocol == UIPROTO_PRINTER_UNI) ||
(uaa->info.bInterfaceProtocol == UIPROTO_PRINTER_BI) ||
(uaa->info.bInterfaceProtocol == UIPROTO_PRINTER_1284))) {
return (0);
}
return (ENXIO);

error = usbd_lookup_id_by_uaa(ulpt_devs, sizeof(ulpt_devs), uaa);
if (error)
return (error);

return (BUS_PROBE_GENERIC);
}

static int
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/serial/umcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ static struct ucom_callback umcs7840_callback = {
.ucom_poll = &umcs7840_poll,
};

static const struct usb_device_id umcs7840_devs[] = {
static const STRUCT_USB_HOST_ID umcs7840_devs[] = {
{USB_VPI(USB_VENDOR_MOSCHIP, USB_PRODUCT_MOSCHIP_MCS7820, 0)},
{USB_VPI(USB_VENDOR_MOSCHIP, USB_PRODUCT_MOSCHIP_MCS7840, 0)},
};
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/serial/umct.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ static const struct ucom_callback umct_callback = {
.ucom_poll = &umct_poll,
};

static const struct usb_device_id umct_devs[] = {
static const STRUCT_USB_HOST_ID umct_devs[] = {
{USB_VPI(USB_VENDOR_MCT, USB_PRODUCT_MCT_USB232, 0)},
{USB_VPI(USB_VENDOR_MCT, USB_PRODUCT_MCT_SITECOM_USB232, 0)},
{USB_VPI(USB_VENDOR_MCT, USB_PRODUCT_MCT_DU_H3SP_USB232, 0)},
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/serial/umodem.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ SYSCTL_INT(_hw_usb_umodem, OID_AUTO, debug, CTLFLAG_RW,
&umodem_debug, 0, "Debug level");
#endif

static const struct usb_device_id umodem_devs[] = {
static const STRUCT_USB_HOST_ID umodem_devs[] = {
/* Generic Modem class match */
{USB_IFACE_CLASS(UICLASS_CDC),
USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL),
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/serial/umoscom.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ MODULE_DEPEND(umoscom, ucom, 1, 1, 1);
MODULE_DEPEND(umoscom, usb, 1, 1, 1);
MODULE_VERSION(umoscom, 1);

static const struct usb_device_id umoscom_devs[] = {
static const STRUCT_USB_HOST_ID umoscom_devs[] = {
{USB_VPI(USB_VENDOR_MOSCHIP, USB_PRODUCT_MOSCHIP_MCS7703, 0)}
};

Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/serial/uplcom.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ static struct ucom_callback uplcom_callback = {
#define UPLCOM_DEV(v,p) \
{ USB_VENDOR(USB_VENDOR_##v), USB_PRODUCT(USB_PRODUCT_##v##_##p) }

static const struct usb_device_id uplcom_devs[] = {
static const STRUCT_USB_HOST_ID uplcom_devs[] = {
UPLCOM_DEV(ACERP, S81), /* BenQ S81 phone */
UPLCOM_DEV(ADLINK, ND6530), /* ADLINK ND-6530 USB-Serial */
UPLCOM_DEV(ALCATEL, OT535), /* Alcatel One Touch 535/735 */
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/serial/uslcom.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ static struct ucom_callback uslcom_callback = {
.ucom_poll = &uslcom_poll,
};

static const struct usb_device_id uslcom_devs[] = {
static const STRUCT_USB_HOST_ID uslcom_devs[] = {
#define USLCOM_DEV(v,p) { USB_VP(USB_VENDOR_##v, USB_PRODUCT_##v##_##p) }
USLCOM_DEV(BALTECH, CARDREADER),
USLCOM_DEV(CLIPSAL, 5500PCU),
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/serial/uvisor.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ MODULE_DEPEND(uvisor, ucom, 1, 1, 1);
MODULE_DEPEND(uvisor, usb, 1, 1, 1);
MODULE_VERSION(uvisor, 1);

static const struct usb_device_id uvisor_devs[] = {
static const STRUCT_USB_HOST_ID uvisor_devs[] = {
#define UVISOR_DEV(v,p,i) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i) }
UVISOR_DEV(ACEECA, MEZ1000, UVISOR_FLAG_PALM4),
UVISOR_DEV(ALPHASMART, DANA_SYNC, UVISOR_FLAG_PALM4),
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/usb/serial/uvscom.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ static const struct ucom_callback uvscom_callback = {
.ucom_poll = &uvscom_poll,
};

static const struct usb_device_id uvscom_devs[] = {
static const STRUCT_USB_HOST_ID uvscom_devs[] = {
/* SUNTAC U-Cable type A4 */
{USB_VPI(USB_VENDOR_SUNTAC, USB_PRODUCT_SUNTAC_AS144L4, 0)},
/* SUNTAC U-Cable type D2 */
Expand Down
5 changes: 5 additions & 0 deletions sys/dev/usb/storage/umass.c
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,11 @@ MODULE_VERSION(umass, 1);
* USB device probe/attach/detach
*/

static const STRUCT_USB_HOST_ID __used umass_devs[] = {
/* generic mass storage class */
{USB_IFACE_CLASS(UICLASS_MASS),},
};

static uint16_t
umass_get_proto(struct usb_interface *iface)
{
Expand Down
Loading

0 comments on commit 4b84b6d

Please sign in to comment.