From ebb024ff68e6cb07b044b36d0dfe11daa63adeec Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 26 Jul 2020 23:51:54 +0000 Subject: [PATCH 1/2] scst/include/backport.h: Backport qla2x00t-32gbit to older kernel versions git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9084 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/backport.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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"). From 86d602973b7747c5c154c840ce9221b582d8e868 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 26 Jul 2020 23:52:40 +0000 Subject: [PATCH 2/2] iscsi-scst: Make this kernel module again independent of (M)OFED This patch reverts f58c8248dd8f ("iscst-scst: Fix the OFED build"). This patch partially reverts bd3355500a41 ("iscsi-scst, srpt: Rename the PRE_CFLAGS variable into CONFTEST_FLAGS"). git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9085 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/Makefile | 16 +++++++++------- iscsi-scst/kernel/Kbuild | 4 +--- iscsi-scst/kernel/isert-scst/Kbuild | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) 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)