diff --git a/iscsi-scst/Makefile b/iscsi-scst/Makefile index 5cab2239d..421b77325 100644 --- a/iscsi-scst/Makefile +++ b/iscsi-scst/Makefile @@ -48,7 +48,7 @@ ifeq ($(INSTALL_MOD_PATH),) endif INSTALL_DIR := $(INSTALL_MOD_PATH)/lib/modules/$(KVER)/extra -INFINIBAND_ENABLED := $(shell if grep -q '^CONFIG_INFINIBAND=[my]$$' $(KDIR)/.config; then echo true; else echo false; fi) +INFINIBAND_ENABLED = $(shell if grep -wq 'ib_register_client' $$(dirname "$(KDIR)")/modules.symbols; then echo true; else echo false; fi) all: progs mods @@ -112,6 +112,7 @@ PRE_CFLAGS=$(OFED_CFLAGS) $(CREATE_CQ_FLAG) -DOFED_FLAVOR=$(OFED_FLAVOR) mods: include/iscsi_scst_itf_ver.h Modules.symvers Module.symvers $(MAKE) -C $(KDIR) SCST_INC_DIR=$(SCST_INC_DIR) SUBDIRS=$(KMOD) modules + echo "$@: INFINIBAND_ENABLED = $(INFINIBAND_ENABLED)" if $(INFINIBAND_ENABLED); then \ echo " Building against $(OFED_FLAVOR) InfiniBand kernel headers."; \ $(MAKE) -C $(KDIR) SCST_INC_DIR=$(SCST_INC_DIR) SUBDIRS=$(ISERTMOD) \ @@ -138,6 +139,7 @@ install: all $(MAKE) -C $(KDIR) SCST_INC_DIR=$(SCST_INC_DIR) SUBDIRS=$(KMOD) \ $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ modules_install + echo "$@: INFINIBAND_ENABLED = $(INFINIBAND_ENABLED)" if $(INFINIBAND_ENABLED); then \ $(MAKE) -C $(KDIR) SCST_INC_DIR=$(SCST_INC_DIR) SUBDIRS=$(ISERTMOD) \ $$([ -n "$(DESTDIR)$(INSTALL_MOD_PATH)" ] && echo DEPMOD=true) \ @@ -159,6 +161,7 @@ ifneq ($(SCST_MOD_VERS),) Modules.symvers: $(SCST_DIR)/Modules.symvers echo $(SCST_MOD_VERS) cp $(SCST_DIR)/Modules.symvers kernel/ + echo "$@: INFINIBAND_ENABLED = $(INFINIBAND_ENABLED)" if $(INFINIBAND_ENABLED); then \ cp $(SCST_DIR)/Modules.symvers kernel/isert-scst; \ fi diff --git a/scripts/generate-kernel-patch b/scripts/generate-kernel-patch index 6af9fd0de..89fab2cd1 100755 --- a/scripts/generate-kernel-patch +++ b/scripts/generate-kernel-patch @@ -114,7 +114,7 @@ function specialize_patch { fi | "$(dirname $0)/specialize-patch" \ ${specialize_patch_options} \ - -v kernel_version="${kver}" \ + -v kernel_version="${kver3}" \ -v SCSI_EXEC_REQ_FIFO_DEFINED="${scsi_exec_req_fifo_defined}" \ -v SCST_IO_CONTEXT="${scst_io_context}" else @@ -478,7 +478,7 @@ add_file "fcst/README" "Documentation/scst/README.fcst" \ # Directory drivers/scst/iscsi-scst/ # Make sure the file iscsi-scst/iscsi_scst_itf_ver.h is up to date. -make KVER=${kver3} -s -C iscsi-scst include/iscsi_scst_itf_ver.h +make -s -C iscsi-scst include/iscsi_scst_itf_ver.h ( for f in $(ls iscsi-scst/include/*h 2>/dev/null)