summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_os.c
diff options
context:
space:
mode:
authorSawan Chandak <sawan.chandak@cavium.com>2017-06-13 20:47:19 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2017-06-27 21:21:40 -0400
commitd65237c7f086042b5630d94fe2d151f62c09f723 (patch)
treeb9a52b70191cb79251c3c42230003964f9ade519 /drivers/scsi/qla2xxx/qla_os.c
parente326d22af9653dd8eff05d71f0d1bad9174578a3 (diff)
scsi: qla2xxx: Fix mailbox failure while deleting Queue pairs
In target mode driver, queue pairs are not created during driver load time, instead they are created at the configuration time after chip reset. If a user tries to load/unload driver after queue pairs are created, then there would be mailbox failure, while deleting queue pairs. Flag is added to check if queue pairs are created or not. Queue pairs will be deleted only If they were created during target configuration. Signed-off-by: Sawan Chandak <sawan.chandak@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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index 3963602aef35..13e4d2428a9a 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -384,6 +384,7 @@ static int qla2x00_alloc_queues(struct qla_hw_data *ha, struct req_que *req,
ha->base_qpair->rsp = rsp;
ha->base_qpair->vha = vha;
ha->base_qpair->qp_lock_ptr = &ha->hardware_lock;
+ /* init qpair to this cpu. Will adjust at run time. */
ha->base_qpair->msix = &ha->msix_entries[QLA_MSIX_RSP_Q];
INIT_LIST_HEAD(&ha->base_qpair->hints_list);
qla_cpu_update(rsp->qpair, smp_processor_id());