Index: head/sys/conf/files.arm64 =================================================================== --- head/sys/conf/files.arm64 +++ head/sys/conf/files.arm64 @@ -82,7 +82,7 @@ dev/vnic/thunder_bgx.c optional vnic pci dev/vnic/thunder_mdio_fdt.c optional vnic fdt dev/vnic/thunder_mdio.c optional vnic -dev/vnic/lmac_if.m optional vnic +dev/vnic/lmac_if.m optional inet | inet6 | vnic kern/kern_clocksource.c standard kern/msi_if.m optional intrng kern/pic_if.m optional intrng Index: head/sys/dev/vnic/mrml_bridge.c =================================================================== --- head/sys/dev/vnic/mrml_bridge.c +++ head/sys/dev/vnic/mrml_bridge.c @@ -85,6 +85,7 @@ 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); Index: head/sys/dev/vnic/nic_main.c =================================================================== --- head/sys/dev/vnic/nic_main.c +++ head/sys/dev/vnic/nic_main.c @@ -137,18 +137,19 @@ 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 *); Index: head/sys/dev/vnic/nicvf_main.c =================================================================== --- head/sys/dev/vnic/nicvf_main.c +++ head/sys/dev/vnic/nicvf_main.c @@ -129,10 +129,11 @@ 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 *); Index: head/sys/dev/vnic/thunder_bgx.c =================================================================== --- head/sys/dev/vnic/thunder_bgx.c +++ head/sys/dev/vnic/thunder_bgx.c @@ -109,9 +109,10 @@ 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) Index: head/sys/dev/vnic/thunder_mdio.c =================================================================== --- head/sys/dev/vnic/thunder_mdio.c +++ head/sys/dev/vnic/thunder_mdio.c @@ -122,8 +122,10 @@ 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"); Index: head/sys/modules/vnic/Makefile =================================================================== --- head/sys/modules/vnic/Makefile +++ head/sys/modules/vnic/Makefile @@ -0,0 +1,10 @@ +# $FreeBSD$ + +SYSDIR?=${.CURDIR}/../.. +.include "${SYSDIR}/conf/kern.opts.mk" + +CFLAGS+= -DFDT + +SUBDIR = mrmlbus thunder_mdio thunder_bgx vnicpf vnicvf + +.include Index: head/sys/modules/vnic/mrmlbus/Makefile =================================================================== --- head/sys/modules/vnic/mrmlbus/Makefile +++ head/sys/modules/vnic/mrmlbus/Makefile @@ -0,0 +1,16 @@ +# $FreeBSD$ + +SYSDIR?=${.CURDIR}/../../.. +.include "${SYSDIR}/conf/kern.opts.mk" + +S= ${.CURDIR}/../../.. + +.PATH: $S/dev/vnic + +KMOD= mrmlbus +SRCS= device_if.h bus_if.h opt_platform.h pci_if.h ofw_bus_if.h miibus_if.h lmac_if.h +SRCS+= mrml_bridge.c + +CFLAGS+= -DFDT + +.include Index: head/sys/modules/vnic/thunder_bgx/Makefile =================================================================== --- head/sys/modules/vnic/thunder_bgx/Makefile +++ head/sys/modules/vnic/thunder_bgx/Makefile @@ -0,0 +1,16 @@ +# $FreeBSD$ + +SYSDIR?=${.CURDIR}/../../.. +.include "${SYSDIR}/conf/kern.opts.mk" + +S= ${.CURDIR}/../../.. + +.PATH: $S/dev/vnic + +KMOD= thunder_bgx +SRCS= thunder_bgx.c thunder_bgx_fdt.c +SRCS+= opt_platform.h device_if.h bus_if.h pci_if.h lmac_if.h ofw_bus_if.h + +CFLAGS+= -DFDT + +.include Index: head/sys/modules/vnic/thunder_mdio/Makefile =================================================================== --- head/sys/modules/vnic/thunder_mdio/Makefile +++ head/sys/modules/vnic/thunder_mdio/Makefile @@ -0,0 +1,16 @@ +# $FreeBSD$ + +SYSDIR?=${.CURDIR}/../../.. +.include "${SYSDIR}/conf/kern.opts.mk" + +S= ${.CURDIR}/../../.. + +.PATH: $S/dev/vnic + +KMOD= thunder_mdio +SRCS= opt_platform.h device_if.h bus_if.h pci_if.h ofw_bus_if.h miibus_if.h lmac_if.h +SRCS+= thunder_mdio.c thunder_mdio_fdt.c + +CFLAGS+= -DFDT + +.include Index: head/sys/modules/vnic/vnicpf/Makefile =================================================================== --- head/sys/modules/vnic/vnicpf/Makefile +++ head/sys/modules/vnic/vnicpf/Makefile @@ -0,0 +1,16 @@ +# $FreeBSD$ + +SYSDIR?=${.CURDIR}/../../.. +.include "${SYSDIR}/conf/kern.opts.mk" + +S= ${.CURDIR}/../../.. + +.PATH: $S/dev/vnic + +KMOD= vnicpf +SRCS= pci_iov_if.h opt_platform.h device_if.h bus_if.h pci_if.h ofw_bus_if.h miibus_if.h lmac_if.h +SRCS+= nic_main.c + +CFLAGS+= -DFDT -DPCI_IOV + +.include Index: head/sys/modules/vnic/vnicvf/Makefile =================================================================== --- head/sys/modules/vnic/vnicvf/Makefile +++ head/sys/modules/vnic/vnicvf/Makefile @@ -0,0 +1,16 @@ +# $FreeBSD$ + +SYSDIR?=${.CURDIR}/../../.. +.include "${SYSDIR}/conf/kern.opts.mk" + +S= ${.CURDIR}/../../.. + +.PATH: $S/dev/vnic + +KMOD= vnicvf +SRCS= nicvf_main.c nicvf_queues.c +SRCS+= opt_platform.h ofw_bus_if.h lmac_if.h miibus_if.h pci_if.h bus_if.h device_if.h opt_inet.h opt_inet6.h + +CFLAGS+= -DFDT -DPCI_IOV + +.include