scsi: qla2xxx: Move {get|rel}_sp to base_qpair struct
Currently, qla2x00_[get_sp|rel_sp] routines does {get|release} of srb
resource/srb_mempool directly from qla_hw_data. qla2x00_start_sp() is used to
issue management commands through the default Request Q 0 & Response Q 0 or
base_qpair. This patch moves access of these resources through
base_qpair. Instead of having knowledge of specific Q number and lock to
rsp/req queue, this change will key off the qpair that is assigned to the srb
resource. This lays the ground work for other routines to see this resource
through the qpair.
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>
This commit is contained in:
committed by
Martin K. Petersen
parent
8b4673ba3a
commit
6a62946892
@@ -398,6 +398,7 @@ static void qla_init_base_qpair(struct scsi_qla_host *vha, struct req_que *req,
|
||||
ha->base_qpair->qp_lock_ptr = &ha->hardware_lock;
|
||||
ha->base_qpair->use_shadow_reg = IS_SHADOW_REG_CAPABLE(ha) ? 1 : 0;
|
||||
ha->base_qpair->msix = &ha->msix_entries[QLA_MSIX_RSP_Q];
|
||||
ha->base_qpair->srb_mempool = ha->srb_mempool;
|
||||
INIT_LIST_HEAD(&ha->base_qpair->hints_list);
|
||||
ha->base_qpair->enable_class_2 = ql2xenableclass2;
|
||||
/* init qpair to this cpu. Will adjust at run time. */
|
||||
@@ -1013,7 +1014,7 @@ qla2xxx_mqueuecommand(struct Scsi_Host *host, struct scsi_cmnd *cmd,
|
||||
else
|
||||
goto qc24_target_busy;
|
||||
|
||||
sp = qla2xxx_get_qpair_sp(qpair, fcport, GFP_ATOMIC);
|
||||
sp = qla2xxx_get_qpair_sp(vha, qpair, fcport, GFP_ATOMIC);
|
||||
if (!sp)
|
||||
goto qc24_host_busy;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user