Lines Matching refs:op_reply_q

481 mpi3mr_get_reply_desc(struct op_reply_qinfo *op_reply_q, u32 reply_ci)  in mpi3mr_get_reply_desc()  argument
484 struct segments *segments = op_reply_q->q_segments; in mpi3mr_get_reply_desc()
488 segments[reply_ci / op_reply_q->segment_qd].segment; in mpi3mr_get_reply_desc()
490 (reply_ci % op_reply_q->segment_qd); in mpi3mr_get_reply_desc()
507 struct op_reply_qinfo *op_reply_q) in mpi3mr_process_op_reply_q() argument
517 reply_qidx = op_reply_q->qid - 1; in mpi3mr_process_op_reply_q()
519 if (!atomic_add_unless(&op_reply_q->in_use, 1, 1)) in mpi3mr_process_op_reply_q()
522 exp_phase = op_reply_q->ephase; in mpi3mr_process_op_reply_q()
523 reply_ci = op_reply_q->ci; in mpi3mr_process_op_reply_q()
525 reply_desc = mpi3mr_get_reply_desc(op_reply_q, reply_ci); in mpi3mr_process_op_reply_q()
528 atomic_dec(&op_reply_q->in_use); in mpi3mr_process_op_reply_q()
542 atomic_dec(&op_reply_q->pend_ios); in mpi3mr_process_op_reply_q()
547 if (++reply_ci == op_reply_q->num_replies) { in mpi3mr_process_op_reply_q()
552 reply_desc = mpi3mr_get_reply_desc(op_reply_q, reply_ci); in mpi3mr_process_op_reply_q()
563 op_reply_q->enable_irq_poll = true; in mpi3mr_process_op_reply_q()
571 op_reply_q->ci = reply_ci; in mpi3mr_process_op_reply_q()
572 op_reply_q->ephase = exp_phase; in mpi3mr_process_op_reply_q()
574 atomic_dec(&op_reply_q->in_use); in mpi3mr_process_op_reply_q()
626 if (intr_info->op_reply_q) in mpi3mr_isr_primary()
628 intr_info->op_reply_q); in mpi3mr_isr_primary()
653 if (!intr_info->op_reply_q) in mpi3mr_isr()
656 if (!intr_info->op_reply_q->enable_irq_poll || in mpi3mr_isr()
657 !atomic_read(&intr_info->op_reply_q->pend_ios)) in mpi3mr_isr()
682 if (!intr_info || !intr_info->op_reply_q) in mpi3mr_isr_poll()
695 if (intr_info->op_reply_q) in mpi3mr_isr_poll()
698 intr_info->op_reply_q); in mpi3mr_isr_poll()
702 } while (atomic_read(&intr_info->op_reply_q->pend_ios) && in mpi3mr_isr_poll()
705 intr_info->op_reply_q->enable_irq_poll = false; in mpi3mr_isr_poll()
730 intr_info->op_reply_q = NULL; in mpi3mr_request_irq()
1681 struct op_reply_qinfo *op_reply_q = mrioc->op_reply_qinfo + qidx; in mpi3mr_delete_op_reply_q() local
1685 reply_qid = op_reply_q->qid; in mpi3mr_delete_op_reply_q()
1695 (op_reply_q->qtype == MPI3MR_DEFAULT_QUEUE) ? mrioc->default_qcount-- : in mpi3mr_delete_op_reply_q()
1738 mrioc->intr_info[midx].op_reply_q = NULL; in mpi3mr_delete_op_reply_q()
1761 struct op_reply_qinfo *op_reply_q = mrioc->op_reply_qinfo + qidx; in mpi3mr_alloc_op_reply_q_segments() local
1767 op_reply_q->segment_qd = in mpi3mr_alloc_op_reply_q_segments()
1772 op_reply_q->q_segment_list = dma_alloc_coherent(&mrioc->pdev->dev, in mpi3mr_alloc_op_reply_q_segments()
1773 MPI3MR_MAX_SEG_LIST_SIZE, &op_reply_q->q_segment_list_dma, in mpi3mr_alloc_op_reply_q_segments()
1775 if (!op_reply_q->q_segment_list) in mpi3mr_alloc_op_reply_q_segments()
1777 q_segment_list_entry = (u64 *)op_reply_q->q_segment_list; in mpi3mr_alloc_op_reply_q_segments()
1779 op_reply_q->segment_qd = op_reply_q->num_replies; in mpi3mr_alloc_op_reply_q_segments()
1780 size = op_reply_q->num_replies * mrioc->op_reply_desc_sz; in mpi3mr_alloc_op_reply_q_segments()
1783 op_reply_q->num_segments = DIV_ROUND_UP(op_reply_q->num_replies, in mpi3mr_alloc_op_reply_q_segments()
1784 op_reply_q->segment_qd); in mpi3mr_alloc_op_reply_q_segments()
1786 op_reply_q->q_segments = kcalloc(op_reply_q->num_segments, in mpi3mr_alloc_op_reply_q_segments()
1788 if (!op_reply_q->q_segments) in mpi3mr_alloc_op_reply_q_segments()
1791 segments = op_reply_q->q_segments; in mpi3mr_alloc_op_reply_q_segments()
1792 for (i = 0; i < op_reply_q->num_segments; i++) { in mpi3mr_alloc_op_reply_q_segments()
1877 struct op_reply_qinfo *op_reply_q = mrioc->op_reply_qinfo + qidx; in mpi3mr_create_op_reply_q() local
1881 reply_qid = op_reply_q->qid; in mpi3mr_create_op_reply_q()
1894 op_reply_q->num_replies = MPI3MR_OP_REP_Q_QD; in mpi3mr_create_op_reply_q()
1896 op_reply_q->num_replies = MPI3MR_OP_REP_Q_QD4K; in mpi3mr_create_op_reply_q()
1897 op_reply_q->ci = 0; in mpi3mr_create_op_reply_q()
1898 op_reply_q->ephase = 1; in mpi3mr_create_op_reply_q()
1899 atomic_set(&op_reply_q->pend_ios, 0); in mpi3mr_create_op_reply_q()
1900 atomic_set(&op_reply_q->in_use, 0); in mpi3mr_create_op_reply_q()
1901 op_reply_q->enable_irq_poll = false; in mpi3mr_create_op_reply_q()
1903 if (!op_reply_q->q_segments) { in mpi3mr_create_op_reply_q()
1926 op_reply_q->qtype = MPI3MR_DEFAULT_QUEUE; in mpi3mr_create_op_reply_q()
1928 op_reply_q->qtype = MPI3MR_POLL_QUEUE; in mpi3mr_create_op_reply_q()
1930 if (op_reply_q->qtype == MPI3MR_DEFAULT_QUEUE) { in mpi3mr_create_op_reply_q()
1948 op_reply_q->q_segment_list_dma); in mpi3mr_create_op_reply_q()
1951 op_reply_q->q_segments[0].segment_dma); in mpi3mr_create_op_reply_q()
1953 create_req.size = cpu_to_le16(op_reply_q->num_replies); in mpi3mr_create_op_reply_q()
1980 op_reply_q->qid = reply_qid; in mpi3mr_create_op_reply_q()
1982 mrioc->intr_info[midx].op_reply_q = op_reply_q; in mpi3mr_create_op_reply_q()
1984 (op_reply_q->qtype == MPI3MR_DEFAULT_QUEUE) ? mrioc->default_qcount++ : in mpi3mr_create_op_reply_q()
2218 mpi3mr_process_op_reply_q(mrioc, mrioc->intr_info[midx].op_reply_q); in mpi3mr_op_request_post()
4158 struct op_reply_qinfo *op_reply_q = mrioc->op_reply_qinfo + qidx; in mpi3mr_memset_op_reply_q_buffers() local
4162 if (!op_reply_q->q_segments) in mpi3mr_memset_op_reply_q_buffers()
4165 size = op_reply_q->segment_qd * mrioc->op_reply_desc_sz; in mpi3mr_memset_op_reply_q_buffers()
4166 segments = op_reply_q->q_segments; in mpi3mr_memset_op_reply_q_buffers()
4167 for (i = 0; i < op_reply_q->num_segments; i++) in mpi3mr_memset_op_reply_q_buffers()
4335 intr_info->op_reply_q = NULL; in mpi3mr_free_mem()