From 16fe64bc13448869ee0ea837308f96eae2691688 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 9 Oct 2017 18:10:48 +0000 Subject: [PATCH 1/4] scst_vdisk: Fix a bug in the Linux kernel v4.13 port See also trunk r7240. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7248 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/backport.h | 1 + scst/src/dev_handlers/scst_vdisk.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scst/include/backport.h b/scst/include/backport.h index 3aeb67771..f2c0352a7 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -57,6 +57,7 @@ static inline struct bio_set *bioset_create_backport(unsigned int pool_size, return bioset_create(pool_size, front_pad); } #define bioset_create bioset_create_backport +#define BIOSET_NEED_BVECS 1 #endif /* */ diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 3e5efddfc..c4bfb1969 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -7818,7 +7818,7 @@ static int vdisk_create_bioset(struct scst_vdisk_dev *virt_dev) EXTRACHECKS_BUG_ON(virt_dev->vdisk_bioset || !virt_dev->blockio); /* Pool size doesn't really matter */ - virt_dev->vdisk_bioset = bioset_create(2, 0, 0); + virt_dev->vdisk_bioset = bioset_create(2, 0, BIOSET_NEED_BVECS); if (virt_dev->vdisk_bioset == NULL) { PRINT_ERROR("Failed to create bioset (dev %s)", virt_dev->name); res = -ENOMEM; From 47b7da25aa54d44737c25e518b185f1123cba503 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 9 Oct 2017 18:15:00 +0000 Subject: [PATCH 2/4] scst: Fix SCSI pass-through for kernel version v4.11 and later See also trunk r7153. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7249 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 8bf237ef1..04e39b4a7 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -7866,6 +7866,10 @@ static struct request *blk_make_request(struct request_queue *q, scsi_req_init(scsi_req(rq)); #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) scsi_req_init(rq); +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) + rq->cmd_flags = bio_data_dir(bio) == READ ? REQ_OP_SCSI_IN : + REQ_OP_SCSI_OUT; #else blk_rq_set_block_pc(rq); #endif @@ -8042,6 +8046,9 @@ static struct request *__blk_map_kern_sg(struct request_queue *q, */ rq->cmd_type = REQ_TYPE_BLOCK_PC; #endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) + rq->cmd_flags = reading ? REQ_OP_SCSI_IN : REQ_OP_SCSI_OUT; +#endif if (bw != NULL) { atomic_set(&bw->bios_inflight, bios); @@ -8095,8 +8102,11 @@ static struct request *blk_map_kern_sg(struct request_queue *q, scsi_req_init(scsi_req(rq)); #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) scsi_req_init(rq); +#endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) + rq->cmd_flags = reading ? REQ_OP_SCSI_IN : REQ_OP_SCSI_OUT; #else - rq->cmd_type = REQ_TYPE_BLOCK_PC; + blk_rq_set_block_pc(rq); #endif goto out; } From ebbb2f39b1063007f06faa4212c49a75b2fa12f8 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 9 Oct 2017 19:58:15 +0000 Subject: [PATCH 3/4] scst/include/backport.h: Follow-up for r7248 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7250 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/backport.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scst/include/backport.h b/scst/include/backport.h index f2c0352a7..ee3f172c6 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -57,7 +57,7 @@ static inline struct bio_set *bioset_create_backport(unsigned int pool_size, return bioset_create(pool_size, front_pad); } #define bioset_create bioset_create_backport -#define BIOSET_NEED_BVECS 1 +#define BIOSET_NEED_BVECS 0 #endif /* */ From 339bc321a4bc7f12fa596b422abeab4ccc1fee86 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Tue, 10 Oct 2017 02:06:13 +0000 Subject: [PATCH 4/4] qla2x00t: update FW version information as suggested by Jens-U. Mozdzen See https://sourceforge.net/p/scst/mailman/message/36068827/ git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7251 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t/qla2x00-target/README | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qla2x00t/qla2x00-target/README b/qla2x00t/qla2x00-target/README index fb1b40640..34dafb4d5 100644 --- a/qla2x00t/qla2x00-target/README +++ b/qla2x00t/qla2x00-target/README @@ -110,10 +110,12 @@ https://forums.openfiler.com/viewtopic.php?id=3422. IMPORTANT USAGE NOTES --------------------- -1. It is strongly recommended to use firmware version 5.x or higher -for 24xx/25xx adapters. See +1. It is strongly recommended to use firmware version 5.x or higher for +24xx/25xx adapters. See http://sourceforge.net/mailarchive/forum.php?thread_name=4B4CD39F.6020401%40vlnb.net&forum_name=scst-devel -for more details why. +for more details why. Recent report also suggest that openSUSE ships FW +8.6.0 that leads to severe "scst: TM fn ABORT_TASK/0" errors on the +target side, but using the latest 8.7.0 firmware from QLogic works well. 2. If you reload qla2x00tgt module, you should also reload qla2xxx module, otherwise your initiators could not see the target, when it is