Lines Matching defs:qpair

499  * @qpair: queue pair pointer
509 __qla2x00_marker(struct scsi_qla_host *vha, struct qla_qpair *qpair,
514 struct req_que *req = qpair->req;
518 mrk = (mrk_entry_t *)__qla2x00_alloc_iocbs(qpair, NULL);
553 qla2x00_marker(struct scsi_qla_host *vha, struct qla_qpair *qpair,
559 spin_lock_irqsave(qpair->qp_lock_ptr, flags);
560 ret = __qla2x00_marker(vha, qpair, loop_id, lun, type);
561 spin_unlock_irqrestore(qpair->qp_lock_ptr, flags);
601 struct qla_qpair *qpair = sp->qpair;
618 qpair->counters.output_bytes += scsi_bufflen(cmd);
619 qpair->counters.output_requests++;
622 qpair->counters.input_bytes += scsi_bufflen(cmd);
623 qpair->counters.input_requests++;
635 dsd_ptr = list_first_entry(&qpair->dsd_list, struct dsd_dma, list);
638 qpair->dsd_avail--;
641 qpair->dsd_inuse++;
709 struct qla_qpair *qpair = sp->qpair;
727 qpair->counters.output_bytes += scsi_bufflen(cmd);
728 qpair->counters.output_requests++;
731 qpair->counters.input_bytes += scsi_bufflen(cmd);
732 qpair->counters.input_requests++;
1595 if (qla_get_fw_resources(sp->qpair, &sp->iores))
1664 sp->qpair->cmd_cnt++;
1682 qla_put_fw_resources(sp->qpair, &sp->iores);
1802 if (qla_get_fw_resources(sp->qpair, &sp->iores))
1870 sp->qpair->cmd_cnt++;
1890 qla_put_fw_resources(sp->qpair, &sp->iores);
1918 struct qla_qpair *qpair = sp->qpair;
1923 /* Acquire qpair specific lock */
1924 spin_lock_irqsave(&qpair->qp_lock, flags);
1926 /* Setup qpair pointers */
1927 req = qpair->req;
1928 rsp = qpair->rsp;
1935 if (__qla2x00_marker(vha, qpair, 0, 0, MK_SYNC_ALL) !=
1937 spin_unlock_irqrestore(&qpair->qp_lock, flags);
1962 if (qla_get_fw_resources(sp->qpair, &sp->iores))
2031 sp->qpair->cmd_cnt++;
2042 spin_unlock_irqrestore(&qpair->qp_lock, flags);
2049 qla_put_fw_resources(sp->qpair, &sp->iores);
2050 spin_unlock_irqrestore(&qpair->qp_lock, flags);
2081 struct qla_qpair *qpair = sp->qpair;
2086 if (!qpair->online) {
2091 if (!qpair->difdix_supported &&
2105 spin_lock_irqsave(&qpair->qp_lock, flags);
2107 /* Setup qpair pointers */
2108 rsp = qpair->rsp;
2109 req = qpair->req;
2116 if (__qla2x00_marker(vha, qpair, 0, 0, MK_SYNC_ALL) !=
2118 spin_unlock_irqrestore(&qpair->qp_lock, flags);
2184 if (qla_get_fw_resources(sp->qpair, &sp->iores))
2251 sp->qpair->cmd_cnt++;
2260 spin_unlock_irqrestore(&qpair->qp_lock, flags);
2271 qla_put_fw_resources(sp->qpair, &sp->iores);
2272 spin_unlock_irqrestore(&qpair->qp_lock, flags);
2282 __qla2x00_alloc_iocbs(struct qla_qpair *qpair, srb_t *sp)
2284 scsi_qla_host_t *vha = qpair->vha;
2286 struct req_que *req = qpair->req;
2303 if (qpair->use_shadow_reg)
2318 if (!qpair->use_shadow_reg && cnt == ISP_REG16_DISCONNECT) {
2361 qpair->tgt_counters.num_alloc_iocb_failed++;
2366 qla2x00_alloc_iocbs_ready(struct qla_qpair *qpair, srb_t *sp)
2368 scsi_qla_host_t *vha = qpair->vha;
2373 return __qla2x00_alloc_iocbs(qpair, sp);
2548 struct req_que *req = sp->qpair->req;
2672 spin_lock_irqsave(sp->qpair->qp_lock_ptr, flags);
2673 for (h = 1; h < sp->qpair->req->num_outstanding_cmds; h++) {
2674 if (sp->qpair->req->outstanding_cmds[h] == sp) {
2675 sp->qpair->req->outstanding_cmds[h] = NULL;
2679 spin_unlock_irqrestore(sp->qpair->qp_lock_ptr, flags);
2880 spin_lock_irqsave(sp->qpair->qp_lock_ptr, flags);
2881 for (h = 1; h < sp->qpair->req->num_outstanding_cmds; h++) {
2882 if (sp->qpair->req->outstanding_cmds[h] == sp) {
2883 sp->qpair->req->outstanding_cmds[h] = NULL;
2887 spin_unlock_irqrestore(sp->qpair->qp_lock_ptr, flags);
3141 /* it is assume qpair lock is held */
3390 struct qla_qpair *qpair = sp->qpair;
3439 if ((more_dsd_lists + qpair->dsd_inuse) >= NUM_DSD_CHAIN) {
3442 more_dsd_lists + qpair->dsd_inuse, NUM_DSD_CHAIN,
3447 if (more_dsd_lists <= qpair->dsd_avail)
3450 more_dsd_lists -= qpair->dsd_avail;
3470 list_add_tail(&dsd_ptr->list, &qpair->dsd_list);
3471 qpair->dsd_avail++;
3693 struct req_que *req = sp->qpair->req;
3904 return qla_get_fw_resources(sp->qpair, &sp->iores);
3912 mrk->handle = make_handle(sp->qpair->req->id, sp->handle);
3927 struct qla_qpair *qp = sp->qpair;
3941 pkt = qla2x00_alloc_iocbs_ready(sp->qpair, sp);
4045 qla_put_fw_resources(sp->qpair, &sp->iores);
4251 struct qla_qpair *qpair = sp->qpair;
4259 /* Acquire qpair specific lock */
4260 spin_lock_irqsave(&qpair->qp_lock, flags);
4262 /* Setup qpair pointers */
4263 req = qpair->req;
4264 rsp = qpair->rsp;
4271 if (__qla2x00_marker(vha, qpair, 0, 0, MK_SYNC_ALL) != QLA_SUCCESS) {
4272 spin_unlock_irqrestore(&qpair->qp_lock, flags);
4301 if (qla_get_fw_resources(sp->qpair, &sp->iores))
4305 if ((more_dsd_lists + qpair->dsd_inuse) >= NUM_DSD_CHAIN) {
4308 more_dsd_lists + qpair->dsd_inuse, NUM_DSD_CHAIN, cmd);
4312 if (more_dsd_lists <= qpair->dsd_avail)
4315 more_dsd_lists -= qpair->dsd_avail;
4334 list_add_tail(&dsd_ptr->list, &qpair->dsd_list);
4335 qpair->dsd_avail++;
4459 sp->qpair->cmd_cnt++;
4470 spin_unlock_irqrestore(&qpair->qp_lock, flags);
4481 qla_put_fw_resources(sp->qpair, &sp->iores);
4488 spin_unlock_irqrestore(&qpair->qp_lock, flags);