summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_os.c
diff options
context:
space:
mode:
authorQuinn Tran <quinn.tran@cavium.com>2018-08-02 23:16:52 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2018-08-02 23:56:18 +0300
commitb2000805a9759d315f56eecaca7779aa9197a72f (patch)
tree8196cb8cd909b640c18b72b4ef55a4732dbb5d1c /drivers/scsi/qla2xxx/qla_os.c
parentcb97f2c2e8d9f8c71ddbf04ad57e163ee6d86474 (diff)
downloadlinux-b2000805a9759d315f56eecaca7779aa9197a72f.tar.xz
scsi: qla2xxx: Flush mailbox commands on chip reset
Flush pending mailbox commands on chip reset. Wake up command that's waiting for an interrupt and wait for mailbox counters to go to zero. Signed-off-by: Quinn Tran <quinn.tran@cavium.com> Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index e218d68de532..04e0c7f51e68 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -2815,6 +2815,9 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
ha->link_data_rate = PORT_SPEED_UNKNOWN;
ha->optrom_size = OPTROM_SIZE_2300;
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);
/* Assign ISP specific operations. */
if (IS_QLA2100(ha)) {