diff options
author | Quinn Tran <qutran@marvell.com> | 2023-08-21 18:30:38 +0530 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-08-21 17:45:14 -0400 |
commit | 6d0b65569c0a10b27c49bacd8d25bcd406003533 (patch) | |
tree | e653df11e3ede30081777dfdea3edb4b3ddc38eb /drivers/scsi/qla2xxx/qla_def.h | |
parent | 875386b98857822b77ac7f95bdf367b70af5b78c (diff) | |
download | linux-6d0b65569c0a10b27c49bacd8d25bcd406003533.tar.gz linux-6d0b65569c0a10b27c49bacd8d25bcd406003533.tar.bz2 linux-6d0b65569c0a10b27c49bacd8d25bcd406003533.zip |
scsi: qla2xxx: Flush mailbox commands on chip reset
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 <quinn.tran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Link: https://lore.kernel.org/r/20230821130045.34850-3-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_def.h')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_def.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 2007d5bb5f9f..f1cf921068e3 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h @@ -4418,7 +4418,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; |