Lines Matching refs:iq_no
39 static void __check_db_timeout(struct octeon_device *oct, u64 iq_no);
43 static inline int IQ_INSTR_MODE_64B(struct octeon_device *oct, int iq_no) in IQ_INSTR_MODE_64B() argument
46 (struct octeon_instr_queue *)oct->instr_queue[iq_no]; in IQ_INSTR_MODE_64B()
50 #define IQ_INSTR_MODE_32B(oct, iq_no) (!IQ_INSTR_MODE_64B(oct, iq_no)) argument
62 u32 iq_no = (u32)txpciq.s.q_no; in octeon_init_instr_queue() local
82 iq = oct->instr_queue[iq_no]; in octeon_init_instr_queue()
89 iq_no); in octeon_init_instr_queue()
105 iq_no); in octeon_init_instr_queue()
110 iq_no, iq->base_addr, &iq->base_addr_dma, iq->max_count); in octeon_init_instr_queue()
126 if (iq_no == 0) { in octeon_init_instr_queue()
135 oct->io_qmask.iq |= BIT_ULL(iq_no); in octeon_init_instr_queue()
138 oct->io_qmask.iq64B |= ((conf->instr_type == 64) << iq_no); in octeon_init_instr_queue()
141 oct->fn_list.setup_iq_regs(oct, iq_no); in octeon_init_instr_queue()
143 oct->check_db_wq[iq_no].wq = alloc_workqueue("check_iq_db", in octeon_init_instr_queue()
146 if (!oct->check_db_wq[iq_no].wq) { in octeon_init_instr_queue()
151 iq_no); in octeon_init_instr_queue()
155 db_wq = &oct->check_db_wq[iq_no]; in octeon_init_instr_queue()
159 db_wq->wk.ctxul = iq_no; in octeon_init_instr_queue()
165 int octeon_delete_instr_queue(struct octeon_device *oct, u32 iq_no) in octeon_delete_instr_queue() argument
168 struct octeon_instr_queue *iq = oct->instr_queue[iq_no]; in octeon_delete_instr_queue()
170 cancel_delayed_work_sync(&oct->check_db_wq[iq_no].wk.work); in octeon_delete_instr_queue()
171 destroy_workqueue(oct->check_db_wq[iq_no].wq); in octeon_delete_instr_queue()
189 oct->io_qmask.iq &= ~(1ULL << iq_no); in octeon_delete_instr_queue()
190 vfree(oct->instr_queue[iq_no]); in octeon_delete_instr_queue()
191 oct->instr_queue[iq_no] = NULL; in octeon_delete_instr_queue()
206 u32 iq_no = (u32)txpciq.s.q_no; in octeon_setup_iq() local
209 if (oct->instr_queue[iq_no]) { in octeon_setup_iq()
211 iq_no); in octeon_setup_iq()
212 oct->instr_queue[iq_no]->txpciq.u64 = txpciq.u64; in octeon_setup_iq()
213 oct->instr_queue[iq_no]->app_ctx = app_ctx; in octeon_setup_iq()
216 oct->instr_queue[iq_no] = in octeon_setup_iq()
218 if (!oct->instr_queue[iq_no]) in octeon_setup_iq()
219 oct->instr_queue[iq_no] = in octeon_setup_iq()
221 if (!oct->instr_queue[iq_no]) in octeon_setup_iq()
225 oct->instr_queue[iq_no]->q_index = q_index; in octeon_setup_iq()
226 oct->instr_queue[iq_no]->app_ctx = app_ctx; in octeon_setup_iq()
227 oct->instr_queue[iq_no]->ifidx = ifidx; in octeon_setup_iq()
230 vfree(oct->instr_queue[iq_no]); in octeon_setup_iq()
231 oct->instr_queue[iq_no] = NULL; in octeon_setup_iq()
237 octeon_delete_instr_queue(oct, iq_no); in octeon_setup_iq()
284 octeon_ring_doorbell_locked(struct octeon_device *oct, u32 iq_no) in octeon_ring_doorbell_locked() argument
288 iq = oct->instr_queue[iq_no]; in octeon_ring_doorbell_locked()
497 static void __check_db_timeout(struct octeon_device *oct, u64 iq_no) in __check_db_timeout() argument
505 iq = oct->instr_queue[iq_no]; in __check_db_timeout()
531 u64 iq_no = wk->ctxul; in check_db_timeout() local
532 struct cavium_wq *db_wq = &oct->check_db_wq[iq_no]; in check_db_timeout()
535 __check_db_timeout(oct, iq_no); in check_db_timeout()
540 octeon_send_command(struct octeon_device *oct, u32 iq_no, in octeon_send_command() argument
546 struct octeon_instr_queue *iq = oct->instr_queue[iq_no]; in octeon_send_command()
559 INCR_INSTRQUEUE_PKT_COUNT(oct, iq_no, bytes_sent, datasize); in octeon_send_command()
560 INCR_INSTRQUEUE_PKT_COUNT(oct, iq_no, instr_posted, 1); in octeon_send_command()
566 INCR_INSTRQUEUE_PKT_COUNT(oct, iq_no, instr_dropped, 1); in octeon_send_command()
603 ih3->pkind = oct->instr_queue[sc->iq_no]->txpciq.s.pkind; in octeon_prepare_soft_command()
611 oct->instr_queue[sc->iq_no]->txpciq.s.use_qpg; in octeon_prepare_soft_command()
616 oct->instr_queue[sc->iq_no]->txpciq.s.ctrl_qpg; in octeon_prepare_soft_command()
695 iq = oct->instr_queue[sc->iq_no]; in octeon_send_soft_command()
698 sc->iq_no); in octeon_send_soft_command()
699 INCR_INSTRQUEUE_PKT_COUNT(oct, sc->iq_no, instr_dropped, 1); in octeon_send_soft_command()
735 return (octeon_send_command(oct, sc->iq_no, 1, &sc->cmd, sc, in octeon_send_soft_command()