From c8fa035185cfb5547e8f51dd75b6bfd1c85f7f14 Mon Sep 17 00:00:00 2001 From: Yousaf Kaukab Date: Nov 03 2022 11:02:02 +0000 Subject: Merge remote-tracking branch 'origin/users/tbogendoerfer/SLE15-SP5/for-next' into SLE15-SP5 Pull QLogic QEDF driver backports from Thomas Bogendoerfer --- diff --git a/patches.suse/scsi-iscsi-Fix-session-removal-on-shutdown.patch b/patches.suse/scsi-iscsi-Fix-session-removal-on-shutdown.patch index 6a6e461..2d76dc2 100644 --- a/patches.suse/scsi-iscsi-Fix-session-removal-on-shutdown.patch +++ b/patches.suse/scsi-iscsi-Fix-session-removal-on-shutdown.patch @@ -60,7 +60,7 @@ Acked-by: Lee Duncan return NULL; --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c -@@ -5741,7 +5741,7 @@ static void beiscsi_remove(struct pci_de +@@ -5745,7 +5745,7 @@ static void beiscsi_remove(struct pci_de cancel_work_sync(&phba->sess_work); beiscsi_iface_destroy_default(phba); @@ -142,7 +142,7 @@ Acked-by: Lee Duncan if (signal_pending(current)) --- a/drivers/scsi/qedi/qedi_main.c +++ b/drivers/scsi/qedi/qedi_main.c -@@ -2418,9 +2418,12 @@ static void __qedi_remove(struct pci_dev +@@ -2414,9 +2414,12 @@ static void __qedi_remove(struct pci_dev int rval; u16 retry = 10; @@ -155,9 +155,9 @@ Acked-by: Lee Duncan + if (mode == QEDI_MODE_NORMAL || mode == QEDI_MODE_SHUTDOWN) { if (qedi->tmf_thread) { - flush_workqueue(qedi->tmf_thread); destroy_workqueue(qedi->tmf_thread); -@@ -2797,7 +2800,7 @@ remove_host: + qedi->tmf_thread = NULL; +@@ -2791,7 +2794,7 @@ remove_host: #ifdef CONFIG_DEBUG_FS qedi_dbg_host_exit(&qedi->dbg_ctx); #endif @@ -168,7 +168,7 @@ Acked-by: Lee Duncan stop_slowpath: --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h -@@ -412,7 +412,7 @@ extern int iscsi_host_add(struct Scsi_Ho +@@ -422,7 +422,7 @@ extern int iscsi_host_add(struct Scsi_Ho extern struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht, int dd_data_size, bool xmit_can_sleep); diff --git a/patches.suse/scsi-qedf-Add-stag_work-to-all-the-vports.patch b/patches.suse/scsi-qedf-Add-stag_work-to-all-the-vports.patch new file mode 100644 index 0000000..9ca81e5 --- /dev/null +++ b/patches.suse/scsi-qedf-Add-stag_work-to-all-the-vports.patch @@ -0,0 +1,66 @@ +From: Saurav Kashyap +Date: Mon, 17 Jan 2022 05:53:09 -0800 +Subject: scsi: qedf: Add stag_work to all the vports +Patch-mainline: v5.17-rc2 +Git-commit: b70a99fd13282d7885f69bf1372e28b7506a1613 +References: jsc#PED-1524 + +Call trace seen when creating NPIV ports, only 32 out of 64 show online. +stag work was not initialized for vport, hence initialize the stag work. + +WARNING: CPU: 8 PID: 645 at kernel/workqueue.c:1635 __queue_delayed_work+0x68/0x80 +CPU: 8 PID: 645 Comm: kworker/8:1 Kdump: loaded Tainted: G IOE --------- -- + 4.18.0-348.el8.x86_64 #1 +Hardware name: Dell Inc. PowerEdge MX740c/0177V9, BIOS 2.12.2 07/09/2021 +Workqueue: events fc_lport_timeout [libfc] +RIP: 0010:__queue_delayed_work+0x68/0x80 +Code: 89 b2 88 00 00 00 44 89 82 90 00 00 00 48 01 c8 48 89 42 50 41 81 +f8 00 20 00 00 75 1d e9 60 24 07 00 44 89 c7 e9 98 f6 ff ff <0f> 0b eb +c5 0f 0b eb a1 0f 0b eb a7 0f 0b eb ac 44 89 c6 e9 40 23 +RSP: 0018:ffffae514bc3be40 EFLAGS: 00010006 +RAX: ffff8d25d6143750 RBX: 0000000000000202 RCX: 0000000000000002 +RDX: ffff8d2e31383748 RSI: ffff8d25c000d600 RDI: ffff8d2e31383788 +RBP: ffff8d2e31380de0 R08: 0000000000002000 R09: ffff8d2e31383750 +R10: ffffffffc0c957e0 R11: ffff8d2624800000 R12: ffff8d2e31380a58 +R13: ffff8d2d915eb000 R14: ffff8d25c499b5c0 R15: ffff8d2e31380e18 +FS: 0000000000000000(0000) GS:ffff8d2d1fb00000(0000) knlGS:0000000000000000 +CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 +CR2: 000055fd0484b8b8 CR3: 00000008ffc10006 CR4: 00000000007706e0 +DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 +DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 +PKRU: 55555554 +Call Trace: + queue_delayed_work_on+0x36/0x40 + qedf_elsct_send+0x57/0x60 [qedf] + fc_lport_enter_flogi+0x90/0xc0 [libfc] + fc_lport_timeout+0xb7/0x140 [libfc] + process_one_work+0x1a7/0x360 + ? create_worker+0x1a0/0x1a0 + worker_thread+0x30/0x390 + ? create_worker+0x1a0/0x1a0 + kthread+0x116/0x130 + ? kthread_flush_work_fn+0x10/0x10 + ret_from_fork+0x35/0x40 + ---[ end trace 008f00f722f2c2ff ]-- + +Initialize stag work for all the vports. + +Link: https://lore.kernel.org/r/20220117135311.6256-2-njavali@marvell.com +Signed-off-by: Saurav Kashyap +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Acked-by: Thomas Bogendoerfer +--- + drivers/scsi/qedf/qedf_main.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/scsi/qedf/qedf_main.c ++++ b/drivers/scsi/qedf/qedf_main.c +@@ -1864,6 +1864,7 @@ static int qedf_vport_create(struct fc_v + vport_qedf->cmd_mgr = base_qedf->cmd_mgr; + init_completion(&vport_qedf->flogi_compl); + INIT_LIST_HEAD(&vport_qedf->fcports); ++ INIT_DELAYED_WORK(&vport_qedf->stag_work, qedf_stag_change_work); + + rc = qedf_vport_libfc_config(vport, vn_port); + if (rc) { diff --git a/patches.suse/scsi-qedf-Change-context-reset-messages-to-ratelimit.patch b/patches.suse/scsi-qedf-Change-context-reset-messages-to-ratelimit.patch new file mode 100644 index 0000000..c712035 --- /dev/null +++ b/patches.suse/scsi-qedf-Change-context-reset-messages-to-ratelimit.patch @@ -0,0 +1,43 @@ +From: Saurav Kashyap +Date: Mon, 17 Jan 2022 05:53:11 -0800 +Subject: scsi: qedf: Change context reset messages to ratelimited +Patch-mainline: v5.17-rc2 +Git-commit: 64fd4af6274eb0f49d29772c228fffcf6bde1635 +References: jsc#PED-1524 + +If FCoE is not configured, libfc/libfcoe keeps on retrying FLOGI and after +3 retries driver does a context reset and tries fipvlan again. This leads +to context reset message flooding the logs. Hence ratelimit the message to +prevent flooding the logs. + +Link: https://lore.kernel.org/r/20220117135311.6256-4-njavali@marvell.com +Signed-off-by: Saurav Kashyap +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Acked-by: Thomas Bogendoerfer +--- + drivers/scsi/qedf/qedf_main.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/scsi/qedf/qedf_main.c ++++ b/drivers/scsi/qedf/qedf_main.c +@@ -911,7 +911,7 @@ void qedf_ctx_soft_reset(struct fc_lport + struct qed_link_output if_link; + + if (lport->vport) { +- QEDF_ERR(NULL, "Cannot issue host reset on NPIV port.\n"); ++ printk_ratelimited("Cannot issue host reset on NPIV port.\n"); + return; + } + +@@ -3981,7 +3981,9 @@ void qedf_stag_change_work(struct work_s + struct qedf_ctx *qedf = + container_of(work, struct qedf_ctx, stag_work.work); + +- QEDF_ERR(&qedf->dbg_ctx, "Performing software context reset.\n"); ++ printk_ratelimited("[%s]:[%s:%d]:%d: Performing software context reset.", ++ dev_name(&qedf->pdev->dev), __func__, __LINE__, ++ qedf->dbg_ctx.host_no); + qedf_ctx_soft_reset(qedf->lport); + } + diff --git a/patches.suse/scsi-qedf-Fix-a-UAF-bug-in-__qedf_probe.patch b/patches.suse/scsi-qedf-Fix-a-UAF-bug-in-__qedf_probe.patch new file mode 100644 index 0000000..4c6d013 --- /dev/null +++ b/patches.suse/scsi-qedf-Fix-a-UAF-bug-in-__qedf_probe.patch @@ -0,0 +1,69 @@ +From: Letu Ren +Date: Fri, 12 Nov 2021 20:06:41 +0800 +Subject: scsi: qedf: Fix a UAF bug in __qedf_probe() +Patch-mainline: v6.0-rc7 +Git-commit: fbfe96869b782364caebae0445763969ddb6ea67 +References: jsc#PED-1524 + +In __qedf_probe(), if qedf->cdev is NULL which means +qed_ops->common->probe() failed, then the program will goto label err1, and +scsi_host_put() will free lport->host pointer. Because the memory qedf +points to is allocated by libfc_host_alloc(), it will be freed by +scsi_host_put(). However, the if statement below label err0 only checks +whether qedf is NULL but doesn't check whether the memory has been freed. +So a UAF bug can occur. + +There are two ways to reach the statements below err0. The first one is +described as before, "qedf" should be set to NULL. The second one is goto +"err0" directly. In the latter scenario qedf hasn't been changed and it has +the initial value NULL. As a result the if statement is not reachable in +any situation. + +The KASAN logs are as follows: + +[ 2.312969] BUG: KASAN: use-after-free in __qedf_probe+0x5dcf/0x6bc0 +[ 2.312969] +[ 2.312969] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014 +[ 2.312969] Call Trace: +[ 2.312969] dump_stack_lvl+0x59/0x7b +[ 2.312969] print_address_description+0x7c/0x3b0 +[ 2.312969] ? __qedf_probe+0x5dcf/0x6bc0 +[ 2.312969] __kasan_report+0x160/0x1c0 +[ 2.312969] ? __qedf_probe+0x5dcf/0x6bc0 +[ 2.312969] kasan_report+0x4b/0x70 +[ 2.312969] ? kobject_put+0x25d/0x290 +[ 2.312969] kasan_check_range+0x2ca/0x310 +[ 2.312969] __qedf_probe+0x5dcf/0x6bc0 +[ 2.312969] ? selinux_kernfs_init_security+0xdc/0x5f0 +[ 2.312969] ? trace_rpm_return_int_rcuidle+0x18/0x120 +[ 2.312969] ? rpm_resume+0xa5c/0x16e0 +[ 2.312969] ? qedf_get_generic_tlv_data+0x160/0x160 +[ 2.312969] local_pci_probe+0x13c/0x1f0 +[ 2.312969] pci_device_probe+0x37e/0x6c0 + +Link: https://lore.kernel.org/r/20211112120641.16073-1-fantasquex@gmail.com +Reported-by: Zheyu Ma +Acked-by: Saurav Kashyap +Co-developed-by: Wende Tan +Signed-off-by: Wende Tan +Signed-off-by: Letu Ren +Signed-off-by: Martin K. Petersen +Acked-by: Thomas Bogendoerfer +--- + drivers/scsi/qedf/qedf_main.c | 5 ----- + 1 file changed, 5 deletions(-) + +--- a/drivers/scsi/qedf/qedf_main.c ++++ b/drivers/scsi/qedf/qedf_main.c +@@ -3689,11 +3689,6 @@ err2: + err1: + scsi_host_put(lport->host); + err0: +- if (qedf) { +- QEDF_INFO(&qedf->dbg_ctx, QEDF_LOG_DISC, "Probe done.\n"); +- +- clear_bit(QEDF_PROBING, &qedf->flags); +- } + return rc; + } + diff --git a/patches.suse/scsi-qedf-Fix-refcount-issue-when-LOGO-is-received-d.patch b/patches.suse/scsi-qedf-Fix-refcount-issue-when-LOGO-is-received-d.patch new file mode 100644 index 0000000..a051d0a --- /dev/null +++ b/patches.suse/scsi-qedf-Fix-refcount-issue-when-LOGO-is-received-d.patch @@ -0,0 +1,65 @@ +From: Saurav Kashyap +Date: Mon, 17 Jan 2022 05:53:10 -0800 +Subject: scsi: qedf: Fix refcount issue when LOGO is received during TMF +Patch-mainline: v5.17-rc2 +Git-commit: 5239ab63f17cee643bd4bf6addfedebaa7d4f41e +References: jsc#PED-1524 + +Hung task call trace was seen during LOGO processing. + +[ 974.309060] [0000:00:00.0]:[qedf_eh_device_reset:868]: 1:0:2:0: LUN RESET Issued... +[ 974.309065] [0000:00:00.0]:[qedf_initiate_tmf:2422]: tm_flags 0x10 sc_cmd 00000000c16b930f op = 0x2a target_id = 0x2 lun=0 +[ 974.309178] [0000:00:00.0]:[qedf_initiate_tmf:2431]: portid=016900 tm_flags =LUN RESET +[ 974.309222] [0000:00:00.0]:[qedf_initiate_tmf:2438]: orig io_req = 00000000ec78df8f xid = 0x180 ref_cnt = 1. +[ 974.309625] host1: rport 016900: Received LOGO request while in state Ready +[ 974.309627] host1: rport 016900: Delete port +[ 974.309642] host1: rport 016900: work event 3 +[ 974.309644] host1: rport 016900: lld callback ev 3 +[ 974.313243] [0000:61:00.2]:[qedf_execute_tmf:2383]:1: fcport is uploading, not executing flush. +[ 974.313295] [0000:61:00.2]:[qedf_execute_tmf:2400]:1: task mgmt command success... +[ 984.031088] INFO: task jbd2/dm-15-8:7645 blocked for more than 120 seconds. +[ 984.031136] Not tainted 4.18.0-305.el8.x86_64 #1 + +[ 984.031166] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. +[ 984.031209] jbd2/dm-15-8 D 0 7645 2 0x80004080 +[ 984.031212] Call Trace: +[ 984.031222] __schedule+0x2c4/0x700 +[ 984.031230] ? unfreeze_partials.isra.83+0x16e/0x1a0 +[ 984.031233] ? bit_wait_timeout+0x90/0x90 +[ 984.031235] schedule+0x38/0xa0 +[ 984.031238] io_schedule+0x12/0x40 +[ 984.031240] bit_wait_io+0xd/0x50 +[ 984.031243] __wait_on_bit+0x6c/0x80 +[ 984.031248] ? free_buffer_head+0x21/0x50 +[ 984.031251] out_of_line_wait_on_bit+0x91/0xb0 +[ 984.031257] ? init_wait_var_entry+0x50/0x50 +[ 984.031268] jbd2_journal_commit_transaction+0x112e/0x19f0 [jbd2] +[ 984.031280] kjournald2+0xbd/0x270 [jbd2] +[ 984.031284] ? finish_wait+0x80/0x80 +[ 984.031291] ? commit_timeout+0x10/0x10 [jbd2] +[ 984.031294] kthread+0x116/0x130 +[ 984.031300] ? kthread_flush_work_fn+0x10/0x10 +[ 984.031305] ret_from_fork+0x1f/0x40 + +There was a ref count issue when LOGO is received during TMF. This leads to +one of the I/Os hanging with the driver. Fix the ref count. + +Link: https://lore.kernel.org/r/20220117135311.6256-3-njavali@marvell.com +Signed-off-by: Saurav Kashyap +Signed-off-by: Nilesh Javali +Signed-off-by: Martin K. Petersen +Acked-by: Thomas Bogendoerfer +--- + drivers/scsi/qedf/qedf_io.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/scsi/qedf/qedf_io.c ++++ b/drivers/scsi/qedf/qedf_io.c +@@ -2250,6 +2250,7 @@ process_els: + io_req->tm_flags == FCP_TMF_TGT_RESET) { + clear_bit(QEDF_CMD_OUTSTANDING, &io_req->flags); + io_req->sc_cmd = NULL; ++ kref_put(&io_req->refcount, qedf_release_cmd); + complete(&io_req->tm_done); + } + diff --git a/patches.suse/scsi-qedf-Fix-typo-in-comment.patch b/patches.suse/scsi-qedf-Fix-typo-in-comment.patch new file mode 100644 index 0000000..ff6d171 --- /dev/null +++ b/patches.suse/scsi-qedf-Fix-typo-in-comment.patch @@ -0,0 +1,29 @@ +From: Julia Lawall +Date: Sat, 21 May 2022 13:11:25 +0200 +Subject: scsi: qedf: Fix typo in comment +Patch-mainline: v5.19-rc1 +Git-commit: 379ad771bb941dfcaa00d8c03667216eb74b8390 +References: jsc#PED-1524 + +Spelling mistake (triple letters) in comment. Detected with the help of +Coccinelle. + +Link: https://lore.kernel.org/r/20220521111145.81697-75-Julia.Lawall@inria.fr +Signed-off-by: Julia Lawall +Signed-off-by: Martin K. Petersen +Acked-by: Thomas Bogendoerfer +--- + drivers/scsi/qedf/qedf_io.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/scsi/qedf/qedf_io.c ++++ b/drivers/scsi/qedf/qedf_io.c +@@ -893,7 +893,7 @@ int qedf_post_io_req(struct qedf_rport * + return -EINVAL; + } + +- /* Record LUN number for later use if we neeed them */ ++ /* Record LUN number for later use if we need them */ + io_req->lun = (int)sc_cmd->device->lun; + + /* Obtain free SQE */ diff --git a/patches.suse/scsi-qedf-Remove-an-unneeded-NULL-check-on-list-iter.patch b/patches.suse/scsi-qedf-Remove-an-unneeded-NULL-check-on-list-iter.patch new file mode 100644 index 0000000..de23c63 --- /dev/null +++ b/patches.suse/scsi-qedf-Remove-an-unneeded-NULL-check-on-list-iter.patch @@ -0,0 +1,51 @@ +From: Xiaomeng Tong +Date: Tue, 5 Apr 2022 08:40:55 +0800 +Subject: scsi: qedf: Remove an unneeded NULL check on list iterator +Patch-mainline: v5.19-rc1 +Git-commit: 505420bd5543e806288a47ae3d2abeec8fc9642a +References: jsc#PED-1524 + +The list iterator 'fcport' is always non-NULL so it doesn't need to be +checked. Thus just remove the unnecessary NULL check. Also remove the +unnecessary initializer because the list iterator is always initialized. +And adjust the position of blank lines. + +Link: https://lore.kernel.org/r/20220405004055.24312-1-xiam0nd.tong@gmail.com +Signed-off-by: Xiaomeng Tong +Signed-off-by: Martin K. Petersen +Acked-by: Thomas Bogendoerfer +--- + drivers/scsi/qedf/qedf_main.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/scsi/qedf/qedf_main.c ++++ b/drivers/scsi/qedf/qedf_main.c +@@ -873,7 +873,7 @@ static int qedf_eh_device_reset(struct s + + bool qedf_wait_for_upload(struct qedf_ctx *qedf) + { +- struct qedf_rport *fcport = NULL; ++ struct qedf_rport *fcport; + int wait_cnt = 120; + + while (wait_cnt--) { +@@ -888,7 +888,7 @@ bool qedf_wait_for_upload(struct qedf_ct + + rcu_read_lock(); + list_for_each_entry_rcu(fcport, &qedf->fcports, peers) { +- if (fcport && test_bit(QEDF_RPORT_SESSION_READY, ++ if (test_bit(QEDF_RPORT_SESSION_READY, + &fcport->flags)) { + if (fcport->rdata) + QEDF_ERR(&qedf->dbg_ctx, +@@ -899,9 +899,9 @@ bool qedf_wait_for_upload(struct qedf_ct + "Waiting for fcport %p.\n", fcport); + } + } ++ + rcu_read_unlock(); + return false; +- + } + + /* Performs soft reset of qedf_ctx by simulating a link down/up */ diff --git a/patches.suse/scsi-qedf-Remove-redundant-variable-op.patch b/patches.suse/scsi-qedf-Remove-redundant-variable-op.patch new file mode 100644 index 0000000..1b30333 --- /dev/null +++ b/patches.suse/scsi-qedf-Remove-redundant-variable-op.patch @@ -0,0 +1,37 @@ +From: Colin Ian King +Date: Tue, 17 May 2022 10:25:18 +0100 +Subject: scsi: qedf: Remove redundant variable op +Patch-mainline: v5.19-rc1 +Git-commit: fc65df48c88ea0b7d4bcbccdc59ffeedc64222c2 +References: jsc#PED-1524 + +The variable 'op' is assigned a value and is never read. The variable is +not used and is redundant, remove it. + +Link: https://lore.kernel.org/r/20220517092518.93159-1-colin.i.king@gmail.com +Signed-off-by: Colin Ian King +Signed-off-by: Martin K. Petersen +Acked-by: Thomas Bogendoerfer +--- + drivers/scsi/qedf/qedf_io.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/drivers/scsi/qedf/qedf_io.c ++++ b/drivers/scsi/qedf/qedf_io.c +@@ -804,7 +804,6 @@ static void qedf_trace_io(struct qedf_rp + struct qedf_io_log *io_log; + struct scsi_cmnd *sc_cmd = io_req->sc_cmd; + unsigned long flags; +- uint8_t op; + + spin_lock_irqsave(&qedf->io_trace_lock, flags); + +@@ -813,7 +812,7 @@ static void qedf_trace_io(struct qedf_rp + io_log->task_id = io_req->xid; + io_log->port_id = fcport->rdata->ids.port_id; + io_log->lun = sc_cmd->device->lun; +- io_log->op = op = sc_cmd->cmnd[0]; ++ io_log->op = sc_cmd->cmnd[0]; + io_log->lba[0] = sc_cmd->cmnd[2]; + io_log->lba[1] = sc_cmd->cmnd[3]; + io_log->lba[2] = sc_cmd->cmnd[4]; diff --git a/patches.suse/scsi-qedf-Remove-unnecessary-code.patch b/patches.suse/scsi-qedf-Remove-unnecessary-code.patch new file mode 100644 index 0000000..bb8b77a --- /dev/null +++ b/patches.suse/scsi-qedf-Remove-unnecessary-code.patch @@ -0,0 +1,35 @@ +From: Haowen Bai +Date: Thu, 21 Apr 2022 18:24:53 +0800 +Subject: scsi: qedf: Remove unnecessary code +Patch-mainline: v5.19-rc1 +Git-commit: 21faafff6abbbe79fe56e3c7049514df08a9e66e +References: jsc#PED-1524 + +Buffer 'msg' is memset() but never actually used. Drop it. + +Link: https://lore.kernel.org/r/1650536693-13089-1-git-send-email-baihaowen@meizu.com +Signed-off-by: Haowen Bai +Signed-off-by: Martin K. Petersen +Acked-by: Thomas Bogendoerfer +--- + drivers/scsi/qedf/qedf_attr.c | 2 -- + 1 file changed, 2 deletions(-) + +--- a/drivers/scsi/qedf/qedf_attr.c ++++ b/drivers/scsi/qedf/qedf_attr.c +@@ -131,7 +131,6 @@ qedf_sysfs_write_grcdump(struct file *fi + struct qedf_ctx *qedf = NULL; + long reading; + int ret = 0; +- char msg[40]; + + if (off != 0) + return ret; +@@ -148,7 +147,6 @@ qedf_sysfs_write_grcdump(struct file *fi + return ret; + } + +- memset(msg, 0, sizeof(msg)); + switch (reading) { + case 0: + memset(qedf->grcdump, 0, qedf->grcdump_size); diff --git a/patches.suse/scsi-qedf-Stop-using-the-SCSI-pointer.patch b/patches.suse/scsi-qedf-Stop-using-the-SCSI-pointer.patch new file mode 100644 index 0000000..6bd57cf --- /dev/null +++ b/patches.suse/scsi-qedf-Stop-using-the-SCSI-pointer.patch @@ -0,0 +1,145 @@ +From: Bart Van Assche +Date: Fri, 18 Feb 2022 11:50:57 -0800 +Subject: scsi: qedf: Stop using the SCSI pointer +Patch-mainline: v5.18-rc1 +Git-commit: a33e7925b5e61f9de1c5cc59d1a92569665fdfe5 +References: jsc#PED-1524 + +Set .cmd_size in the SCSI host template instead of using the SCSI pointer +from struct scsi_cmnd. Remove the CMD_SCSI_STATUS() assignment because the +assigned value is not used. + +This patch prepares for removal of the SCSI pointer from struct scsi_cmnd. + +Link: https://lore.kernel.org/r/20220218195117.25689-30-bvanassche@acm.org +Reviewed-by: Hannes Reinecke +Signed-off-by: Bart Van Assche +Signed-off-by: Martin K. Petersen +Acked-by: Thomas Bogendoerfer +--- + drivers/scsi/qedf/qedf.h | 10 +++++++++- + drivers/scsi/qedf/qedf_io.c | 25 ++++++++++++------------- + drivers/scsi/qedf/qedf_main.c | 3 ++- + 3 files changed, 23 insertions(+), 15 deletions(-) + +--- a/drivers/scsi/qedf/qedf.h ++++ b/drivers/scsi/qedf/qedf.h +@@ -91,7 +91,6 @@ enum qedf_ioreq_event { + #define FC_GOOD 0 + #define FCOE_FCP_RSP_FLAGS_FCP_RESID_OVER (0x1<<2) + #define FCOE_FCP_RSP_FLAGS_FCP_RESID_UNDER (0x1<<3) +-#define CMD_SCSI_STATUS(Cmnd) ((Cmnd)->SCp.Status) + #define FCOE_FCP_RSP_FLAGS_FCP_RSP_LEN_VALID (0x1<<0) + #define FCOE_FCP_RSP_FLAGS_FCP_SNS_LEN_VALID (0x1<<1) + struct qedf_ioreq { +@@ -189,6 +188,15 @@ struct qedf_ioreq { + unsigned int alloc; + }; + ++struct qedf_cmd_priv { ++ struct qedf_ioreq *io_req; ++}; ++ ++static inline struct qedf_cmd_priv *qedf_priv(struct scsi_cmnd *cmd) ++{ ++ return scsi_cmd_priv(cmd); ++} ++ + extern struct workqueue_struct *qedf_io_wq; + + struct qedf_rport { +--- a/drivers/scsi/qedf/qedf_io.c ++++ b/drivers/scsi/qedf/qedf_io.c +@@ -857,7 +857,7 @@ int qedf_post_io_req(struct qedf_rport * + + /* Initialize rest of io_req fileds */ + io_req->data_xfer_len = scsi_bufflen(sc_cmd); +- sc_cmd->SCp.ptr = (char *)io_req; ++ qedf_priv(sc_cmd)->io_req = io_req; + io_req->sge_type = QEDF_IOREQ_FAST_SGE; /* Assume fast SGL by default */ + + /* Record which cpu this request is associated with */ +@@ -1065,8 +1065,7 @@ static void qedf_parse_fcp_rsp(struct qe + io_req->fcp_resid = fcp_rsp->fcp_resid; + + io_req->scsi_comp_flags = rsp_flags; +- CMD_SCSI_STATUS(sc_cmd) = io_req->cdb_status = +- fcp_rsp->scsi_status_code; ++ io_req->cdb_status = fcp_rsp->scsi_status_code; + + if (rsp_flags & + FCOE_FCP_RSP_FLAGS_FCP_RSP_LEN_VALID) +@@ -1150,9 +1149,9 @@ void qedf_scsi_completion(struct qedf_ct + return; + } + +- if (!sc_cmd->SCp.ptr) { +- QEDF_WARN(&(qedf->dbg_ctx), "SCp.ptr is NULL, returned in " +- "another context.\n"); ++ if (!qedf_priv(sc_cmd)->io_req) { ++ QEDF_WARN(&(qedf->dbg_ctx), ++ "io_req is NULL, returned in another context.\n"); + return; + } + +@@ -1312,7 +1311,7 @@ out: + clear_bit(QEDF_CMD_OUTSTANDING, &io_req->flags); + + io_req->sc_cmd = NULL; +- sc_cmd->SCp.ptr = NULL; ++ qedf_priv(sc_cmd)->io_req = NULL; + scsi_done(sc_cmd); + kref_put(&io_req->refcount, qedf_release_cmd); + } +@@ -1354,9 +1353,9 @@ void qedf_scsi_done(struct qedf_ctx *qed + goto bad_scsi_ptr; + } + +- if (!sc_cmd->SCp.ptr) { +- QEDF_WARN(&(qedf->dbg_ctx), "SCp.ptr is NULL, returned in " +- "another context.\n"); ++ if (!qedf_priv(sc_cmd)->io_req) { ++ QEDF_WARN(&(qedf->dbg_ctx), ++ "io_req is NULL, returned in another context.\n"); + return; + } + +@@ -1409,7 +1408,7 @@ void qedf_scsi_done(struct qedf_ctx *qed + qedf_trace_io(io_req->fcport, io_req, QEDF_IO_TRACE_RSP); + + io_req->sc_cmd = NULL; +- sc_cmd->SCp.ptr = NULL; ++ qedf_priv(sc_cmd)->io_req = NULL; + scsi_done(sc_cmd); + kref_put(&io_req->refcount, qedf_release_cmd); + return; +@@ -2433,8 +2432,8 @@ int qedf_initiate_tmf(struct scsi_cmnd * + (tm_flags == FCP_TMF_TGT_RESET) ? "TARGET RESET" : + "LUN RESET"); + +- if (sc_cmd->SCp.ptr) { +- io_req = (struct qedf_ioreq *)sc_cmd->SCp.ptr; ++ if (qedf_priv(sc_cmd)->io_req) { ++ io_req = qedf_priv(sc_cmd)->io_req; + ref_cnt = kref_read(&io_req->refcount); + QEDF_ERR(NULL, + "orig io_req = %p xid = 0x%x ref_cnt = %d.\n", +--- a/drivers/scsi/qedf/qedf_main.c ++++ b/drivers/scsi/qedf/qedf_main.c +@@ -740,7 +740,7 @@ static int qedf_eh_abort(struct scsi_cmn + } + + +- io_req = (struct qedf_ioreq *)sc_cmd->SCp.ptr; ++ io_req = qedf_priv(sc_cmd)->io_req; + if (!io_req) { + QEDF_ERR(&qedf->dbg_ctx, + "sc_cmd not queued with lld, sc_cmd=%p op=0x%02x, port_id=%06x\n", +@@ -996,6 +996,7 @@ static struct scsi_host_template qedf_ho + .sg_tablesize = QEDF_MAX_BDS_PER_CMD, + .can_queue = FCOE_PARAMS_NUM_TASKS, + .change_queue_depth = scsi_change_queue_depth, ++ .cmd_size = sizeof(struct qedf_cmd_priv), + }; + + static int qedf_get_paged_crc_eof(struct sk_buff *skb, int tlen) diff --git a/patches.suse/scsi-qedi-Fix-SYSFS_FLAG_FW_SEL_BOOT-formatting.patch b/patches.suse/scsi-qedi-Fix-SYSFS_FLAG_FW_SEL_BOOT-formatting.patch new file mode 100644 index 0000000..a8685e5 --- /dev/null +++ b/patches.suse/scsi-qedi-Fix-SYSFS_FLAG_FW_SEL_BOOT-formatting.patch @@ -0,0 +1,49 @@ +From: Florian Fainelli +Date: Tue, 30 Nov 2021 12:38:12 -0800 +Subject: scsi: qedi: Fix SYSFS_FLAG_FW_SEL_BOOT formatting +Patch-mainline: v5.17-rc1 +Git-commit: 9f9b7fa946beaa36681a7011a286da7cbb953816 +References: jsc#PED-1525 + +The format used for formatting SYSFS_FLAG_FW_SEL_BOOT creates the +following warning: + +drivers/scsi/qedi/qedi_main.c:2259:35: warning: format specifies type +'char' but the argument has type 'int' [-Wformat] + rc = snprintf(buf, 3, "%hhd\n", +SYSFS_FLAG_FW_SEL_BOOT); + +Fix this to cast the constant as a char since the intention is to print it +via sysfs as a byte. + +Link: https://lore.kernel.org/r/20211130203813.12138-2-f.fainelli@gmail.com +Reported-by: kernel test robot +Acked-by: Manish Rangankar +Signed-off-by: Florian Fainelli +Signed-off-by: Martin K. Petersen +Acked-by: Thomas Bogendoerfer +--- + drivers/scsi/qedi/qedi_main.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +--- a/drivers/scsi/qedi/qedi_main.c ++++ b/drivers/scsi/qedi/qedi_main.c +@@ -2086,8 +2086,7 @@ static ssize_t qedi_show_boot_eth_info(v + rc = snprintf(buf, ip_len, fmt, gw); + break; + case ISCSI_BOOT_ETH_FLAGS: +- rc = snprintf(buf, 3, "%hhd\n", +- SYSFS_FLAG_FW_SEL_BOOT); ++ rc = snprintf(buf, 3, "%d\n", (char)SYSFS_FLAG_FW_SEL_BOOT); + break; + case ISCSI_BOOT_ETH_INDEX: + rc = snprintf(buf, 3, "0\n"); +@@ -2254,7 +2253,7 @@ qedi_show_boot_tgt_info(struct qedi_ctx + mchap_secret); + break; + case ISCSI_BOOT_TGT_FLAGS: +- rc = snprintf(buf, 3, "%hhd\n", SYSFS_FLAG_FW_SEL_BOOT); ++ rc = snprintf(buf, 3, "%d\n", (char)SYSFS_FLAG_FW_SEL_BOOT); + break; + case ISCSI_BOOT_TGT_NIC_ASSOC: + rc = snprintf(buf, 3, "0\n"); diff --git a/patches.suse/scsi-qedi-Fix-cmd_cleanup_cmpl-counter-mismatch-issu.patch b/patches.suse/scsi-qedi-Fix-cmd_cleanup_cmpl-counter-mismatch-issu.patch new file mode 100644 index 0000000..9a47030 --- /dev/null +++ b/patches.suse/scsi-qedi-Fix-cmd_cleanup_cmpl-counter-mismatch-issu.patch @@ -0,0 +1,172 @@ +From: Manish Rangankar +Date: Fri, 3 Dec 2021 01:52:18 -0800 +Subject: scsi: qedi: Fix cmd_cleanup_cmpl counter mismatch issue +Patch-mainline: v5.16-rc5 +Git-commit: 3fe5185db46fedea7a6852d6a59d6e7cdb5d818a +References: jsc#PED-1525 + +When issued LUN reset under heavy I/O we hit the qedi WARN_ON because of a +mismatch in firmware I/O cmd cleanup request count and I/O cmd cleanup +response count received. The mismatch is because of a race caused by the +postfix increment of cmd_cleanup_cmpl. + +[qedi_clearsq:1295]:18: fatal error, need hard reset, cid=0x0 +WARNING: CPU: 48 PID: 110963 at drivers/scsi/qedi/qedi_fw.c:1296 qedi_clearsq+0xa5/0xd0 [qedi] +CPU: 48 PID: 110963 Comm: kworker/u130:0 Kdump: loaded Tainted: G W +Hardware name: HPE ProLiant DL385 Gen10/ProLiant DL385 Gen10, BIOS A40 04/15/2020 +Workqueue: iscsi_conn_cleanup iscsi_cleanup_conn_work_fn [scsi_transport_iscsi] +RIP: 0010:qedi_clearsq+0xa5/0xd0 [qedi] + RSP: 0018:ffffac2162c7fd98 EFLAGS: 00010246 + RAX: 0000000000000000 RBX: ffff975213c40ab8 RCX: 0000000000000000 + RDX: 0000000000000000 RSI: ffff9761bf816858 RDI: ffff9761bf816858 + RBP: ffff975247018628 R08: 000000000000522c R09: 000000000000005b + R10: 0000000000000000 R11: ffffac2162c7fbd8 R12: ffff97522e1b2be8 + R13: 0000000000000000 R14: ffff97522e1b2800 R15: 0000000000000001 + FS: 0000000000000000(0000) GS:ffff9761bf800000(0000) knlGS:0000000000000000 + CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 + CR2: 00007f1a34e3e1a0 CR3: 0000000108bb2000 CR4: 0000000000350ee0 + Call Trace: + qedi_ep_disconnect+0x533/0x550 [qedi] + ? iscsi_dbg_trace+0x63/0x80 [scsi_transport_iscsi] + ? _cond_resched+0x15/0x30 + ? iscsi_suspend_queue+0x19/0x40 [libiscsi] + iscsi_ep_disconnect+0xb0/0x130 [scsi_transport_iscsi] + iscsi_cleanup_conn_work_fn+0x82/0x130 [scsi_transport_iscsi] + process_one_work+0x1a7/0x360 + ? create_worker+0x1a0/0x1a0 + worker_thread+0x30/0x390 + ? create_worker+0x1a0/0x1a0 + kthread+0x116/0x130 + ? kthread_flush_work_fn+0x10/0x10 + ret_from_fork+0x22/0x40 + ---[ end trace 5f1441f59082235c ]--- + +Link: https://lore.kernel.org/r/20211203095218.5477-1-mrangankar@marvell.com +Reviewed-by: Lee Duncan +Reviewed-by: Mike Christie +Signed-off-by: Manish Rangankar +Signed-off-by: Martin K. Petersen +Acked-by: Thomas Bogendoerfer +--- + drivers/scsi/qedi/qedi_fw.c | 37 +++++++++++++++---------------------- + drivers/scsi/qedi/qedi_iscsi.c | 2 +- + drivers/scsi/qedi/qedi_iscsi.h | 2 +- + 3 files changed, 17 insertions(+), 24 deletions(-) + +--- a/drivers/scsi/qedi/qedi_fw.c ++++ b/drivers/scsi/qedi/qedi_fw.c +@@ -732,7 +732,6 @@ static void qedi_process_cmd_cleanup_res + { + struct qedi_work_map *work, *work_tmp; + u32 proto_itt = cqe->itid; +- itt_t protoitt = 0; + int found = 0; + struct qedi_cmd *qedi_cmd = NULL; + u32 iscsi_cid; +@@ -812,16 +811,12 @@ unlock: + return; + + check_cleanup_reqs: +- if (qedi_conn->cmd_cleanup_req > 0) { +- QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_TID, ++ if (atomic_inc_return(&qedi_conn->cmd_cleanup_cmpl) == ++ qedi_conn->cmd_cleanup_req) { ++ QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_SCSI_TM, + "Freeing tid=0x%x for cid=0x%x\n", + cqe->itid, qedi_conn->iscsi_conn_id); +- qedi_conn->cmd_cleanup_cmpl++; + wake_up(&qedi_conn->wait_queue); +- } else { +- QEDI_ERR(&qedi->dbg_ctx, +- "Delayed or untracked cleanup response, itt=0x%x, tid=0x%x, cid=0x%x\n", +- protoitt, cqe->itid, qedi_conn->iscsi_conn_id); + } + } + +@@ -1163,7 +1158,7 @@ int qedi_cleanup_all_io(struct qedi_ctx + } + + qedi_conn->cmd_cleanup_req = 0; +- qedi_conn->cmd_cleanup_cmpl = 0; ++ atomic_set(&qedi_conn->cmd_cleanup_cmpl, 0); + + QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_SCSI_TM, + "active_cmd_count=%d, cid=0x%x, in_recovery=%d, lun_reset=%d\n", +@@ -1215,16 +1210,15 @@ int qedi_cleanup_all_io(struct qedi_ctx + qedi_conn->iscsi_conn_id); + + rval = wait_event_interruptible_timeout(qedi_conn->wait_queue, +- ((qedi_conn->cmd_cleanup_req == +- qedi_conn->cmd_cleanup_cmpl) || +- test_bit(QEDI_IN_RECOVERY, +- &qedi->flags)), +- 5 * HZ); ++ (qedi_conn->cmd_cleanup_req == ++ atomic_read(&qedi_conn->cmd_cleanup_cmpl)) || ++ test_bit(QEDI_IN_RECOVERY, &qedi->flags), ++ 5 * HZ); + if (rval) { + QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_SCSI_TM, + "i/o cmd_cleanup_req=%d, equal to cmd_cleanup_cmpl=%d, cid=0x%x\n", + qedi_conn->cmd_cleanup_req, +- qedi_conn->cmd_cleanup_cmpl, ++ atomic_read(&qedi_conn->cmd_cleanup_cmpl), + qedi_conn->iscsi_conn_id); + + return 0; +@@ -1233,7 +1227,7 @@ int qedi_cleanup_all_io(struct qedi_ctx + QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_SCSI_TM, + "i/o cmd_cleanup_req=%d, not equal to cmd_cleanup_cmpl=%d, cid=0x%x\n", + qedi_conn->cmd_cleanup_req, +- qedi_conn->cmd_cleanup_cmpl, ++ atomic_read(&qedi_conn->cmd_cleanup_cmpl), + qedi_conn->iscsi_conn_id); + + iscsi_host_for_each_session(qedi->shost, +@@ -1242,11 +1236,10 @@ int qedi_cleanup_all_io(struct qedi_ctx + + /* Enable IOs for all other sessions except current.*/ + if (!wait_event_interruptible_timeout(qedi_conn->wait_queue, +- (qedi_conn->cmd_cleanup_req == +- qedi_conn->cmd_cleanup_cmpl) || +- test_bit(QEDI_IN_RECOVERY, +- &qedi->flags), +- 5 * HZ)) { ++ (qedi_conn->cmd_cleanup_req == ++ atomic_read(&qedi_conn->cmd_cleanup_cmpl)) || ++ test_bit(QEDI_IN_RECOVERY, &qedi->flags), ++ 5 * HZ)) { + iscsi_host_for_each_session(qedi->shost, + qedi_mark_device_available); + return -1; +@@ -1266,7 +1259,7 @@ void qedi_clearsq(struct qedi_ctx *qedi, + + qedi_ep = qedi_conn->ep; + qedi_conn->cmd_cleanup_req = 0; +- qedi_conn->cmd_cleanup_cmpl = 0; ++ atomic_set(&qedi_conn->cmd_cleanup_cmpl, 0); + + if (!qedi_ep) { + QEDI_WARN(&qedi->dbg_ctx, +--- a/drivers/scsi/qedi/qedi_iscsi.c ++++ b/drivers/scsi/qedi/qedi_iscsi.c +@@ -412,7 +412,7 @@ static int qedi_conn_bind(struct iscsi_c + qedi_conn->iscsi_conn_id = qedi_ep->iscsi_cid; + qedi_conn->fw_cid = qedi_ep->fw_cid; + qedi_conn->cmd_cleanup_req = 0; +- qedi_conn->cmd_cleanup_cmpl = 0; ++ atomic_set(&qedi_conn->cmd_cleanup_cmpl, 0); + + if (qedi_bind_conn_to_iscsi_cid(qedi, qedi_conn)) { + rc = -EINVAL; +--- a/drivers/scsi/qedi/qedi_iscsi.h ++++ b/drivers/scsi/qedi/qedi_iscsi.h +@@ -155,7 +155,7 @@ struct qedi_conn { + spinlock_t list_lock; /* internal conn lock */ + u32 active_cmd_count; + u32 cmd_cleanup_req; +- u32 cmd_cleanup_cmpl; ++ atomic_t cmd_cleanup_cmpl; + + u32 iscsi_conn_id; + int itt; diff --git a/patches.suse/scsi-qedi-Remove-redundant-flush_workqueue-calls.patch b/patches.suse/scsi-qedi-Remove-redundant-flush_workqueue-calls.patch new file mode 100644 index 0000000..c331da3 --- /dev/null +++ b/patches.suse/scsi-qedi-Remove-redundant-flush_workqueue-calls.patch @@ -0,0 +1,38 @@ +From: "Minghao Chi (CGEL ZTE)" +Date: Thu, 27 Jan 2022 01:39:34 +0000 +Subject: scsi: qedi: Remove redundant flush_workqueue() calls +Patch-mainline: v5.18-rc1 +Git-commit: 0603be7192372741b7d76fe7885247a7386a860a +References: jsc#PED-1525 + +destroy_workqueue() already drains the queue before destroying it, so there +is no need to flush it explicitly. + +Remove the redundant flush_workqueue() calls. + +Link: https://lore.kernel.org/r/20220127013934.1184923-1-chi.minghao@zte.com.cn +Reported-by: Zeal Robot +Signed-off-by: Minghao Chi (CGEL ZTE) +Signed-off-by: CGEL ZTE +Signed-off-by: Martin K. Petersen +Acked-by: Thomas Bogendoerfer +--- + drivers/scsi/qedi/qedi_main.c | 2 -- + 1 file changed, 2 deletions(-) + +--- a/drivers/scsi/qedi/qedi_main.c ++++ b/drivers/scsi/qedi/qedi_main.c +@@ -2418,13 +2418,11 @@ static void __qedi_remove(struct pci_dev + iscsi_host_remove(qedi->shost); + + if (qedi->tmf_thread) { +- flush_workqueue(qedi->tmf_thread); + destroy_workqueue(qedi->tmf_thread); + qedi->tmf_thread = NULL; + } + + if (qedi->offload_thread) { +- flush_workqueue(qedi->offload_thread); + destroy_workqueue(qedi->offload_thread); + qedi->offload_thread = NULL; + } diff --git a/patches.suse/scsi-qedi-Remove-set-but-unused-page-variable.patch b/patches.suse/scsi-qedi-Remove-set-but-unused-page-variable.patch new file mode 100644 index 0000000..42bdf2b --- /dev/null +++ b/patches.suse/scsi-qedi-Remove-set-but-unused-page-variable.patch @@ -0,0 +1,42 @@ +From: Florian Fainelli +Date: Fri, 26 Nov 2021 12:17:07 -0800 +Subject: scsi: qedi: Remove set but unused 'page' variable +Patch-mainline: v5.17-rc1 +Git-commit: 6d8619f034f01c841fb3836d4a1bc682571db995 +References: jsc#PED-1525 + +The variable 'page' is set but never used throughout qedi_alloc_bdq(). +Therefore remove it. + +Link: https://lore.kernel.org/r/20211126201708.27140-2-f.fainelli@gmail.com +Reported-by: kernel test robot +Acked-by: Manish Rangankar +Signed-off-by: Florian Fainelli +Signed-off-by: Martin K. Petersen +Acked-by: Thomas Bogendoerfer +--- + drivers/scsi/qedi/qedi_main.c | 3 --- + 1 file changed, 3 deletions(-) + +--- a/drivers/scsi/qedi/qedi_main.c ++++ b/drivers/scsi/qedi/qedi_main.c +@@ -1538,7 +1538,6 @@ static int qedi_alloc_bdq(struct qedi_ct + int i; + struct scsi_bd *pbl; + u64 *list; +- dma_addr_t page; + + /* Alloc dma memory for BDQ buffers */ + for (i = 0; i < QEDI_BDQ_NUM; i++) { +@@ -1608,11 +1607,9 @@ static int qedi_alloc_bdq(struct qedi_ct + qedi->bdq_pbl_list_num_entries = qedi->bdq_pbl_mem_size / + QEDI_PAGE_SIZE; + list = (u64 *)qedi->bdq_pbl_list; +- page = qedi->bdq_pbl_list_dma; + for (i = 0; i < qedi->bdq_pbl_list_num_entries; i++) { + *list = qedi->bdq_pbl_dma; + list++; +- page += QEDI_PAGE_SIZE; + } + + return 0; diff --git a/series.conf b/series.conf index 56ff2ee..80146b1 100644 --- a/series.conf +++ b/series.conf @@ -8322,6 +8322,7 @@ patches.suse/block-fix-ioprio_get-IOPRIO_WHO_PGRP-vs-setuid-2.patch patches.suse/xfs-remove-all-COW-fork-extents-when-remounting-read.patch patches.suse/scsi-pm80xx-Do-not-call-scsi_remove_host-in-pm8001_alloc + patches.suse/scsi-qedi-Fix-cmd_cleanup_cmpl-counter-mismatch-issu.patch patches.suse/scsi-scsi_debug-Fix-buffer-size-of-REPORT-ZONES-command patches.suse/scsi-qla2xxx-Format-log-strings-only-if-needed patches.suse/sched-x86-Don-t-use-cluster-topology-for-x86-hybrid-CPUs.patch @@ -9958,9 +9959,11 @@ patches.suse/mailbox-hi3660-convert-struct-comments-to-kernel-doc.patch patches.suse/mailbox-change-mailbox-mpfs-compatible-string.patch patches.suse/scsi-pm80xx-Update-WARN_ON-check-in-pm8001_mpi_build_cmd + patches.suse/scsi-qedi-Remove-set-but-unused-page-variable.patch patches.suse/scsi-core-Show-SCMD_LAST-in-text-form patches.suse/scsi-pm8001-Fix-kernel-doc-warnings patches.suse/scsi-pmcraid-Fix-a-kernel-doc-warning.patch + patches.suse/scsi-qedi-Fix-SYSFS_FLAG_FW_SEL_BOOT-formatting.patch patches.suse/scsi-core-Fix-scsi_device_max_queue_depth.patch patches.suse/scsi-ufs-Remove-dead-code.patch patches.suse/scsi-ufs-Fix-race-conditions-related-to-driver-data @@ -10607,6 +10610,9 @@ patches.suse/efi-libstub-arm64-Fix-image-check-alignment-at-entry.patch patches.suse/efi-runtime-avoid-EFIv2-runtime-services-on-Apple-x8.patch patches.suse/scsi-elx-efct-Don-t-use-GFP_KERNEL-under-spin-lock.patch + patches.suse/scsi-qedf-Add-stag_work-to-all-the-vports.patch + patches.suse/scsi-qedf-Fix-refcount-issue-when-LOGO-is-received-d.patch + patches.suse/scsi-qedf-Change-context-reset-messages-to-ratelimit.patch patches.suse/scsi-zfcp-Fix-failed-recovery-on-gone-remote-port-with-non-NPIV-FCP-devices patches.suse/scsi-bnx2fc-Flush-destroy_work-queue-before-calling-bnx2fc_interface_put patches.suse/arm64-Add-Cortex-X2-CPU-part-definition.patch @@ -12666,12 +12672,14 @@ patches.suse/scsi-qla2xxx-Add-devids-and-conditionals-for-28xx.patch patches.suse/scsi-qla2xxx-Check-for-firmware-dump-already-collect.patch patches.suse/scsi-qla2xxx-Update-version-to-10.02.07.300-k.patch + patches.suse/scsi-qedi-Remove-redundant-flush_workqueue-calls.patch patches.suse/scsi-lpfc-Remove-redundant-flush_workqueue-call.patch patches.suse/scsi-smartpqi-Add-PCI-IDs patches.suse/scsi-qla2xxx-Add-qla2x00_async_done-for-async-routin.patch patches.suse/scsi-qla2xxx-Remove-unused-qla_sess_op_cmd_list-from.patch patches.suse/scsi-fnic-Fix-a-tracing-statement.patch patches.suse/scsi-iscsi-Stop-using-the-SCSI-pointer.patch + patches.suse/scsi-qedf-Stop-using-the-SCSI-pointer.patch patches.suse/scsi-qla2xxx-Stop-using-the-SCSI-pointer.patch patches.suse/scsi-qla2xxx-Use-named-initializers-for-port_-d-stat.patch patches.suse/scsi-qla2xxx-Use-named-initializers-for-q_dev_state.patch @@ -14669,9 +14677,11 @@ patches.suse/scsi-iscsi-Fix-harmless-double-shift-bug.patch patches.suse/scsi-ufs-qcom-Fix-ufs_qcom_resume patches.suse/scsi-ipr-Directly-return-instead-of-using-local-ret-.patch + patches.suse/scsi-qedf-Remove-unnecessary-code.patch patches.suse/scsi-qla2xxx-Remove-unneeded-flush_workqueue.patch patches.suse/scsi-lpfc-Remove-unneeded-variable-a346f28a.patch patches.suse/scsi-ufs-core-Exclude-UECxx-from-SFR-dump-list + patches.suse/scsi-qedf-Remove-an-unneeded-NULL-check-on-list-iter.patch patches.suse/scsi-dc395x-Fix-a-missing-check-on-list-iterator patches.suse/scsi-qla2xxx-edif-Remove-unneeded-variable.patch patches.suse/scsi-lpfc-Remove-unnecessary-null-ndlp-check-in-lpfc.patch @@ -14696,6 +14706,7 @@ patches.suse/scsi-ipr-Use-kobj_to_dev.patch patches.suse/scsi-hisi_sas-Fix-rescan-after-deleting-a-disk patches.suse/scsi-fnic-Replace-DMA-mask-of-64-bits-with-47-bits + patches.suse/scsi-qedf-Remove-redundant-variable-op.patch patches.suse/dma-debug-change-allocation-mode-from-GFP_NOWAIT-to-.patch patches.suse/swiotlb-max-mapping-size-takes-min-align-mask-into-a.patch patches.suse/inotify-show-inotify-mask-flags-in-proc-fdinfo.patch @@ -15254,6 +15265,7 @@ patches.suse/scsi-lpfc-Commonize-VMID-code-location.patch patches.suse/scsi-lpfc-Rework-lpfc_vmid_get_appid-to-be-protocol-.patch patches.suse/scsi-lpfc-Add-support-for-VMID-tagging-of-NVMe-I-Os.patch + patches.suse/scsi-qedf-Fix-typo-in-comment.patch patches.suse/scsi-pmcraid-Fix-typo-in-comment.patch patches.suse/scsi-sd-Fix-potential-NULL-pointer-dereference.patch patches.suse/scsi-lpfc-Add-support-for-ATTO-Fibre-Channel-devices.patch @@ -17586,6 +17598,7 @@ patches.suse/arm64-dts-rockchip-Fix-typo-in-lisense-text-for-PX30.patch patches.suse/arm64-dts-rockchip-Set-RK3399-Gru-PCLK_EDP-to-24-MHz.patch patches.suse/arm64-dts-rockchip-Remove-enable-active-low-from-rk3.patch + patches.suse/scsi-qedf-Fix-a-UAF-bug-in-__qedf_probe.patch patches.suse/scsi-qla2xxx-Fix-memory-leak-in-__qlt_24xx_handle_ab.patch patches.suse/drm-amd-display-Fix-double-cursor-on-non-video-RGB-M.patch patches.suse/drm-amd-display-Assume-an-LTTPR-is-always-present-on.patch