aboutsummaryrefslogtreecommitdiff
path: root/sys/netgraph
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2015-12-11 05:28:00 +0000
committerWarner Losh <imp@FreeBSD.org>2015-12-11 05:28:00 +0000
commitf809f280e079432b896f3de6f15ca44a7bdab55f (patch)
tree53b2b65701b99fe09809fbc71684efc28a02053e /sys/netgraph
parentf6cea53f9db2d88883ea7d7cee5fac10e186650b (diff)
downloadsrc-f809f280e079432b896f3de6f15ca44a7bdab55f.tar.gz
src-f809f280e079432b896f3de6f15ca44a7bdab55f.zip
Create a USB_PNP_INFO and use it to export the existing PNP
tables. Some drivers needed some slight re-arrangement of declarations to accommodate this. Change the USB pnp tables slightly to allow better compatibility with the system by moving linux driver info from start of each entry to the end. All other PNP tables in the system have the per-device flags and such at the end of the elements rather that at the beginning. Differential Review: https://reviews.freebsd.org/D3458
Notes
Notes: svn path=/head/; revision=292080
Diffstat (limited to 'sys/netgraph')
-rw-r--r--sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c2
-rw-r--r--sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c14
2 files changed, 9 insertions, 7 deletions
diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
index f34c70817188..4121ebc07f19 100644
--- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
+++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
@@ -1872,4 +1872,4 @@ MODULE_VERSION(ng_ubt, NG_BLUETOOTH_VERSION);
MODULE_DEPEND(ng_ubt, netgraph, NG_ABI_VERSION, NG_ABI_VERSION, NG_ABI_VERSION);
MODULE_DEPEND(ng_ubt, ng_hci, NG_BLUETOOTH_VERSION, NG_BLUETOOTH_VERSION, NG_BLUETOOTH_VERSION);
MODULE_DEPEND(ng_ubt, usb, 1, 1, 1);
-
+USB_PNP_HOST_INFO(ubt_devs);
diff --git a/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c b/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c
index da00e05c9b35..d5e55eac1f17 100644
--- a/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c
+++ b/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c
@@ -170,8 +170,15 @@ static driver_t ubtbcmfw_driver =
.size = sizeof(struct ubtbcmfw_softc),
};
+static const STRUCT_USB_HOST_ID ubtbcmfw_devs[] = {
+/* Broadcom BCM2033 devices only */
+ { USB_VPI(USB_VENDOR_BROADCOM, USB_PRODUCT_BROADCOM_BCM2033, 0) },
+};
+
+
DRIVER_MODULE(ubtbcmfw, uhub, ubtbcmfw_driver, ubtbcmfw_devclass, NULL, 0);
MODULE_DEPEND(ubtbcmfw, usb, 1, 1, 1);
+USB_PNP_HOST_INFO(ubtbcmfw_devs);
/*
* Probe for a USB Bluetooth device
@@ -180,11 +187,6 @@ MODULE_DEPEND(ubtbcmfw, usb, 1, 1, 1);
static int
ubtbcmfw_probe(device_t dev)
{
- static const STRUCT_USB_HOST_ID devs[] = {
- /* Broadcom BCM2033 devices only */
- { USB_VPI(USB_VENDOR_BROADCOM, USB_PRODUCT_BROADCOM_BCM2033, 0) },
- };
-
struct usb_attach_arg *uaa = device_get_ivars(dev);
if (uaa->usb_mode != USB_MODE_HOST)
@@ -193,7 +195,7 @@ ubtbcmfw_probe(device_t dev)
if (uaa->info.bIfaceIndex != 0)
return (ENXIO);
- return (usbd_lookup_id_by_uaa(devs, sizeof(devs), uaa));
+ return (usbd_lookup_id_by_uaa(ubtbcmfw_devs, sizeof(ubtbcmfw_devs), uaa));
} /* ubtbcmfw_probe */
/*