From 84eeab1b45b68c92628c70b273010617b4f2b32e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 2 Apr 2022 16:23:03 +0200 Subject: [PATCH] 5.4-stable patches added patches: scsi-qla2xxx-fix-disk-failure-to-rediscover.patch scsi-qla2xxx-fix-hang-due-to-session-stuck.patch scsi-qla2xxx-fix-incorrect-reporting-of-task-management-failure.patch scsi-qla2xxx-fix-missed-dma-unmap-for-nvme-ls-requests.patch scsi-qla2xxx-fix-n2n-inconsistent-plogi.patch scsi-qla2xxx-reduce-false-trigger-to-login.patch scsi-qla2xxx-suppress-a-kernel-complaint-in-qla_create_qpair.patch scsi-qla2xxx-use-correct-feature-type-field-during-rff_id-processing.patch --- ...a2xxx-fix-disk-failure-to-rediscover.patch | 74 ++++++++++++++++++ ...la2xxx-fix-hang-due-to-session-stuck.patch | 78 +++++++++++++++++++ ...reporting-of-task-management-failure.patch | 37 +++++++++ ...issed-dma-unmap-for-nvme-ls-requests.patch | 71 +++++++++++++++++ ...i-qla2xxx-fix-n2n-inconsistent-plogi.patch | 57 ++++++++++++++ ...la2xxx-reduce-false-trigger-to-login.patch | 47 +++++++++++ ...kernel-complaint-in-qla_create_qpair.patch | 64 +++++++++++++++ ...-type-field-during-rff_id-processing.patch | 46 +++++++++++ queue-5.4/series | 8 ++ 9 files changed, 482 insertions(+) create mode 100644 queue-5.4/scsi-qla2xxx-fix-disk-failure-to-rediscover.patch create mode 100644 queue-5.4/scsi-qla2xxx-fix-hang-due-to-session-stuck.patch create mode 100644 queue-5.4/scsi-qla2xxx-fix-incorrect-reporting-of-task-management-failure.patch create mode 100644 queue-5.4/scsi-qla2xxx-fix-missed-dma-unmap-for-nvme-ls-requests.patch create mode 100644 queue-5.4/scsi-qla2xxx-fix-n2n-inconsistent-plogi.patch create mode 100644 queue-5.4/scsi-qla2xxx-reduce-false-trigger-to-login.patch create mode 100644 queue-5.4/scsi-qla2xxx-suppress-a-kernel-complaint-in-qla_create_qpair.patch create mode 100644 queue-5.4/scsi-qla2xxx-use-correct-feature-type-field-during-rff_id-processing.patch diff --git a/queue-5.4/scsi-qla2xxx-fix-disk-failure-to-rediscover.patch b/queue-5.4/scsi-qla2xxx-fix-disk-failure-to-rediscover.patch new file mode 100644 index 00000000000..e13703ab1cd --- /dev/null +++ b/queue-5.4/scsi-qla2xxx-fix-disk-failure-to-rediscover.patch @@ -0,0 +1,74 @@ +From 6a45c8e137d4e2c72eecf1ac7cf64f2fdfcead99 Mon Sep 17 00:00:00 2001 +From: Quinn Tran +Date: Thu, 10 Mar 2022 01:25:53 -0800 +Subject: scsi: qla2xxx: Fix disk failure to rediscover + +From: Quinn Tran + +commit 6a45c8e137d4e2c72eecf1ac7cf64f2fdfcead99 upstream. + +User experienced some of the LUN failed to get rediscovered after long +cable pull test. The issue is triggered by a race condition between driver +setting session online state vs starting the LUN scan process at the same +time. Current code set the online state after notifying the session is +available. In this case, trigger to start the LUN scan process happened +before driver could set the session in online state. LUN scan ends up with +failure due to the session online check was failing. + +Set the online state before reporting of the availability of the session. + +Link: https://lore.kernel.org/r/20220310092604.22950-3-njavali@marvell.com +Fixes: aecf043443d3 ("scsi: qla2xxx: Fix Remote port registration") +Cc: stable@vger.kernel.org +Reviewed-by: Himanshu Madhani +Signed-off-by: Quinn Tran +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/qla2xxx/qla_init.c | 5 +++-- + drivers/scsi/qla2xxx/qla_nvme.c | 5 +++++ + 2 files changed, 8 insertions(+), 2 deletions(-) + +--- a/drivers/scsi/qla2xxx/qla_init.c ++++ b/drivers/scsi/qla2xxx/qla_init.c +@@ -5372,6 +5372,8 @@ qla2x00_reg_remote_port(scsi_qla_host_t + if (atomic_read(&fcport->state) == FCS_ONLINE) + return; + ++ qla2x00_set_fcport_state(fcport, FCS_ONLINE); ++ + rport_ids.node_name = wwn_to_u64(fcport->node_name); + rport_ids.port_name = wwn_to_u64(fcport->port_name); + rport_ids.port_id = fcport->d_id.b.domain << 16 | +@@ -5467,6 +5469,7 @@ qla2x00_update_fcport(scsi_qla_host_t *v + qla2x00_reg_remote_port(vha, fcport); + break; + case MODE_TARGET: ++ qla2x00_set_fcport_state(fcport, FCS_ONLINE); + if (!vha->vha_tgt.qla_tgt->tgt_stop && + !vha->vha_tgt.qla_tgt->tgt_stopped) + qlt_fc_port_added(vha, fcport); +@@ -5481,8 +5484,6 @@ qla2x00_update_fcport(scsi_qla_host_t *v + break; + } + +- qla2x00_set_fcport_state(fcport, FCS_ONLINE); +- + if (IS_IIDMA_CAPABLE(vha->hw) && vha->hw->flags.gpsc_supported) { + if (fcport->id_changed) { + fcport->id_changed = 0; +--- a/drivers/scsi/qla2xxx/qla_nvme.c ++++ b/drivers/scsi/qla2xxx/qla_nvme.c +@@ -36,6 +36,11 @@ int qla_nvme_register_remote(struct scsi + (fcport->nvme_flag & NVME_FLAG_REGISTERED)) + return 0; + ++ if (atomic_read(&fcport->state) == FCS_ONLINE) ++ return 0; ++ ++ qla2x00_set_fcport_state(fcport, FCS_ONLINE); ++ + fcport->nvme_flag &= ~NVME_FLAG_RESETTING; + + memset(&req, 0, sizeof(struct nvme_fc_port_info)); diff --git a/queue-5.4/scsi-qla2xxx-fix-hang-due-to-session-stuck.patch b/queue-5.4/scsi-qla2xxx-fix-hang-due-to-session-stuck.patch new file mode 100644 index 00000000000..7de356e954e --- /dev/null +++ b/queue-5.4/scsi-qla2xxx-fix-hang-due-to-session-stuck.patch @@ -0,0 +1,78 @@ +From c02aada06d19a215c8291bd968a99a270e96f734 Mon Sep 17 00:00:00 2001 +From: Quinn Tran +Date: Thu, 10 Mar 2022 01:25:58 -0800 +Subject: scsi: qla2xxx: Fix hang due to session stuck + +From: Quinn Tran + +commit c02aada06d19a215c8291bd968a99a270e96f734 upstream. + +User experienced device lost. The log shows Get port data base command was +queued up, failed, and requeued again. Every time it is requeued, it set +the FCF_ASYNC_ACTIVE. This prevents any recovery code from occurring +because driver thinks a recovery is in progress for this session. In +essence, this session is hung. The reason it gets into this place is the +session deletion got in front of this call due to link perturbation. + +Break the requeue cycle and exit. The session deletion code will trigger a +session relogin. + +Link: https://lore.kernel.org/r/20220310092604.22950-8-njavali@marvell.com +Fixes: 726b85487067 ("qla2xxx: Add framework for async fabric discovery") +Cc: stable@vger.kernel.org +Reviewed-by: Himanshu Madhani +Signed-off-by: Quinn Tran +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/qla2xxx/qla_def.h | 4 ++++ + drivers/scsi/qla2xxx/qla_init.c | 19 +++++++++++++++++-- + 2 files changed, 21 insertions(+), 2 deletions(-) + +--- a/drivers/scsi/qla2xxx/qla_def.h ++++ b/drivers/scsi/qla2xxx/qla_def.h +@@ -4870,4 +4870,8 @@ struct sff_8247_a0 { + #include "qla_gbl.h" + #include "qla_dbg.h" + #include "qla_inline.h" ++ ++#define IS_SESSION_DELETED(_fcport) (_fcport->disc_state == DSC_DELETE_PEND || \ ++ _fcport->disc_state == DSC_DELETED) ++ + #endif +--- a/drivers/scsi/qla2xxx/qla_init.c ++++ b/drivers/scsi/qla2xxx/qla_init.c +@@ -572,6 +572,14 @@ qla2x00_async_adisc(struct scsi_qla_host + struct srb_iocb *lio; + int rval = QLA_FUNCTION_FAILED; + ++ if (IS_SESSION_DELETED(fcport)) { ++ ql_log(ql_log_warn, vha, 0xffff, ++ "%s: %8phC is being delete - not sending command.\n", ++ __func__, fcport->port_name); ++ fcport->flags &= ~FCF_ASYNC_ACTIVE; ++ return rval; ++ } ++ + if (!vha->flags.online || (fcport->flags & FCF_ASYNC_SENT)) + return rval; + +@@ -1314,8 +1322,15 @@ int qla24xx_async_gpdb(struct scsi_qla_h + struct port_database_24xx *pd; + struct qla_hw_data *ha = vha->hw; + +- if (!vha->flags.online || (fcport->flags & FCF_ASYNC_SENT) || +- fcport->loop_id == FC_NO_LOOP_ID) { ++ if (IS_SESSION_DELETED(fcport)) { ++ ql_log(ql_log_warn, vha, 0xffff, ++ "%s: %8phC is being delete - not sending command.\n", ++ __func__, fcport->port_name); ++ fcport->flags &= ~FCF_ASYNC_ACTIVE; ++ return rval; ++ } ++ ++ if (!vha->flags.online || fcport->flags & FCF_ASYNC_SENT) { + ql_log(ql_log_warn, vha, 0xffff, + "%s: %8phC online %d flags %x - not sending command.\n", + __func__, fcport->port_name, vha->flags.online, fcport->flags); diff --git a/queue-5.4/scsi-qla2xxx-fix-incorrect-reporting-of-task-management-failure.patch b/queue-5.4/scsi-qla2xxx-fix-incorrect-reporting-of-task-management-failure.patch new file mode 100644 index 00000000000..f447adc51dd --- /dev/null +++ b/queue-5.4/scsi-qla2xxx-fix-incorrect-reporting-of-task-management-failure.patch @@ -0,0 +1,37 @@ +From 58ca5999e0367d131de82a75257fbfd5aed0195d Mon Sep 17 00:00:00 2001 +From: Quinn Tran +Date: Thu, 10 Mar 2022 01:25:52 -0800 +Subject: scsi: qla2xxx: Fix incorrect reporting of task management failure + +From: Quinn Tran + +commit 58ca5999e0367d131de82a75257fbfd5aed0195d upstream. + +User experienced no task management error while target device is responding +with error. The RSP_CODE field in the status IOCB is in little endian. +Driver assumes it's big endian and it picked up erroneous data. + +Convert the data back to big endian as is on the wire. + +Link: https://lore.kernel.org/r/20220310092604.22950-2-njavali@marvell.com +Fixes: faef62d13463 ("[SCSI] qla2xxx: Fix Task Management command asynchronous handling") +Cc: stable@vger.kernel.org +Reviewed-by: Himanshu Madhani +Signed-off-by: Quinn Tran +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/qla2xxx/qla_isr.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/scsi/qla2xxx/qla_isr.c ++++ b/drivers/scsi/qla2xxx/qla_isr.c +@@ -1839,6 +1839,7 @@ qla24xx_tm_iocb_entry(scsi_qla_host_t *v + iocb->u.tmf.data = QLA_FUNCTION_FAILED; + } else if ((le16_to_cpu(sts->scsi_status) & + SS_RESPONSE_INFO_LEN_VALID)) { ++ host_to_fcp_swap(sts->data, sizeof(sts->data)); + if (le32_to_cpu(sts->rsp_data_len) < 4) { + ql_log(ql_log_warn, fcport->vha, 0x503b, + "Async-%s error - hdl=%x not enough response(%d).\n", diff --git a/queue-5.4/scsi-qla2xxx-fix-missed-dma-unmap-for-nvme-ls-requests.patch b/queue-5.4/scsi-qla2xxx-fix-missed-dma-unmap-for-nvme-ls-requests.patch new file mode 100644 index 00000000000..6c11b1952ff --- /dev/null +++ b/queue-5.4/scsi-qla2xxx-fix-missed-dma-unmap-for-nvme-ls-requests.patch @@ -0,0 +1,71 @@ +From c85ab7d9e27a80e48d5b7d7fb2fe2b0fdb2de523 Mon Sep 17 00:00:00 2001 +From: Arun Easi +Date: Thu, 10 Mar 2022 01:25:55 -0800 +Subject: scsi: qla2xxx: Fix missed DMA unmap for NVMe ls requests + +From: Arun Easi + +commit c85ab7d9e27a80e48d5b7d7fb2fe2b0fdb2de523 upstream. + +At NVMe ELS request time, request structure is DMA mapped and never +unmapped. Fix this by calling the unmap on ELS completion. + +Link: https://lore.kernel.org/r/20220310092604.22950-5-njavali@marvell.com +Fixes: e84067d74301 ("scsi: qla2xxx: Add FC-NVMe F/W initialization and transport registration") +Cc: stable@vger.kernel.org +Reviewed-by: Himanshu Madhani +Signed-off-by: Arun Easi +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/qla2xxx/qla_nvme.c | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +--- a/drivers/scsi/qla2xxx/qla_nvme.c ++++ b/drivers/scsi/qla2xxx/qla_nvme.c +@@ -157,6 +157,18 @@ out: + qla2xxx_rel_qpair_sp(sp->qpair, sp); + } + ++static void qla_nvme_ls_unmap(struct srb *sp, struct nvmefc_ls_req *fd) ++{ ++ if (sp->flags & SRB_DMA_VALID) { ++ struct srb_iocb *nvme = &sp->u.iocb_cmd; ++ struct qla_hw_data *ha = sp->fcport->vha->hw; ++ ++ dma_unmap_single(&ha->pdev->dev, nvme->u.nvme.cmd_dma, ++ fd->rqstlen, DMA_TO_DEVICE); ++ sp->flags &= ~SRB_DMA_VALID; ++ } ++} ++ + static void qla_nvme_release_ls_cmd_kref(struct kref *kref) + { + struct srb *sp = container_of(kref, struct srb, cmd_kref); +@@ -173,6 +185,8 @@ static void qla_nvme_release_ls_cmd_kref + spin_unlock_irqrestore(&priv->cmd_lock, flags); + + fd = priv->fd; ++ ++ qla_nvme_ls_unmap(sp, fd); + fd->done(fd, priv->comp_status); + out: + qla2x00_rel_sp(sp); +@@ -319,6 +333,8 @@ static int qla_nvme_ls_req(struct nvme_f + dma_sync_single_for_device(&ha->pdev->dev, nvme->u.nvme.cmd_dma, + fd->rqstlen, DMA_TO_DEVICE); + ++ sp->flags |= SRB_DMA_VALID; ++ + rval = qla2x00_start_sp(sp); + if (rval != QLA_SUCCESS) { + ql_log(ql_log_warn, vha, 0x700e, +@@ -326,6 +342,7 @@ static int qla_nvme_ls_req(struct nvme_f + wake_up(&sp->nvme_ls_waitq); + sp->priv = NULL; + priv->sp = NULL; ++ qla_nvme_ls_unmap(sp, fd); + qla2x00_rel_sp(sp); + return rval; + } diff --git a/queue-5.4/scsi-qla2xxx-fix-n2n-inconsistent-plogi.patch b/queue-5.4/scsi-qla2xxx-fix-n2n-inconsistent-plogi.patch new file mode 100644 index 00000000000..78b4c600a87 --- /dev/null +++ b/queue-5.4/scsi-qla2xxx-fix-n2n-inconsistent-plogi.patch @@ -0,0 +1,57 @@ +From c13ce47c64ea8f14e77eecb40d1e7c2ac667f898 Mon Sep 17 00:00:00 2001 +From: Quinn Tran +Date: Thu, 10 Mar 2022 01:25:57 -0800 +Subject: scsi: qla2xxx: Fix N2N inconsistent PLOGI + +From: Quinn Tran + +commit c13ce47c64ea8f14e77eecb40d1e7c2ac667f898 upstream. + +For N2N topology, ELS Passthrough is used to send PLOGI. On failure of ELS +pass through PLOGI, driver flipped over to using LLIOCB PLOGI for N2N. This +is not consistent. Delete the session to restart the connection where ELS +pass through PLOGI would be used consistently. + +Link: https://lore.kernel.org/r/20220310092604.22950-7-njavali@marvell.com +Fixes: c76ae845ea83 ("scsi: qla2xxx: Add error handling for PLOGI ELS passthrough") +Cc: stable@vger.kernel.org +Reviewed-by: Himanshu Madhani +Signed-off-by: Quinn Tran +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/qla2xxx/qla_iocb.c | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +--- a/drivers/scsi/qla2xxx/qla_iocb.c ++++ b/drivers/scsi/qla2xxx/qla_iocb.c +@@ -2859,6 +2859,7 @@ static void qla2x00_els_dcmd2_sp_done(sr + set_bit(ISP_ABORT_NEEDED, + &vha->dpc_flags); + qla2xxx_wake_dpc(vha); ++ break; + } + /* fall through */ + default: +@@ -2868,9 +2869,7 @@ static void qla2x00_els_dcmd2_sp_done(sr + fw_status[0], fw_status[1], fw_status[2]); + + fcport->flags &= ~FCF_ASYNC_SENT; +- qla2x00_set_fcport_disc_state(fcport, +- DSC_LOGIN_FAILED); +- set_bit(RELOGIN_NEEDED, &vha->dpc_flags); ++ qlt_schedule_sess_for_deletion(fcport); + break; + } + break; +@@ -2882,8 +2881,7 @@ static void qla2x00_els_dcmd2_sp_done(sr + fw_status[0], fw_status[1], fw_status[2]); + + sp->fcport->flags &= ~FCF_ASYNC_SENT; +- qla2x00_set_fcport_disc_state(fcport, DSC_LOGIN_FAILED); +- set_bit(RELOGIN_NEEDED, &vha->dpc_flags); ++ qlt_schedule_sess_for_deletion(fcport); + break; + } + diff --git a/queue-5.4/scsi-qla2xxx-reduce-false-trigger-to-login.patch b/queue-5.4/scsi-qla2xxx-reduce-false-trigger-to-login.patch new file mode 100644 index 00000000000..7a3a849cdd1 --- /dev/null +++ b/queue-5.4/scsi-qla2xxx-reduce-false-trigger-to-login.patch @@ -0,0 +1,47 @@ +From d2646eed7b19a206912f49101178cbbaa507256c Mon Sep 17 00:00:00 2001 +From: Quinn Tran +Date: Thu, 10 Mar 2022 01:26:00 -0800 +Subject: scsi: qla2xxx: Reduce false trigger to login + +From: Quinn Tran + +commit d2646eed7b19a206912f49101178cbbaa507256c upstream. + +While a session is in the middle of a relogin, a late RSCN can be delivered +from switch. RSCN trigger fabric scan where the scan logic can trigger +another session login while a login is in progress. Reduce the extra +trigger to prevent multiple logins to the same session. + +Link: https://lore.kernel.org/r/20220310092604.22950-10-njavali@marvell.com +Fixes: bee8b84686c4 ("scsi: qla2xxx: Reduce redundant ADISC command for RSCNs") +Cc: stable@vger.kernel.org +Reviewed-by: Himanshu Madhani +Signed-off-by: Quinn Tran +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/qla2xxx/qla_init.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/scsi/qla2xxx/qla_init.c ++++ b/drivers/scsi/qla2xxx/qla_init.c +@@ -1557,7 +1557,8 @@ int qla24xx_fcport_handle_login(struct s + fcport->conflict, fcport->last_rscn_gen, fcport->rscn_gen, + fcport->login_gen, fcport->loop_id, fcport->scan_state); + +- if (fcport->scan_state != QLA_FCPORT_FOUND) ++ if (fcport->scan_state != QLA_FCPORT_FOUND || ++ fcport->disc_state == DSC_DELETE_PEND) + return 0; + + if ((fcport->loop_id != FC_NO_LOOP_ID) && +@@ -1578,7 +1579,7 @@ int qla24xx_fcport_handle_login(struct s + if (vha->host->active_mode == MODE_TARGET) + return 0; + +- if (fcport->flags & FCF_ASYNC_SENT) { ++ if (fcport->flags & (FCF_ASYNC_SENT | FCF_ASYNC_ACTIVE)) { + set_bit(RELOGIN_NEEDED, &vha->dpc_flags); + return 0; + } diff --git a/queue-5.4/scsi-qla2xxx-suppress-a-kernel-complaint-in-qla_create_qpair.patch b/queue-5.4/scsi-qla2xxx-suppress-a-kernel-complaint-in-qla_create_qpair.patch new file mode 100644 index 00000000000..dc62107e5ac --- /dev/null +++ b/queue-5.4/scsi-qla2xxx-suppress-a-kernel-complaint-in-qla_create_qpair.patch @@ -0,0 +1,64 @@ +From a60447e7d451df42c7bde43af53b34f10f34f469 Mon Sep 17 00:00:00 2001 +From: Saurav Kashyap +Date: Sun, 9 Jan 2022 21:02:15 -0800 +Subject: scsi: qla2xxx: Suppress a kernel complaint in qla_create_qpair() + +From: Saurav Kashyap + +commit a60447e7d451df42c7bde43af53b34f10f34f469 upstream. + +[ 12.323788] BUG: using smp_processor_id() in preemptible [00000000] code: systemd-udevd/1020 +[ 12.332297] caller is qla2xxx_create_qpair+0x32a/0x5d0 [qla2xxx] +[ 12.338417] CPU: 7 PID: 1020 Comm: systemd-udevd Tainted: G I --------- --- 5.14.0-29.el9.x86_64 #1 +[ 12.348827] Hardware name: Dell Inc. PowerEdge R610/0F0XJ6, BIOS 6.6.0 05/22/2018 +[ 12.356356] Call Trace: +[ 12.358821] dump_stack_lvl+0x34/0x44 +[ 12.362514] check_preemption_disabled+0xd9/0xe0 +[ 12.367164] qla2xxx_create_qpair+0x32a/0x5d0 [qla2xxx] +[ 12.372481] qla2x00_probe_one+0xa3a/0x1b80 [qla2xxx] +[ 12.377617] ? _raw_spin_lock_irqsave+0x19/0x40 +[ 12.384284] local_pci_probe+0x42/0x80 +[ 12.390162] ? pci_match_device+0xd7/0x110 +[ 12.396366] pci_device_probe+0xfd/0x1b0 +[ 12.402372] really_probe+0x1e7/0x3e0 +[ 12.408114] __driver_probe_device+0xfe/0x180 +[ 12.414544] driver_probe_device+0x1e/0x90 +[ 12.420685] __driver_attach+0xc0/0x1c0 +[ 12.426536] ? __device_attach_driver+0xe0/0xe0 +[ 12.433061] ? __device_attach_driver+0xe0/0xe0 +[ 12.439538] bus_for_each_dev+0x78/0xc0 +[ 12.445294] bus_add_driver+0x12b/0x1e0 +[ 12.451021] driver_register+0x8f/0xe0 +[ 12.456631] ? 0xffffffffc07bc000 +[ 12.461773] qla2x00_module_init+0x1be/0x229 [qla2xxx] +[ 12.468776] do_one_initcall+0x44/0x200 +[ 12.474401] ? load_module+0xad3/0xba0 +[ 12.479908] ? kmem_cache_alloc_trace+0x45/0x410 +[ 12.486268] do_init_module+0x5c/0x280 +[ 12.491730] __do_sys_init_module+0x12e/0x1b0 +[ 12.497785] do_syscall_64+0x3b/0x90 +[ 12.503029] entry_SYSCALL_64_after_hwframe+0x44/0xae +[ 12.509764] RIP: 0033:0x7f554f73ab2e + +Link: https://lore.kernel.org/r/20220110050218.3958-15-njavali@marvell.com +Cc: stable@vger.kernel.org +Reviewed-by: Himanshu Madhani +Signed-off-by: Saurav Kashyap +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/qla2xxx/qla_init.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/scsi/qla2xxx/qla_init.c ++++ b/drivers/scsi/qla2xxx/qla_init.c +@@ -9022,7 +9022,7 @@ struct qla_qpair *qla2xxx_create_qpair(s + qpair->rsp->req = qpair->req; + qpair->rsp->qpair = qpair; + /* init qpair to this cpu. Will adjust at run time. */ +- qla_cpu_update(qpair, smp_processor_id()); ++ qla_cpu_update(qpair, raw_smp_processor_id()); + + if (IS_T10_PI_CAPABLE(ha) && ql2xenabledif) { + if (ha->fw_attributes & BIT_4) diff --git a/queue-5.4/scsi-qla2xxx-use-correct-feature-type-field-during-rff_id-processing.patch b/queue-5.4/scsi-qla2xxx-use-correct-feature-type-field-during-rff_id-processing.patch new file mode 100644 index 00000000000..609244cbafb --- /dev/null +++ b/queue-5.4/scsi-qla2xxx-use-correct-feature-type-field-during-rff_id-processing.patch @@ -0,0 +1,46 @@ +From a7e05f7a1bcbe4ee055479242de46c5c16ab03b1 Mon Sep 17 00:00:00 2001 +From: Manish Rangankar +Date: Thu, 10 Mar 2022 01:26:02 -0800 +Subject: scsi: qla2xxx: Use correct feature type field during RFF_ID processing + +From: Manish Rangankar + +commit a7e05f7a1bcbe4ee055479242de46c5c16ab03b1 upstream. + +During SNS Register FC-4 Features (RFF_ID) the initiator driver was sending +incorrect type field for NVMe supported device. Use correct feature type +field. + +Link: https://lore.kernel.org/r/20220310092604.22950-12-njavali@marvell.com +Fixes: e374f9f59281 ("scsi: qla2xxx: Migrate switch registration commands away from mailbox interface") +Cc: stable@vger.kernel.org +Reviewed-by: Himanshu Madhani +Signed-off-by: Manish Rangankar +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Signed-off-by: Greg Kroah-Hartman +--- + drivers/scsi/qla2xxx/qla_gs.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +--- a/drivers/scsi/qla2xxx/qla_gs.c ++++ b/drivers/scsi/qla2xxx/qla_gs.c +@@ -675,8 +675,7 @@ qla2x00_rff_id(scsi_qla_host_t *vha, u8 + return (QLA_SUCCESS); + } + +- return qla_async_rffid(vha, &vha->d_id, qlt_rff_id(vha), +- FC4_TYPE_FCP_SCSI); ++ return qla_async_rffid(vha, &vha->d_id, qlt_rff_id(vha), type); + } + + static int qla_async_rffid(scsi_qla_host_t *vha, port_id_t *d_id, +@@ -726,7 +725,7 @@ static int qla_async_rffid(scsi_qla_host + /* Prepare CT arguments -- port_id, FC-4 feature, FC-4 type */ + ct_req->req.rff_id.port_id = port_id_to_be_id(*d_id); + ct_req->req.rff_id.fc4_feature = fc4feature; +- ct_req->req.rff_id.fc4_type = fc4type; /* SCSI - FCP */ ++ ct_req->req.rff_id.fc4_type = fc4type; /* SCSI-FCP or FC-NVMe */ + + sp->u.iocb_cmd.u.ctarg.req_size = RFF_ID_REQ_SIZE; + sp->u.iocb_cmd.u.ctarg.rsp_size = RFF_ID_RSP_SIZE; diff --git a/queue-5.4/series b/queue-5.4/series index e67491c44dc..daa9076e057 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -323,3 +323,11 @@ scsi-qla2xxx-fix-warning-for-missing-error-code.patch scsi-qla2xxx-fix-device-reconnect-in-loop-topology.patch scsi-qla2xxx-add-devids-and-conditionals-for-28xx.patch scsi-qla2xxx-check-for-firmware-dump-already-collected.patch +scsi-qla2xxx-suppress-a-kernel-complaint-in-qla_create_qpair.patch +scsi-qla2xxx-fix-disk-failure-to-rediscover.patch +scsi-qla2xxx-fix-incorrect-reporting-of-task-management-failure.patch +scsi-qla2xxx-fix-hang-due-to-session-stuck.patch +scsi-qla2xxx-fix-missed-dma-unmap-for-nvme-ls-requests.patch +scsi-qla2xxx-fix-n2n-inconsistent-plogi.patch +scsi-qla2xxx-reduce-false-trigger-to-login.patch +scsi-qla2xxx-use-correct-feature-type-field-during-rff_id-processing.patch -- 2.47.3