From 567a1d5a35438ec6281b3274153040cbd2f27d3d Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 3 Nov 2021 14:27:57 +0000 Subject: [PATCH 1/4] qla2x00t*: Fix a 'make' invocation git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9590 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t-32gbit/Makefile | 2 +- qla2x00t/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qla2x00t-32gbit/Makefile b/qla2x00t-32gbit/Makefile index 688629a9c..ddcaafc56 100644 --- a/qla2x00t-32gbit/Makefile +++ b/qla2x00t-32gbit/Makefile @@ -50,7 +50,7 @@ INSTALL_DIR := $(INSTALL_MOD_PATH)/lib/modules/$(KVER)/extra all: $(MAKE) -C $(KDIR) M=$(shell pwd) \ $(shell [ -n "$(PASS_CC_TO_MAKE)" ] && echo CC="$(CC)") \ - $(CONFIG_SCSI_QLA2XXX_TARGET)=CONFIG_SCSI_QLA2XXX_TARGET + CONFIG_SCSI_QLA2XXX_TARGET=$(CONFIG_SCSI_QLA2XXX_TARGET) install: all KDIR=$(KDIR) ../scripts/sign-modules diff --git a/qla2x00t/Makefile b/qla2x00t/Makefile index 84fb09bb3..dfaa980ff 100644 --- a/qla2x00t/Makefile +++ b/qla2x00t/Makefile @@ -48,7 +48,7 @@ INSTALL_DIR := $(INSTALL_MOD_PATH)/lib/modules/$(KVER)/extra all: $(MAKE) -C $(KDIR) M=$(shell pwd) \ $(shell [ -n "$(PASS_CC_TO_MAKE)" ] && echo CC="$(CC)") \ - $(CONFIG_SCSI_QLA2XXX_TARGET)=CONFIG_SCSI_QLA2XXX_TARGET + CONFIG_SCSI_QLA2XXX_TARGET=$(CONFIG_SCSI_QLA2XXX_TARGET) install: all KDIR=$(KDIR) ../scripts/sign-modules From 5b9aca3f0308bd8cdfbc3972f02092b078619770 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 3 Nov 2021 14:28:56 +0000 Subject: [PATCH 2/4] scst: Port to Linux kernel v5.15 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9591 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 62997f980..444ca46ef 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -8249,7 +8249,8 @@ static struct request *blk_make_request(struct request_queue *q, if (IS_ERR(rq)) return rq; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) || \ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0) +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) || \ defined(CONFIG_SUSE_KERNEL) scsi_req_init(scsi_req(rq)); #else @@ -8480,7 +8481,8 @@ static struct request *blk_map_kern_sg(struct request_queue *q, if (unlikely(!rq)) return ERR_PTR(-ENOMEM); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) || \ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0) +#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) || \ defined(CONFIG_SUSE_KERNEL) scsi_req_init(scsi_req(rq)); #else From 8a2352239b51c0feb210e0b6c2e5d5e53c767eb0 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 3 Nov 2021 14:29:16 +0000 Subject: [PATCH 3/4] scst_local: Port to Linux kernel v5.15 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9592 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst_local/scst_local.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index 0eda086a2..2715d61aa 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -763,7 +763,7 @@ static int scst_local_abort(struct scsi_cmnd *scmd) sess = to_scst_lcl_sess(scsi_get_device(scmd->device->host)); ret = scst_rx_mgmt_fn_tag(sess->scst_sess, SCST_ABORT_TASK, - blk_mq_unique_tag(scmd->request), + blk_mq_unique_tag(scsi_cmd_to_rq(scmd)), false, &dev_reset_completion); /* Now wait for the completion ... */ @@ -962,7 +962,7 @@ static int scst_local_queuecommand_lck(struct scsi_cmnd *scmd, return SCSI_MLQUEUE_HOST_BUSY; } - scst_cmd_set_tag(scst_cmd, blk_mq_unique_tag(scmd->request)); + scst_cmd_set_tag(scst_cmd, blk_mq_unique_tag(scsi_cmd_to_rq(scmd))); #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) if (scmd->device->tagged_supported && scmd->device->simple_tags) scst_cmd_set_queue_type(scst_cmd, SCST_CMD_QUEUE_SIMPLE); From 193e63d118cba04c2b6b7b3cc3917d974aaa8101 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 3 Nov 2021 14:29:35 +0000 Subject: [PATCH 4/4] qla2x00t: Port to Linux kernel v5.15 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9593 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t/qla_iocb.c | 2 +- qla2x00t/qla_os.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qla2x00t/qla_iocb.c b/qla2x00t/qla_iocb.c index ae0f8ba0f..7584de906 100644 --- a/qla2x00t/qla_iocb.c +++ b/qla2x00t/qla_iocb.c @@ -1875,7 +1875,7 @@ static void qla25xx_set_que(srb_t *sp, struct rsp_que **rsp) { struct scsi_cmnd *cmd = GET_CMD_SP(sp); struct qla_hw_data *ha = sp->fcport->vha->hw; - int affinity = scst_blk_rq_cpu(cmd->request); + int affinity = scst_blk_rq_cpu(scsi_cmd_to_rq(cmd)); if (ha->flags.cpu_affinity_enabled && affinity >= 0 && affinity < ha->max_rsp_queues - 1) diff --git a/qla2x00t/qla_os.c b/qla2x00t/qla_os.c index b9d3741a4..0e86d1df5 100644 --- a/qla2x00t/qla_os.c +++ b/qla2x00t/qla_os.c @@ -1146,7 +1146,7 @@ __qla2xxx_eh_generic_reset(char *name, enum nexus_wait_type type, } err = 2; if (do_reset(fcport, cmd->device->lun, - scst_blk_rq_cpu(cmd->request) + 1) + scst_blk_rq_cpu(scsi_cmd_to_rq(cmd)) + 1) != QLA_SUCCESS) { ql_log(ql_log_warn, vha, 0x800c, "do_reset failed for cmd=%p.\n", cmd);