From 6787c12e959255d3130cb9ddddff824998714f54 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 31 May 2021 02:51:45 +0000 Subject: [PATCH 1/5] Makefile: add ability to enable qla-32gbit target Although qla-32gbit is mentioned in the README, but there wasn't really a way to enable it sans editing the code. This commit adds an ability to enable the driver by passing `QLA_32GBIT=y` variable at build time. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9434 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- debian/rules | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/debian/rules b/debian/rules index 53a3f307e..a7ddeba14 100755 --- a/debian/rules +++ b/debian/rules @@ -13,16 +13,17 @@ export DH_VERBOSE = 1 # package maintainers to append LDFLAGS #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -SUBDIRS=scst $(shell grep -qw '^CONFIG_LIBFC' /boot/config-$(uname -r) && echo fcst) iscsi-scst qla2x00t/qla2x00-target scst_local scstadmin srpt -DESTDIR=$(CURDIR)/debian/tmp -VERSION:=$(shell head -n1 debian/changelog | sed 's/.*(\([0-9.]*\).*).*/\1/') - -# rules won't see variables unless they're using DEB_foo_SET syntax. So use that as -# an intermediary. Also, export variables for sub-makes to be able to see them. +# rules won't see variables unless they're using DEB_foo_SET syntax. So use that +# as an intermediary. Also, export variables for sub-makes to be able to see +# them. export KVER=$(DEB_KVER_SET) export KDIR=$(DEB_KDIR_SET) export CC=$(DEB_CC_SET) +SUBDIRS=scst $(shell grep -qw '^CONFIG_LIBFC' /boot/config-$(KVER) && echo fcst) iscsi-scst qla2x00t/qla2x00-target scst_local scstadmin srpt +DESTDIR=$(CURDIR)/debian/tmp +VERSION:=$(shell head -n1 debian/changelog | sed 's/.*(\([0-9.]*\).*).*/\1/') + %: echo "*** dh $@ ***" dh $@ From b7ed3f8e77eaf552ac4eec6f26f757958d345f7b Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 31 May 2021 02:52:04 +0000 Subject: [PATCH 2/5] Makefile: switch to qla-32gbit by default Bart Van Assche noted that currently there are more people using the 32gbit driver than there are people using the older one. So it might make sense to finally make switch and default to the 32gbit driver. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9435 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- debian/rules | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/debian/rules b/debian/rules index a7ddeba14..53a3f307e 100755 --- a/debian/rules +++ b/debian/rules @@ -13,17 +13,16 @@ export DH_VERBOSE = 1 # package maintainers to append LDFLAGS #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -# rules won't see variables unless they're using DEB_foo_SET syntax. So use that -# as an intermediary. Also, export variables for sub-makes to be able to see -# them. +SUBDIRS=scst $(shell grep -qw '^CONFIG_LIBFC' /boot/config-$(uname -r) && echo fcst) iscsi-scst qla2x00t/qla2x00-target scst_local scstadmin srpt +DESTDIR=$(CURDIR)/debian/tmp +VERSION:=$(shell head -n1 debian/changelog | sed 's/.*(\([0-9.]*\).*).*/\1/') + +# rules won't see variables unless they're using DEB_foo_SET syntax. So use that as +# an intermediary. Also, export variables for sub-makes to be able to see them. export KVER=$(DEB_KVER_SET) export KDIR=$(DEB_KDIR_SET) export CC=$(DEB_CC_SET) -SUBDIRS=scst $(shell grep -qw '^CONFIG_LIBFC' /boot/config-$(KVER) && echo fcst) iscsi-scst qla2x00t/qla2x00-target scst_local scstadmin srpt -DESTDIR=$(CURDIR)/debian/tmp -VERSION:=$(shell head -n1 debian/changelog | sed 's/.*(\([0-9.]*\).*).*/\1/') - %: echo "*** dh $@ ***" dh $@ From 8f792b0abd603ed22214ca8499258289a20eb83a Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 31 May 2021 02:53:12 +0000 Subject: [PATCH 3/5] debian/rules: Use $(KVER) instead of $(uname -r) git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9436 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- debian/rules | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/debian/rules b/debian/rules index 53a3f307e..34750f045 100755 --- a/debian/rules +++ b/debian/rules @@ -13,16 +13,17 @@ export DH_VERBOSE = 1 # package maintainers to append LDFLAGS #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -SUBDIRS=scst $(shell grep -qw '^CONFIG_LIBFC' /boot/config-$(uname -r) && echo fcst) iscsi-scst qla2x00t/qla2x00-target scst_local scstadmin srpt -DESTDIR=$(CURDIR)/debian/tmp -VERSION:=$(shell head -n1 debian/changelog | sed 's/.*(\([0-9.]*\).*).*/\1/') - -# rules won't see variables unless they're using DEB_foo_SET syntax. So use that as -# an intermediary. Also, export variables for sub-makes to be able to see them. +# rules won't see variables unless they're using DEB_foo_SET syntax. So use +# that as an intermediary. Also, export variables for sub-makes to be able to +# see them. export KVER=$(DEB_KVER_SET) export KDIR=$(DEB_KDIR_SET) export CC=$(DEB_CC_SET) +SUBDIRS=scst $(shell grep -qw '^CONFIG_LIBFC' /boot/config-$(KVER) && echo fcst) iscsi-scst qla2x00t/qla2x00-target scst_local scstadmin srpt +DESTDIR=$(CURDIR)/debian/tmp +VERSION:=$(shell head -n1 debian/changelog | sed 's/.*(\([0-9.]*\).*).*/\1/') + %: echo "*** dh $@ ***" dh $@ From 27a6c65bf392abb361fe3a8d87d2f74ae8c17c4a Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 31 May 2021 02:58:28 +0000 Subject: [PATCH 4/5] Temporarily revert r9436 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9437 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- debian/rules | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/debian/rules b/debian/rules index 34750f045..53a3f307e 100755 --- a/debian/rules +++ b/debian/rules @@ -13,17 +13,16 @@ export DH_VERBOSE = 1 # package maintainers to append LDFLAGS #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -# rules won't see variables unless they're using DEB_foo_SET syntax. So use -# that as an intermediary. Also, export variables for sub-makes to be able to -# see them. +SUBDIRS=scst $(shell grep -qw '^CONFIG_LIBFC' /boot/config-$(uname -r) && echo fcst) iscsi-scst qla2x00t/qla2x00-target scst_local scstadmin srpt +DESTDIR=$(CURDIR)/debian/tmp +VERSION:=$(shell head -n1 debian/changelog | sed 's/.*(\([0-9.]*\).*).*/\1/') + +# rules won't see variables unless they're using DEB_foo_SET syntax. So use that as +# an intermediary. Also, export variables for sub-makes to be able to see them. export KVER=$(DEB_KVER_SET) export KDIR=$(DEB_KDIR_SET) export CC=$(DEB_CC_SET) -SUBDIRS=scst $(shell grep -qw '^CONFIG_LIBFC' /boot/config-$(KVER) && echo fcst) iscsi-scst qla2x00t/qla2x00-target scst_local scstadmin srpt -DESTDIR=$(CURDIR)/debian/tmp -VERSION:=$(shell head -n1 debian/changelog | sed 's/.*(\([0-9.]*\).*).*/\1/') - %: echo "*** dh $@ ***" dh $@ From 7aade0a1098c25064c0204023f1a8f8e1daaa909 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 31 May 2021 02:59:52 +0000 Subject: [PATCH 5/5] Makefile: Make the qla2x00t-32gbit driver the default QLogic FC driver Signed-off-by: Konstantin Kharlamov git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9438 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- Makefile | 13 ++++++++++--- README.md | 14 +++++++------- debian/rules | 14 ++++++++------ 3 files changed, 25 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 153149811..7640e6c0d 100644 --- a/Makefile +++ b/Makefile @@ -37,11 +37,17 @@ ifdef KDIR endif endif +ifeq ($(QLA_32GBIT),no) + QLA_INI_DIR=qla2x00t + QLA_DIR=qla2x00t/qla2x00-target +else + QLA_INI_DIR=qla2x00t-32gbit + QLA_DIR=qla2x00t-32gbit/qla2x00-target +endif + SCST_DIR=scst DOC_DIR=doc SCSTADM_DIR=scstadmin -QLA_INI_DIR=qla2x00t -QLA_DIR=qla2x00t/qla2x00-target USR_DIR=usr SRP_DIR=srpt SCST_LOCAL_DIR=scst_local @@ -395,7 +401,8 @@ dpkg: ../scst_$(VERSION).orig.tar.gz else \ buildopts+=(-j4); \ fi && \ - DEB_CC_SET="$(CC)" DEB_KVER_SET=$(KVER) DEB_KDIR_SET=$(KDIR) debuild "$${buildopts[@]}" --lintian-opts --profile debian && \ + DEB_CC_SET="$(CC)" DEB_KVER_SET=$(KVER) DEB_KDIR_SET=$(KDIR) DEB_QLA_DIR_SET=$(QLA_DIR) \ + DEB_QLA_INI_DIR_SET=$(QLA_INI_DIR) debuild "$${buildopts[@]}" --lintian-opts --profile debian && \ mkdir -p dpkg && \ for f in "$${output_files[@]}" ../scst_$(VERSION).orig.tar.[gx]z; do\ mv $$f dpkg || true; \ diff --git a/README.md b/README.md index 58d6c7ff0..241eec1c5 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,13 @@ file. ## QLogic target driver -Two QLogic target drivers are included in the SCST project. The driver in -the qla2x00t directory is a very stable driver that supports up to 16 Gb/s -adapters. It is very stable, well tested and actively used in many production -setups. +Two QLogic target drivers are included in the SCST project. -There is also a newer driver that supports 32 Gb/s FC in the qla2x00t-32gbit -directory. That driver has not yet reached the same maturity level as the -old qla2x00t driver. +The default driver is located in qla2x00t-32gbit directory and it supports up +to 32 Gb/s FC. It is the newer one. + +May anyone wish to switch back to the older driver that only supported up to +16 Gb/s adapters, it is located in qla2x00t directory. To make use of the +older driver build scst with environment variable `QLA_32GBIT=no` set. Vladislav Bolkhovitin , http://scst.sourceforge.net diff --git a/debian/rules b/debian/rules index 53a3f307e..0f25d1118 100755 --- a/debian/rules +++ b/debian/rules @@ -13,15 +13,17 @@ export DH_VERBOSE = 1 # package maintainers to append LDFLAGS #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -SUBDIRS=scst $(shell grep -qw '^CONFIG_LIBFC' /boot/config-$(uname -r) && echo fcst) iscsi-scst qla2x00t/qla2x00-target scst_local scstadmin srpt -DESTDIR=$(CURDIR)/debian/tmp -VERSION:=$(shell head -n1 debian/changelog | sed 's/.*(\([0-9.]*\).*).*/\1/') - # rules won't see variables unless they're using DEB_foo_SET syntax. So use that as # an intermediary. Also, export variables for sub-makes to be able to see them. export KVER=$(DEB_KVER_SET) export KDIR=$(DEB_KDIR_SET) export CC=$(DEB_CC_SET) +export QLA_DIR=$(DEB_QLA_DIR_SET) +export QLA_INI_DIR=$(DEB_QLA_INI_DIR_SET) + +SUBDIRS=scst $(shell grep -qw '^CONFIG_LIBFC' /boot/config-$(uname -r) && echo fcst) iscsi-scst $(QLA_DIR) scst_local scstadmin srpt +DESTDIR=$(CURDIR)/debian/tmp +VERSION:=$(shell head -n1 debian/changelog | sed 's/.*(\([0-9.]*\).*).*/\1/') %: echo "*** dh $@ ***" @@ -41,7 +43,7 @@ build: { \ echo dkms.conf && \ echo Makefile && \ - for d in fcst iscsi-scst qla2x00t scst scst_local srpt; do\ + for d in fcst iscsi-scst $(QLA_INI_DIR) scst scst_local srpt; do\ echo $$d; \ done; \ } | sed "s,^,usr/src/scst-$(VERSION)/," >debian/scst-dkms.install @@ -75,7 +77,7 @@ install: cp debian/scst.dkms \ $(DESTDIR)/usr/src/scst-$(VERSION)/dkms.conf && \ scripts/list-source-files | \ - grep -E '^Makefile$$|^(fcst|iscsi-scst|qla2x00t|scst|scst_local|srpt)/'|\ + grep -E '^Makefile$$|^(fcst|iscsi-scst|$(QLA_INI_DIR)|scst|scst_local|srpt)/'|\ tar -T- -cf- | \ tar -C $(DESTDIR)/usr/src/scst-$(VERSION) -xf- && \ find $(DESTDIR) -type f -print0 | xargs -0 -r chmod 0644 && \