diff --git a/iscsi-scst/Makefile b/iscsi-scst/Makefile index 6dda3422c..7ac41c95d 100644 --- a/iscsi-scst/Makefile +++ b/iscsi-scst/Makefile @@ -123,19 +123,21 @@ CONFTEST_OUTPUTS = $(shell \ echo $$t/result-$(KVER).txt; \ done) -CONFTEST_CFLAGS = $(OFED_CFLAGS) \ - -DOFED_FLAVOR=$(OFED_FLAVOR) \ +CONFTEST_CFLAGS = \ $(shell for t in $(CONFTESTS); do \ cat $$t/result-$(KVER).txt 2>/dev/null; \ done) +ISER_CFLAGS = $(OFED_CFLAGS) -DOFED_FLAVOR=$(OFED_FLAVOR) $(CONFTEST_CFLAGS) + mods: include/iscsi_scst_itf_ver.h $(CONFTEST_OUTPUTS) - $(MAKE) -C $(KDIR) M=$(KMOD) CONFTEST_CFLAGS="$(CONFTEST_CFLAGS)" modules + $(MAKE) -C $(KDIR) M=$(KMOD) CONFTEST_CFLAGS="$(CONFTEST_CFLAGS)"\ + modules echo "$@: INFINIBAND_ENABLED = $(INFINIBAND_ENABLED)" - if $(INFINIBAND_ENABLED); then \ - echo " Building against $(OFED_FLAVOR) RDMA kernel headers."; \ - $(MAKE) -C $(KDIR) M=$(ISERTMOD) CONFTEST_CFLAGS="$(CONFTEST_CFLAGS)"\ - $(OFED_CONFIG) modules; \ + if $(INFINIBAND_ENABLED); then \ + echo " Building against $(OFED_FLAVOR) RDMA kernel headers.";\ + $(MAKE) -C $(KDIR) M=$(ISERTMOD) ISER_CFLAGS="$(ISER_CFLAGS)" \ + $(OFED_CONFIG) modules; \ fi progs: include/iscsi_scst_itf_ver.h diff --git a/iscsi-scst/kernel/Kbuild b/iscsi-scst/kernel/Kbuild index 08feb06b1..c6d33400d 100644 --- a/iscsi-scst/kernel/Kbuild +++ b/iscsi-scst/kernel/Kbuild @@ -14,9 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -KBUILD_EXTRA_SYMBOLS = $(src)/../../scst/src/Module.symvers \ - $(shell for d in /usr/src/ofa_kernel/default/Module.symvers; do\ - [ -e $$d ] || continue; echo $$d; break; done) +KBUILD_EXTRA_SYMBOLS = $(src)/../../scst/src/Module.symvers ccflags-y += -I$(src)/../include -I$(src)/../../scst/include ccflags-y += $(CONFTEST_CFLAGS) diff --git a/iscsi-scst/kernel/isert-scst/Kbuild b/iscsi-scst/kernel/isert-scst/Kbuild index 6d583711e..932a6bf87 100644 --- a/iscsi-scst/kernel/isert-scst/Kbuild +++ b/iscsi-scst/kernel/isert-scst/Kbuild @@ -14,7 +14,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -LINUXINCLUDE := $(CONFTEST_CFLAGS) $(LINUXINCLUDE) +LINUXINCLUDE := $(ISER_CFLAGS) $(LINUXINCLUDE) KBUILD_EXTRA_SYMBOLS=$(src)/../../kernel/Module.symvers \ $(shell for d in /usr/src/ofa_kernel/default/Module.symvers; do\ [ -e $$d ] || continue; echo $$d; break; done) diff --git a/scst/include/backport.h b/scst/include/backport.h index 5ec336841..abb90c6f5 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -2032,8 +2032,24 @@ enum { #define wwn_to_u64(wwn) get_unaligned_be64(wwn) #endif +/* + * See also commit c39e0af64bce ("scsi: scsi_transport_fc: Add FPIN fc event + * codes") # v5.2 + */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0) +static inline void +fc_host_fpin_rcv(struct Scsi_Host *shost, u32 fpin_len, char *fpin_buf) +{ +} +#endif + /* */ +/* See also commit a7dff3ad4787 ("scsi: fc: add FPIN ELS definition") # v5.2 */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 2, 0) +#define ELS_FPIN 0x16 +#endif + /* * See also commit 62e9dd177732 ("scsi: qla2xxx: Change in PUREX to handle FPIN * ELS requests").