diff mbox series

[6/8] qla2xxx: Fix recursive mailbox timeout

Message ID 20180927050518.7147-7-himanshu.madhani@cavium.com (mailing list archive)
State Accepted
Headers show
Series qla2xxx: Bug fixes for the driver | expand

Commit Message

Madhani, Himanshu Sept. 27, 2018, 5:05 a.m. UTC
From: Quinn Tran <quinn.tran@cavium.com>

This patch prevents user space mailbox request from doing
chip reset if the mailbox timed out. The chip reset is
only reserved for the DPC thread to ensure all mailbox
requests are flushed properly. The DPC thread is responsible
for the flushing all MBs and chip reset.

Fixes: b2000805a975 ("scsi: qla2xxx: Flush mailbox commands on chip reset")
Cc: <stable@ger.kernel.org>
Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
---
 drivers/scsi/qla2xxx/qla_mbx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
index 2c6c2cd5a0d0..596a9b214df1 100644
--- a/drivers/scsi/qla2xxx/qla_mbx.c
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
@@ -493,7 +493,7 @@  qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
 				set_bit(ISP_ABORT_NEEDED, &vha->dpc_flags);
 				qla2xxx_wake_dpc(vha);
 			}
-		} else if (!abort_active) {
+		} else if (current == ha->dpc_thread) {
 			/* call abort directly since we are in the DPC thread */
 			ql_dbg(ql_dbg_mbx, vha, 0x101d,
 			    "Timeout, calling abort_isp.\n");