Lines Matching refs:qpair

101 	struct qla_qpair *qpair = sp->qpair;
115 spin_lock_irqsave(qpair->qp_lock_ptr, flags);
116 for (handle = 1; handle < qpair->req->num_outstanding_cmds; handle++) {
117 if (sp->cmd_sp && (qpair->req->outstanding_cmds[handle] ==
119 qpair->req->outstanding_cmds[handle] = NULL;
122 if (qpair->req->outstanding_cmds[handle] == sp) {
123 qpair->req->outstanding_cmds[handle] = NULL;
127 spin_unlock_irqrestore(qpair->qp_lock_ptr, flags);
154 sp = qla2xxx_get_qpair_sp(cmd_sp->vha, cmd_sp->qpair, cmd_sp->fcport,
162 sp->qpair = cmd_sp->qpair;
173 abt_iocb->u.abt.req_que_no = cpu_to_le16(cmd_sp->qpair->req->id);
226 spin_lock_irqsave(sp->qpair->qp_lock_ptr, flags);
227 for (h = 1; h < sp->qpair->req->num_outstanding_cmds;
229 if (sp->qpair->req->outstanding_cmds[h] ==
231 sp->qpair->req->outstanding_cmds[h] =
236 spin_unlock_irqrestore(sp->qpair->qp_lock_ptr, flags);
250 spin_lock_irqsave(sp->qpair->qp_lock_ptr, flags);
251 for (h = 1; h < sp->qpair->req->num_outstanding_cmds;
253 if (sp->qpair->req->outstanding_cmds[h] ==
255 sp->qpair->req->outstanding_cmds[h] =
260 spin_unlock_irqrestore(sp->qpair->qp_lock_ptr, flags);
1873 spin_lock_irqsave(sp->qpair->qp_lock_ptr, flags);
1874 for (h = 1; h < sp->qpair->req->num_outstanding_cmds; h++) {
1875 if (sp->qpair->req->outstanding_cmds[h] == sp) {
1876 sp->qpair->req->outstanding_cmds[h] = NULL;
1880 spin_unlock_irqrestore(sp->qpair->qp_lock_ptr, flags);
1961 struct qla_qpair *qpair = sp->qpair;
1963 struct req_que *req = qpair->req;
1965 spin_lock_irqsave(qpair->qp_lock_ptr, flags);
1970 spin_unlock_irqrestore(qpair->qp_lock_ptr, flags);
9133 struct qla_qpair *qpair = NULL;
9143 qpair = kzalloc(sizeof(struct qla_qpair), GFP_KERNEL);
9144 if (qpair == NULL) {
9150 qpair->hw = vha->hw;
9151 qpair->vha = vha;
9152 qpair->qp_lock_ptr = &qpair->qp_lock;
9153 spin_lock_init(&qpair->qp_lock);
9154 qpair->use_shadow_reg = IS_SHADOW_REG_CAPABLE(ha) ? 1 : 0;
9167 ha->queue_pair_map[qpair_id] = qpair;
9168 qpair->id = qpair_id;
9169 qpair->vp_idx = vp_idx;
9170 qpair->fw_started = ha->flags.fw_started;
9171 INIT_LIST_HEAD(&qpair->hints_list);
9172 qpair->chip_reset = ha->base_qpair->chip_reset;
9173 qpair->enable_class_2 = ha->base_qpair->enable_class_2;
9174 qpair->enable_explicit_conf =
9181 qpair->msix = msix;
9183 "Vector %x selected for qpair\n", msix->vector);
9186 if (!qpair->msix) {
9192 qpair->msix->in_use = 1;
9193 list_add_tail(&qpair->qp_list_elem, &vha->qp_list);
9194 qpair->pdev = ha->pdev;
9196 qpair->reqq_start_iocbs = qla_83xx_start_iocbs;
9201 rsp_id = qla25xx_create_rsp_que(ha, 0, 0, 0, qpair, startqp);
9208 qpair->rsp = ha->rsp_q_map[rsp_id];
9219 qpair->req = ha->req_q_map[req_id];
9220 qpair->rsp->req = qpair->req;
9221 qpair->rsp->qpair = qpair;
9222 /* init qpair to this cpu. Will adjust at run time. */
9223 qla_cpu_update(qpair, raw_smp_processor_id());
9227 qpair->difdix_supported = 1;
9230 qpair->srb_mempool = mempool_create_slab_pool(SRB_MIN_REQ, srb_cachep);
9231 if (!qpair->srb_mempool) {
9233 "Failed to create srb mempool for qpair %d\n",
9234 qpair->id);
9239 qpair->online = 1;
9246 qpair->id);
9249 qpair->id);
9251 return qpair;
9255 qla25xx_delete_rsp_que(vha, qpair->rsp);
9258 qpair->msix->in_use = 0;
9259 list_del(&qpair->qp_list_elem);
9268 kfree(qpair);
9272 int qla2xxx_delete_qpair(struct scsi_qla_host *vha, struct qla_qpair *qpair)
9275 struct qla_hw_data *ha = qpair->hw;
9277 qpair->delete_in_progress = 1;
9279 ret = qla25xx_delete_req_que(vha, qpair->req);
9283 ret = qla25xx_delete_rsp_que(vha, qpair->rsp);
9288 ha->queue_pair_map[qpair->id] = NULL;
9289 clear_bit(qpair->id, ha->qpair_qid_map);
9291 list_del(&qpair->qp_list_elem);
9297 mempool_destroy(qpair->srb_mempool);
9298 kfree(qpair);