diff options
author | Wojciech Macek <wma@FreeBSD.org> | 2016-05-20 11:00:06 +0000 |
---|---|---|
committer | Wojciech Macek <wma@FreeBSD.org> | 2016-05-20 11:00:06 +0000 |
commit | f4aafb9ea6efd41efe05876d0e6ed70e46b425f0 (patch) | |
tree | a3b018820374f3252ea407afa6368af00a48ddb5 /sys/dev/vnic | |
parent | 96b5475b7accb55ce5948a2b4b3a833df3b17fcd (diff) | |
download | src-f4aafb9ea6efd41efe05876d0e6ed70e46b425f0.tar.gz src-f4aafb9ea6efd41efe05876d0e6ed70e46b425f0.zip |
Allow building VNIC as a module
Add directory structure and fix dependencies to be able to
build and use Cavium VNIC driver as a module.
Reviewed by: zbb
Obtained from: Semihalf
Sponsored by: Cavium
Differential Revision: https://reviews.freebsd.org/D6345
Notes
Notes:
svn path=/head/; revision=300294
Diffstat (limited to 'sys/dev/vnic')
-rw-r--r-- | sys/dev/vnic/mrml_bridge.c | 1 | ||||
-rw-r--r-- | sys/dev/vnic/nic_main.c | 13 | ||||
-rw-r--r-- | sys/dev/vnic/nicvf_main.c | 9 | ||||
-rw-r--r-- | sys/dev/vnic/thunder_bgx.c | 3 | ||||
-rw-r--r-- | sys/dev/vnic/thunder_mdio.c | 2 |
5 files changed, 17 insertions, 11 deletions
diff --git a/sys/dev/vnic/mrml_bridge.c b/sys/dev/vnic/mrml_bridge.c index cab8da50ce03..7f4dc128ca11 100644 --- a/sys/dev/vnic/mrml_bridge.c +++ b/sys/dev/vnic/mrml_bridge.c @@ -85,6 +85,7 @@ static devclass_t mrmlbus_fdt_devclass; EARLY_DRIVER_MODULE(mrmlbus, pcib, mrmlbus_fdt_driver, mrmlbus_fdt_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); +MODULE_VERSION(mrmlbus, 1); static int mrmlb_ofw_fill_ranges(phandle_t, struct simplebus_softc *); static int mrmlb_ofw_bus_attach(device_t); diff --git a/sys/dev/vnic/nic_main.c b/sys/dev/vnic/nic_main.c index df6079eacf9e..071e8d9a9e92 100644 --- a/sys/dev/vnic/nic_main.c +++ b/sys/dev/vnic/nic_main.c @@ -137,18 +137,19 @@ static device_method_t nicpf_methods[] = { DEVMETHOD_END, }; -static driver_t nicpf_driver = { +static driver_t vnicpf_driver = { "vnicpf", nicpf_methods, sizeof(struct nicpf), }; -static devclass_t nicpf_devclass; +static devclass_t vnicpf_devclass; -DRIVER_MODULE(nicpf, pci, nicpf_driver, nicpf_devclass, 0, 0); -MODULE_DEPEND(nicpf, pci, 1, 1, 1); -MODULE_DEPEND(nicpf, ether, 1, 1, 1); -MODULE_DEPEND(nicpf, thunder_bgx, 1, 1, 1); +DRIVER_MODULE(vnicpf, pci, vnicpf_driver, vnicpf_devclass, 0, 0); +MODULE_VERSION(vnicpf, 1); +MODULE_DEPEND(vnicpf, pci, 1, 1, 1); +MODULE_DEPEND(vnicpf, ether, 1, 1, 1); +MODULE_DEPEND(vnicpf, thunder_bgx, 1, 1, 1); static int nicpf_alloc_res(struct nicpf *); static void nicpf_free_res(struct nicpf *); diff --git a/sys/dev/vnic/nicvf_main.c b/sys/dev/vnic/nicvf_main.c index 6f025d36e53b..9e9975ae02bb 100644 --- a/sys/dev/vnic/nicvf_main.c +++ b/sys/dev/vnic/nicvf_main.c @@ -129,10 +129,11 @@ static driver_t nicvf_driver = { static devclass_t nicvf_devclass; -DRIVER_MODULE(nicvf, pci, nicvf_driver, nicvf_devclass, 0, 0); -MODULE_DEPEND(nicvf, pci, 1, 1, 1); -MODULE_DEPEND(nicvf, ether, 1, 1, 1); -MODULE_DEPEND(nicvf, vnic_pf, 1, 1, 1); +DRIVER_MODULE(vnicvf, pci, nicvf_driver, nicvf_devclass, 0, 0); +MODULE_VERSION(vnicvf, 1); +MODULE_DEPEND(vnicvf, pci, 1, 1, 1); +MODULE_DEPEND(vnicvf, ether, 1, 1, 1); +MODULE_DEPEND(vnicvf, vnicpf, 1, 1, 1); static int nicvf_allocate_misc_interrupt(struct nicvf *); static int nicvf_enable_misc_interrupt(struct nicvf *); diff --git a/sys/dev/vnic/thunder_bgx.c b/sys/dev/vnic/thunder_bgx.c index 7a3a941049c0..be4b8e127338 100644 --- a/sys/dev/vnic/thunder_bgx.c +++ b/sys/dev/vnic/thunder_bgx.c @@ -109,9 +109,10 @@ static driver_t thunder_bgx_driver = { static devclass_t thunder_bgx_devclass; DRIVER_MODULE(thunder_bgx, pci, thunder_bgx_driver, thunder_bgx_devclass, 0, 0); +MODULE_VERSION(thunder_bgx, 1); MODULE_DEPEND(thunder_bgx, pci, 1, 1, 1); MODULE_DEPEND(thunder_bgx, ether, 1, 1, 1); -MODULE_DEPEND(thunder_bgx, octeon_mdio, 1, 1, 1); +MODULE_DEPEND(thunder_bgx, thunder_mdio, 1, 1, 1); static int thunder_bgx_probe(device_t dev) diff --git a/sys/dev/vnic/thunder_mdio.c b/sys/dev/vnic/thunder_mdio.c index 81576238a803..3a4fc9cb809b 100644 --- a/sys/dev/vnic/thunder_mdio.c +++ b/sys/dev/vnic/thunder_mdio.c @@ -122,8 +122,10 @@ DEFINE_CLASS_0(thunder_mdio, thunder_mdio_driver, thunder_mdio_methods, sizeof(struct thunder_mdio_softc)); DRIVER_MODULE(miibus, thunder_mdio, miibus_driver, miibus_devclass, 0, 0); +MODULE_VERSION(thunder_mdio, 1); MODULE_DEPEND(thunder_mdio, ether, 1, 1, 1); MODULE_DEPEND(thunder_mdio, miibus, 1, 1, 1); +MODULE_DEPEND(thunder_mdio, mrmlbus, 1, 1, 1); MALLOC_DEFINE(M_THUNDER_MDIO, "ThunderX MDIO", "Cavium ThunderX MDIO dynamic memory"); |