Lines Matching refs:qpair
110 struct qla_qpair *qpair = sp->qpair;
125 spin_lock_irqsave(qpair->qp_lock_ptr, flags);
126 for (handle = 1; handle < qpair->req->num_outstanding_cmds; handle++) {
127 if (sp->cmd_sp && (qpair->req->outstanding_cmds[handle] ==
129 qpair->req->outstanding_cmds[handle] = NULL;
131 qla_put_fw_resources(qpair, &sp->cmd_sp->iores);
135 if (qpair->req->outstanding_cmds[handle] == sp) {
136 qpair->req->outstanding_cmds[handle] = NULL;
138 qla_put_fw_resources(qpair, &sp->iores);
142 spin_unlock_irqrestore(qpair->qp_lock_ptr, flags);
181 sp = qla2xxx_get_qpair_sp(cmd_sp->vha, cmd_sp->qpair, cmd_sp->fcport,
190 sp->qpair = cmd_sp->qpair;
201 abt_iocb->u.abt.req_que_no = cpu_to_le16(cmd_sp->qpair->req->id);
254 spin_lock_irqsave(sp->qpair->qp_lock_ptr, flags);
255 for (h = 1; h < sp->qpair->req->num_outstanding_cmds;
257 if (sp->qpair->req->outstanding_cmds[h] ==
259 sp->qpair->req->outstanding_cmds[h] =
264 spin_unlock_irqrestore(sp->qpair->qp_lock_ptr, flags);
278 spin_lock_irqsave(sp->qpair->qp_lock_ptr, flags);
279 for (h = 1; h < sp->qpair->req->num_outstanding_cmds;
281 if (sp->qpair->req->outstanding_cmds[h] ==
283 sp->qpair->req->outstanding_cmds[h] =
288 spin_unlock_irqrestore(sp->qpair->qp_lock_ptr, flags);
2012 spin_lock_irqsave(sp->qpair->qp_lock_ptr, flags);
2013 for (h = 1; h < sp->qpair->req->num_outstanding_cmds; h++) {
2014 if (sp->qpair->req->outstanding_cmds[h] == sp) {
2015 sp->qpair->req->outstanding_cmds[h] = NULL;
2016 qla_put_fw_resources(sp->qpair, &sp->iores);
2020 spin_unlock_irqrestore(sp->qpair->qp_lock_ptr, flags);
2035 sp->u.iocb_cmd.u.tmf.lun, sp->qpair->id);
2077 arg->modifier, arg->lun, arg->qpair->id);
2085 sp = qla2xxx_get_qpair_sp(vha, arg->qpair, fcport, GFP_KERNEL);
2106 arg->modifier, arg->lun, sp->qpair->id, rval);
2121 arg->modifier, arg->lun, sp->qpair->id, rval);
2166 arg->modifier, arg->lun, arg->qpair->id);
2174 sp = qla2xxx_get_qpair_sp(vha, arg->qpair, fcport, GFP_KERNEL);
2195 arg->flags, arg->lun, sp->qpair->id, rval);
2326 a.qpair = vha->hw->base_qpair;
2340 struct qla_qpair *qpair = sp->qpair;
2342 struct req_que *req = qpair->req;
2344 spin_lock_irqsave(qpair->qp_lock_ptr, flags);
2349 spin_unlock_irqrestore(qpair->qp_lock_ptr, flags);
4185 static void __qla_adjust_iocb_limit(struct qla_qpair *qpair)
4189 struct qla_hw_data *ha = qpair->vha->hw;
4194 qpair->fwres.iocbs_total = ha->orig_fw_iocb_count;
4195 qpair->fwres.iocbs_limit = limit;
4196 qpair->fwres.iocbs_qp_limit = limit / num_qps;
4198 qpair->fwres.exch_total = ha->orig_fw_xcb_count;
4199 qpair->fwres.exch_limit = (ha->orig_fw_xcb_count *
9619 struct qla_qpair *qpair = NULL;
9629 qpair = kzalloc(sizeof(struct qla_qpair), GFP_KERNEL);
9630 if (qpair == NULL) {
9636 qpair->hw = vha->hw;
9637 qpair->vha = vha;
9638 qpair->qp_lock_ptr = &qpair->qp_lock;
9639 spin_lock_init(&qpair->qp_lock);
9640 qpair->use_shadow_reg = IS_SHADOW_REG_CAPABLE(ha) ? 1 : 0;
9653 ha->queue_pair_map[qpair_id] = qpair;
9654 qpair->id = qpair_id;
9655 qpair->vp_idx = vp_idx;
9656 qpair->fw_started = ha->flags.fw_started;
9657 INIT_LIST_HEAD(&qpair->hints_list);
9658 INIT_LIST_HEAD(&qpair->dsd_list);
9659 qpair->chip_reset = ha->base_qpair->chip_reset;
9660 qpair->enable_class_2 = ha->base_qpair->enable_class_2;
9661 qpair->enable_explicit_conf =
9668 qpair->msix = msix;
9670 "Vector %x selected for qpair\n", msix->vector);
9673 if (!qpair->msix) {
9679 qpair->msix->in_use = 1;
9680 list_add_tail(&qpair->qp_list_elem, &vha->qp_list);
9681 qpair->pdev = ha->pdev;
9683 qpair->reqq_start_iocbs = qla_83xx_start_iocbs;
9688 rsp_id = qla25xx_create_rsp_que(ha, 0, 0, 0, qpair, startqp);
9695 qpair->rsp = ha->rsp_q_map[rsp_id];
9706 qpair->req = ha->req_q_map[req_id];
9707 qpair->rsp->req = qpair->req;
9708 qpair->rsp->qpair = qpair;
9710 if (!qpair->cpu_mapped)
9711 qla_cpu_update(qpair, raw_smp_processor_id());
9715 qpair->difdix_supported = 1;
9718 qpair->srb_mempool = mempool_create_slab_pool(SRB_MIN_REQ, srb_cachep);
9719 if (!qpair->srb_mempool) {
9721 "Failed to create srb mempool for qpair %d\n",
9722 qpair->id);
9726 if (qla_create_buf_pool(vha, qpair)) {
9728 "Failed to initialize buf pool for qpair %d\n",
9729 qpair->id);
9734 qpair->online = 1;
9741 qpair->id);
9744 qpair->id);
9746 return qpair;
9749 mempool_destroy(qpair->srb_mempool);
9751 qla25xx_delete_req_que(vha, qpair->req);
9753 qla25xx_delete_rsp_que(vha, qpair->rsp);
9756 qpair->msix->in_use = 0;
9757 list_del(&qpair->qp_list_elem);
9766 kfree(qpair);
9770 int qla2xxx_delete_qpair(struct scsi_qla_host *vha, struct qla_qpair *qpair)
9773 struct qla_hw_data *ha = qpair->hw;
9775 qpair->delete_in_progress = 1;
9777 qla_free_buf_pool(qpair);
9779 ret = qla25xx_delete_req_que(vha, qpair->req);
9783 ret = qla25xx_delete_rsp_que(vha, qpair->rsp);
9787 if (!list_empty(&qpair->dsd_list)) {
9792 &qpair->dsd_list, list) {
9801 ha->queue_pair_map[qpair->id] = NULL;
9802 clear_bit(qpair->id, ha->qpair_qid_map);
9804 list_del(&qpair->qp_list_elem);
9810 mempool_destroy(qpair->srb_mempool);
9811 kfree(qpair);