diff --git a/drivers/intel/Makefile.dkms.iavf.in b/drivers/intel/Makefile.dkms.iavf.in index 6628634d34..d083dc2358 100644 --- a/drivers/intel/Makefile.dkms.iavf.in +++ b/drivers/intel/Makefile.dkms.iavf.in @@ -3,6 +3,7 @@ all: install add: veryclean \/bin/rm -rf /usr/src/@IAVF@-zc-@IAVF_VERSION@.@REVISION@ mkdir -p /usr/src/@IAVF@-zc-@IAVF_VERSION@.@REVISION@/ + cp @IAVF@/@IAVF@-@IAVF_VERSION@-zc/scripts/check_aux_bus /usr/src/@IAVF@-zc-@IAVF_VERSION@.@REVISION@/ cd @IAVF@/@IAVF@-@IAVF_VERSION@-zc/src/ ; make clean; cp -r * /usr/src/@IAVF@-zc-@IAVF_VERSION@.@REVISION@/ cp ../../kernel/linux/pf_ring.h /usr/src/@IAVF@-zc-@IAVF_VERSION@.@REVISION@/ sed -i -e 's/iavf\.o/iavf_zc.o/' -e 's/iavf-/iavf_zc-/' /usr/src/@IAVF@-zc-@IAVF_VERSION@.@REVISION@/Kbuild diff --git a/drivers/intel/iavf/iavf-4.9.5-zc/src/Kbuild b/drivers/intel/iavf/iavf-4.9.5-zc/src/Kbuild index e21526f6f0..44826412c6 100644 --- a/drivers/intel/iavf/iavf-4.9.5-zc/src/Kbuild +++ b/drivers/intel/iavf/iavf-4.9.5-zc/src/Kbuild @@ -2,6 +2,9 @@ # Makefile for the Intel Ethernet Adaptive Virtual Function Driver # +BUILD_DIR := $(dir $(lastword $(MAKEFILE_LIST))) +include $(BUILD_DIR)common.mk + obj-m += iavf.o iavf-objs := iavf_main.o \ @@ -18,6 +21,12 @@ iavf-objs := iavf_main.o \ CFLAGS_iavf_main.o := -I$(src) +ifeq (${NEED_AUX_BUS},2) +#obj-m += auxiliary.o +intel_auxiliary-objs := auxiliary.o +obj-m += intel_auxiliary.o +endif + EXTRA_CFLAGS += -DHAVE_PF_RING KBUILD_EXTRA_SYMBOLS=${PF_RING_PATH}/Module.symvers diff --git a/drivers/intel/iavf/iavf-4.9.5-zc/src/auxiliary.c b/drivers/intel/iavf/iavf-4.9.5-zc/src/auxiliary.c index 346ac20182..8f34c4f15f 100644 --- a/drivers/intel/iavf/iavf-4.9.5-zc/src/auxiliary.c +++ b/drivers/intel/iavf/iavf-4.9.5-zc/src/auxiliary.c @@ -10,7 +10,11 @@ #include #include #include +#ifdef HAVE_PF_RING +#include "auxiliary_bus.h" +#else #include "linux/auxiliary_bus.h" +#endif static const struct auxiliary_device_id *auxiliary_match_id(const struct auxiliary_device_id *id, const struct auxiliary_device *auxdev) diff --git a/drivers/intel/iavf/iavf-4.9.5-zc/src/linux/auxiliary_bus.h b/drivers/intel/iavf/iavf-4.9.5-zc/src/auxiliary_bus.h similarity index 100% rename from drivers/intel/iavf/iavf-4.9.5-zc/src/linux/auxiliary_bus.h rename to drivers/intel/iavf/iavf-4.9.5-zc/src/auxiliary_bus.h diff --git a/drivers/intel/iavf/iavf-4.9.5-zc/src/iidc.h b/drivers/intel/iavf/iavf-4.9.5-zc/src/iidc.h index c5d9bb8e33..a865e971fd 100644 --- a/drivers/intel/iavf/iavf-4.9.5-zc/src/iidc.h +++ b/drivers/intel/iavf/iavf-4.9.5-zc/src/iidc.h @@ -10,7 +10,11 @@ #include #include #ifdef USE_INTEL_AUX_BUS +#ifdef HAVE_PF_RING +#include "auxiliary_bus.h" +#else #include "linux/auxiliary_bus.h" +#endif #else #include #endif /* USE_INTEL_AUX_BUS */