From: Greg Kroah-Hartman Date: Wed, 13 Sep 2023 18:35:51 +0000 (+0200) Subject: drop scsi patch from 5.4 and 5.10 X-Git-Tag: v5.10.195~62 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8644b934caae12d4953319f752487f9860eb4428;p=thirdparty%2Fkernel%2Fstable-queue.git drop scsi patch from 5.4 and 5.10 --- diff --git a/queue-5.10/scsi-qla2xxx-flush-mailbox-commands-on-chip-reset.patch b/queue-5.10/scsi-qla2xxx-flush-mailbox-commands-on-chip-reset.patch deleted file mode 100644 index 09c1f5099c3..00000000000 --- a/queue-5.10/scsi-qla2xxx-flush-mailbox-commands-on-chip-reset.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 6d0b65569c0a10b27c49bacd8d25bcd406003533 Mon Sep 17 00:00:00 2001 -From: Quinn Tran -Date: Mon, 21 Aug 2023 18:30:38 +0530 -Subject: scsi: qla2xxx: Flush mailbox commands on chip reset - -From: Quinn Tran - -commit 6d0b65569c0a10b27c49bacd8d25bcd406003533 upstream. - -Fix race condition between Interrupt thread and Chip reset thread in trying -to flush the same mailbox. With the race condition, the "ha->mbx_intr_comp" -will get an extra complete() call. The extra complete call create erroneous -mailbox timeout condition when the next mailbox is sent where the mailbox -call does not wait for interrupt to arrive. Instead, it advances without -waiting. - -Add lock protection around the check for mailbox completion. - -Cc: stable@vger.kernel.org -Fixes: b2000805a975 ("scsi: qla2xxx: Flush mailbox commands on chip reset") -Signed-off-by: Quinn Tran -Signed-off-by: Nilesh Javali -Link: https://lore.kernel.org/r/20230821130045.34850-3-njavali@marvell.com -Reviewed-by: Himanshu Madhani -Signed-off-by: Martin K. Petersen -Signed-off-by: Greg Kroah-Hartman ---- - drivers/scsi/qla2xxx/qla_def.h | 1 - - drivers/scsi/qla2xxx/qla_init.c | 7 ++++--- - drivers/scsi/qla2xxx/qla_mbx.c | 4 ---- - drivers/scsi/qla2xxx/qla_os.c | 1 - - 4 files changed, 4 insertions(+), 9 deletions(-) - ---- a/drivers/scsi/qla2xxx/qla_def.h -+++ b/drivers/scsi/qla2xxx/qla_def.h -@@ -4192,7 +4192,6 @@ struct qla_hw_data { - uint8_t aen_mbx_count; - atomic_t num_pend_mbx_stage1; - atomic_t num_pend_mbx_stage2; -- atomic_t num_pend_mbx_stage3; - uint16_t frame_payload_size; - - uint32_t login_retry_count; ---- a/drivers/scsi/qla2xxx/qla_init.c -+++ b/drivers/scsi/qla2xxx/qla_init.c -@@ -6926,14 +6926,15 @@ qla2x00_abort_isp_cleanup(scsi_qla_host_ - } - - /* purge MBox commands */ -- if (atomic_read(&ha->num_pend_mbx_stage3)) { -+ spin_lock_irqsave(&ha->hardware_lock, flags); -+ if (test_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags)) { - clear_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags); - complete(&ha->mbx_intr_comp); - } -+ spin_unlock_irqrestore(&ha->hardware_lock, flags); - - i = 0; -- while (atomic_read(&ha->num_pend_mbx_stage3) || -- atomic_read(&ha->num_pend_mbx_stage2) || -+ while (atomic_read(&ha->num_pend_mbx_stage2) || - atomic_read(&ha->num_pend_mbx_stage1)) { - msleep(20); - i++; ---- a/drivers/scsi/qla2xxx/qla_mbx.c -+++ b/drivers/scsi/qla2xxx/qla_mbx.c -@@ -268,7 +268,6 @@ qla2x00_mailbox_command(scsi_qla_host_t - spin_unlock_irqrestore(&ha->hardware_lock, flags); - - wait_time = jiffies; -- atomic_inc(&ha->num_pend_mbx_stage3); - if (!wait_for_completion_timeout(&ha->mbx_intr_comp, - mcp->tov * HZ)) { - ql_dbg(ql_dbg_mbx, vha, 0x117a, -@@ -283,7 +282,6 @@ qla2x00_mailbox_command(scsi_qla_host_t - spin_unlock_irqrestore(&ha->hardware_lock, - flags); - atomic_dec(&ha->num_pend_mbx_stage2); -- atomic_dec(&ha->num_pend_mbx_stage3); - rval = QLA_ABORTED; - goto premature_exit; - } -@@ -293,11 +291,9 @@ qla2x00_mailbox_command(scsi_qla_host_t - ha->flags.mbox_busy = 0; - spin_unlock_irqrestore(&ha->hardware_lock, flags); - atomic_dec(&ha->num_pend_mbx_stage2); -- atomic_dec(&ha->num_pend_mbx_stage3); - rval = QLA_ABORTED; - goto premature_exit; - } -- atomic_dec(&ha->num_pend_mbx_stage3); - - if (time_after(jiffies, wait_time + 5 * HZ)) - ql_log(ql_log_warn, vha, 0x1015, "cmd=0x%x, waited %d msecs\n", ---- a/drivers/scsi/qla2xxx/qla_os.c -+++ b/drivers/scsi/qla2xxx/qla_os.c -@@ -2866,7 +2866,6 @@ qla2x00_probe_one(struct pci_dev *pdev, - ha->max_exchg = FW_MAX_EXCHANGES_CNT; - atomic_set(&ha->num_pend_mbx_stage1, 0); - atomic_set(&ha->num_pend_mbx_stage2, 0); -- atomic_set(&ha->num_pend_mbx_stage3, 0); - atomic_set(&ha->zio_threshold, DEFAULT_ZIO_THRESHOLD); - ha->last_zio_threshold = DEFAULT_ZIO_THRESHOLD; - diff --git a/queue-5.10/series b/queue-5.10/series index 92f2e0dc677..87c108a87d6 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -319,4 +319,3 @@ scsi-qla2xxx-fix-inconsistent-tmf-timeout.patch scsi-qla2xxx-fix-erroneous-link-up-failure.patch scsi-qla2xxx-turn-off-noisy-message-log.patch scsi-qla2xxx-remove-unsupported-ql2xenabledif-option.patch -scsi-qla2xxx-flush-mailbox-commands-on-chip-reset.patch diff --git a/queue-5.4/scsi-qla2xxx-flush-mailbox-commands-on-chip-reset.patch b/queue-5.4/scsi-qla2xxx-flush-mailbox-commands-on-chip-reset.patch deleted file mode 100644 index 09458381085..00000000000 --- a/queue-5.4/scsi-qla2xxx-flush-mailbox-commands-on-chip-reset.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 6d0b65569c0a10b27c49bacd8d25bcd406003533 Mon Sep 17 00:00:00 2001 -From: Quinn Tran -Date: Mon, 21 Aug 2023 18:30:38 +0530 -Subject: scsi: qla2xxx: Flush mailbox commands on chip reset - -From: Quinn Tran - -commit 6d0b65569c0a10b27c49bacd8d25bcd406003533 upstream. - -Fix race condition between Interrupt thread and Chip reset thread in trying -to flush the same mailbox. With the race condition, the "ha->mbx_intr_comp" -will get an extra complete() call. The extra complete call create erroneous -mailbox timeout condition when the next mailbox is sent where the mailbox -call does not wait for interrupt to arrive. Instead, it advances without -waiting. - -Add lock protection around the check for mailbox completion. - -Cc: stable@vger.kernel.org -Fixes: b2000805a975 ("scsi: qla2xxx: Flush mailbox commands on chip reset") -Signed-off-by: Quinn Tran -Signed-off-by: Nilesh Javali -Link: https://lore.kernel.org/r/20230821130045.34850-3-njavali@marvell.com -Reviewed-by: Himanshu Madhani -Signed-off-by: Martin K. Petersen -Signed-off-by: Greg Kroah-Hartman ---- - drivers/scsi/qla2xxx/qla_def.h | 1 - - drivers/scsi/qla2xxx/qla_init.c | 7 ++++--- - drivers/scsi/qla2xxx/qla_mbx.c | 4 ---- - drivers/scsi/qla2xxx/qla_os.c | 1 - - 4 files changed, 4 insertions(+), 9 deletions(-) - ---- a/drivers/scsi/qla2xxx/qla_def.h -+++ b/drivers/scsi/qla2xxx/qla_def.h -@@ -3952,7 +3952,6 @@ struct qla_hw_data { - uint8_t aen_mbx_count; - atomic_t num_pend_mbx_stage1; - atomic_t num_pend_mbx_stage2; -- atomic_t num_pend_mbx_stage3; - uint16_t frame_payload_size; - - uint32_t login_retry_count; ---- a/drivers/scsi/qla2xxx/qla_init.c -+++ b/drivers/scsi/qla2xxx/qla_init.c -@@ -6740,14 +6740,15 @@ qla2x00_abort_isp_cleanup(scsi_qla_host_ - } - - /* purge MBox commands */ -- if (atomic_read(&ha->num_pend_mbx_stage3)) { -+ spin_lock_irqsave(&ha->hardware_lock, flags); -+ if (test_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags)) { - clear_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags); - complete(&ha->mbx_intr_comp); - } -+ spin_unlock_irqrestore(&ha->hardware_lock, flags); - - i = 0; -- while (atomic_read(&ha->num_pend_mbx_stage3) || -- atomic_read(&ha->num_pend_mbx_stage2) || -+ while (atomic_read(&ha->num_pend_mbx_stage2) || - atomic_read(&ha->num_pend_mbx_stage1)) { - msleep(20); - i++; ---- a/drivers/scsi/qla2xxx/qla_mbx.c -+++ b/drivers/scsi/qla2xxx/qla_mbx.c -@@ -268,7 +268,6 @@ qla2x00_mailbox_command(scsi_qla_host_t - spin_unlock_irqrestore(&ha->hardware_lock, flags); - - wait_time = jiffies; -- atomic_inc(&ha->num_pend_mbx_stage3); - if (!wait_for_completion_timeout(&ha->mbx_intr_comp, - mcp->tov * HZ)) { - ql_dbg(ql_dbg_mbx, vha, 0x117a, -@@ -283,7 +282,6 @@ qla2x00_mailbox_command(scsi_qla_host_t - spin_unlock_irqrestore(&ha->hardware_lock, - flags); - atomic_dec(&ha->num_pend_mbx_stage2); -- atomic_dec(&ha->num_pend_mbx_stage3); - rval = QLA_ABORTED; - goto premature_exit; - } -@@ -293,11 +291,9 @@ qla2x00_mailbox_command(scsi_qla_host_t - ha->flags.mbox_busy = 0; - spin_unlock_irqrestore(&ha->hardware_lock, flags); - atomic_dec(&ha->num_pend_mbx_stage2); -- atomic_dec(&ha->num_pend_mbx_stage3); - rval = QLA_ABORTED; - goto premature_exit; - } -- atomic_dec(&ha->num_pend_mbx_stage3); - - if (time_after(jiffies, wait_time + 5 * HZ)) - ql_log(ql_log_warn, vha, 0x1015, "cmd=0x%x, waited %d msecs\n", ---- a/drivers/scsi/qla2xxx/qla_os.c -+++ b/drivers/scsi/qla2xxx/qla_os.c -@@ -2837,7 +2837,6 @@ qla2x00_probe_one(struct pci_dev *pdev, - ha->max_exchg = FW_MAX_EXCHANGES_CNT; - atomic_set(&ha->num_pend_mbx_stage1, 0); - atomic_set(&ha->num_pend_mbx_stage2, 0); -- atomic_set(&ha->num_pend_mbx_stage3, 0); - atomic_set(&ha->zio_threshold, DEFAULT_ZIO_THRESHOLD); - ha->last_zio_threshold = DEFAULT_ZIO_THRESHOLD; - diff --git a/queue-5.4/series b/queue-5.4/series index 5db2a4c5383..6fe864d960e 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -242,4 +242,3 @@ scsi-qla2xxx-fix-inconsistent-tmf-timeout.patch scsi-qla2xxx-fix-erroneous-link-up-failure.patch scsi-qla2xxx-turn-off-noisy-message-log.patch scsi-qla2xxx-remove-unsupported-ql2xenabledif-option.patch -scsi-qla2xxx-flush-mailbox-commands-on-chip-reset.patch