Lines Matching refs:qpair

110 	struct qla_qpair *qpair = sp->qpair;  in qla24xx_abort_iocb_timeout()  local
125 spin_lock_irqsave(qpair->qp_lock_ptr, flags); in qla24xx_abort_iocb_timeout()
126 for (handle = 1; handle < qpair->req->num_outstanding_cmds; handle++) { in qla24xx_abort_iocb_timeout()
127 if (sp->cmd_sp && (qpair->req->outstanding_cmds[handle] == in qla24xx_abort_iocb_timeout()
129 qpair->req->outstanding_cmds[handle] = NULL; in qla24xx_abort_iocb_timeout()
134 if (qpair->req->outstanding_cmds[handle] == sp) { in qla24xx_abort_iocb_timeout()
135 qpair->req->outstanding_cmds[handle] = NULL; in qla24xx_abort_iocb_timeout()
140 spin_unlock_irqrestore(qpair->qp_lock_ptr, flags); in qla24xx_abort_iocb_timeout()
179 sp = qla2xxx_get_qpair_sp(cmd_sp->vha, cmd_sp->qpair, cmd_sp->fcport, in qla24xx_async_abort_cmd()
188 sp->qpair = cmd_sp->qpair; in qla24xx_async_abort_cmd()
199 abt_iocb->u.abt.req_que_no = cpu_to_le16(cmd_sp->qpair->req->id); in qla24xx_async_abort_cmd()
252 spin_lock_irqsave(sp->qpair->qp_lock_ptr, flags); in qla2x00_async_iocb_timeout()
253 for (h = 1; h < sp->qpair->req->num_outstanding_cmds; in qla2x00_async_iocb_timeout()
255 if (sp->qpair->req->outstanding_cmds[h] == in qla2x00_async_iocb_timeout()
257 sp->qpair->req->outstanding_cmds[h] = in qla2x00_async_iocb_timeout()
262 spin_unlock_irqrestore(sp->qpair->qp_lock_ptr, flags); in qla2x00_async_iocb_timeout()
276 spin_lock_irqsave(sp->qpair->qp_lock_ptr, flags); in qla2x00_async_iocb_timeout()
277 for (h = 1; h < sp->qpair->req->num_outstanding_cmds; in qla2x00_async_iocb_timeout()
279 if (sp->qpair->req->outstanding_cmds[h] == in qla2x00_async_iocb_timeout()
281 sp->qpair->req->outstanding_cmds[h] = in qla2x00_async_iocb_timeout()
286 spin_unlock_irqrestore(sp->qpair->qp_lock_ptr, flags); in qla2x00_async_iocb_timeout()
1999 spin_lock_irqsave(sp->qpair->qp_lock_ptr, flags); in qla2x00_tmf_iocb_timeout()
2000 for (h = 1; h < sp->qpair->req->num_outstanding_cmds; h++) { in qla2x00_tmf_iocb_timeout()
2001 if (sp->qpair->req->outstanding_cmds[h] == sp) { in qla2x00_tmf_iocb_timeout()
2002 sp->qpair->req->outstanding_cmds[h] = NULL; in qla2x00_tmf_iocb_timeout()
2006 spin_unlock_irqrestore(sp->qpair->qp_lock_ptr, flags); in qla2x00_tmf_iocb_timeout()
2088 struct qla_qpair *qpair = sp->qpair; in qla24xx_async_abort_command() local
2090 struct req_que *req = qpair->req; in qla24xx_async_abort_command()
2092 spin_lock_irqsave(qpair->qp_lock_ptr, flags); in qla24xx_async_abort_command()
2097 spin_unlock_irqrestore(qpair->qp_lock_ptr, flags); in qla24xx_async_abort_command()
9379 struct qla_qpair *qpair = NULL; in qla2xxx_create_qpair() local
9389 qpair = kzalloc(sizeof(struct qla_qpair), GFP_KERNEL); in qla2xxx_create_qpair()
9390 if (qpair == NULL) { in qla2xxx_create_qpair()
9396 qpair->hw = vha->hw; in qla2xxx_create_qpair()
9397 qpair->vha = vha; in qla2xxx_create_qpair()
9398 qpair->qp_lock_ptr = &qpair->qp_lock; in qla2xxx_create_qpair()
9399 spin_lock_init(&qpair->qp_lock); in qla2xxx_create_qpair()
9400 qpair->use_shadow_reg = IS_SHADOW_REG_CAPABLE(ha) ? 1 : 0; in qla2xxx_create_qpair()
9413 ha->queue_pair_map[qpair_id] = qpair; in qla2xxx_create_qpair()
9414 qpair->id = qpair_id; in qla2xxx_create_qpair()
9415 qpair->vp_idx = vp_idx; in qla2xxx_create_qpair()
9416 qpair->fw_started = ha->flags.fw_started; in qla2xxx_create_qpair()
9417 INIT_LIST_HEAD(&qpair->hints_list); in qla2xxx_create_qpair()
9418 qpair->chip_reset = ha->base_qpair->chip_reset; in qla2xxx_create_qpair()
9419 qpair->enable_class_2 = ha->base_qpair->enable_class_2; in qla2xxx_create_qpair()
9420 qpair->enable_explicit_conf = in qla2xxx_create_qpair()
9427 qpair->msix = msix; in qla2xxx_create_qpair()
9432 if (!qpair->msix) { in qla2xxx_create_qpair()
9438 qpair->msix->in_use = 1; in qla2xxx_create_qpair()
9439 list_add_tail(&qpair->qp_list_elem, &vha->qp_list); in qla2xxx_create_qpair()
9440 qpair->pdev = ha->pdev; in qla2xxx_create_qpair()
9442 qpair->reqq_start_iocbs = qla_83xx_start_iocbs; in qla2xxx_create_qpair()
9447 rsp_id = qla25xx_create_rsp_que(ha, 0, 0, 0, qpair, startqp); in qla2xxx_create_qpair()
9454 qpair->rsp = ha->rsp_q_map[rsp_id]; in qla2xxx_create_qpair()
9465 qpair->req = ha->req_q_map[req_id]; in qla2xxx_create_qpair()
9466 qpair->rsp->req = qpair->req; in qla2xxx_create_qpair()
9467 qpair->rsp->qpair = qpair; in qla2xxx_create_qpair()
9469 qla_cpu_update(qpair, raw_smp_processor_id()); in qla2xxx_create_qpair()
9473 qpair->difdix_supported = 1; in qla2xxx_create_qpair()
9476 qpair->srb_mempool = mempool_create_slab_pool(SRB_MIN_REQ, srb_cachep); in qla2xxx_create_qpair()
9477 if (!qpair->srb_mempool) { in qla2xxx_create_qpair()
9480 qpair->id); in qla2xxx_create_qpair()
9485 qpair->online = 1; in qla2xxx_create_qpair()
9492 qpair->id); in qla2xxx_create_qpair()
9495 qpair->id); in qla2xxx_create_qpair()
9497 return qpair; in qla2xxx_create_qpair()
9501 qla25xx_delete_rsp_que(vha, qpair->rsp); in qla2xxx_create_qpair()
9504 qpair->msix->in_use = 0; in qla2xxx_create_qpair()
9505 list_del(&qpair->qp_list_elem); in qla2xxx_create_qpair()
9514 kfree(qpair); in qla2xxx_create_qpair()
9518 int qla2xxx_delete_qpair(struct scsi_qla_host *vha, struct qla_qpair *qpair) in qla2xxx_delete_qpair() argument
9521 struct qla_hw_data *ha = qpair->hw; in qla2xxx_delete_qpair()
9523 qpair->delete_in_progress = 1; in qla2xxx_delete_qpair()
9525 ret = qla25xx_delete_req_que(vha, qpair->req); in qla2xxx_delete_qpair()
9529 ret = qla25xx_delete_rsp_que(vha, qpair->rsp); in qla2xxx_delete_qpair()
9534 ha->queue_pair_map[qpair->id] = NULL; in qla2xxx_delete_qpair()
9535 clear_bit(qpair->id, ha->qpair_qid_map); in qla2xxx_delete_qpair()
9537 list_del(&qpair->qp_list_elem); in qla2xxx_delete_qpair()
9543 mempool_destroy(qpair->srb_mempool); in qla2xxx_delete_qpair()
9544 kfree(qpair); in qla2xxx_delete_qpair()