1
0

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:
Quinn Tran
2018-09-04 14:19:15 -07:00
committed by Martin K. Petersen
parent 8b4673ba3a
commit 6a62946892
6 changed files with 19 additions and 16 deletions

View File

@@ -4157,7 +4157,6 @@ static void qla2x00_async_gpnft_gnnft_sp_done(void *s, int res)
if (rc) {
/* Cleanup here to prevent memory leak */
qla24xx_sp_unmap(vha, sp);
sp->free(sp);
}
spin_lock_irqsave(&vha->work_lock, flags);