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;
2644 spin_lock_irqsave(sp->qpair->qp_lock_ptr, flags);
2645 for (h = 1; h < sp->qpair->req->num_outstanding_cmds; h++) {
2646 if (sp->qpair->req->outstanding_cmds[h] == sp) {
2647 sp->qpair->req->outstanding_cmds[h] = NULL;
2651 spin_unlock_irqrestore(sp->qpair->qp_lock_ptr, flags);
2850 spin_lock_irqsave(sp->qpair->qp_lock_ptr, flags);
2851 for (h = 1; h < sp->qpair->req->num_outstanding_cmds; h++) {
2852 if (sp->qpair->req->outstanding_cmds[h] == sp) {
2853 sp->qpair->req->outstanding_cmds[h] = NULL;
2857 spin_unlock_irqrestore(sp->qpair->qp_lock_ptr, flags);
3121 /* it is assume qpair lock is held */
3370 struct qla_qpair *qpair = sp->qpair;
3419 if ((more_dsd_lists + qpair->dsd_inuse) >= NUM_DSD_CHAIN) {
3422 more_dsd_lists + qpair->dsd_inuse, NUM_DSD_CHAIN,
3427 if (more_dsd_lists <= qpair->dsd_avail)
3430 more_dsd_lists -= qpair->dsd_avail;
3450 list_add_tail(&dsd_ptr->list, &qpair->dsd_list);
3451 qpair->dsd_avail++;
3673 struct req_que *req = sp->qpair->req;
3884 return qla_get_fw_resources(sp->qpair, &sp->iores);
3892 mrk->handle = make_handle(sp->qpair->req->id, sp->handle);
3907 struct qla_qpair *qp = sp->qpair;
3921 pkt = __qla2x00_alloc_iocbs(sp->qpair, sp);
4025 qla_put_fw_resources(sp->qpair, &sp->iores);
4231 struct qla_qpair *qpair = sp->qpair;
4239 /* Acquire qpair specific lock */
4240 spin_lock_irqsave(&qpair->qp_lock, flags);
4242 /* Setup qpair pointers */
4243 req = qpair->req;
4244 rsp = qpair->rsp;
4251 if (__qla2x00_marker(vha, qpair, 0, 0, MK_SYNC_ALL) != QLA_SUCCESS) {
4252 spin_unlock_irqrestore(&qpair->qp_lock, flags);
4281 if (qla_get_fw_resources(sp->qpair, &sp->iores))
4285 if ((more_dsd_lists + qpair->dsd_inuse) >= NUM_DSD_CHAIN) {
4288 more_dsd_lists + qpair->dsd_inuse, NUM_DSD_CHAIN, cmd);
4292 if (more_dsd_lists <= qpair->dsd_avail)
4295 more_dsd_lists -= qpair->dsd_avail;
4314 list_add_tail(&dsd_ptr->list, &qpair->dsd_list);
4315 qpair->dsd_avail++;
4439 sp->qpair->cmd_cnt++;
4450 spin_unlock_irqrestore(&qpair->qp_lock, flags);
4461 qla_put_fw_resources(sp->qpair, &sp->iores);
4468 spin_unlock_irqrestore(&qpair->qp_lock, flags);