• Home
  • Raw
  • Download

Lines Matching refs:qidx

31 static int nicvf_poll_reg(struct nicvf *nic, int qidx,  in nicvf_poll_reg()  argument
42 reg_val = nicvf_queue_reg_read(nic, reg, qidx); in nicvf_poll_reg()
392 struct queue_set *qs, int qidx) in nicvf_reclaim_snd_queue() argument
395 nicvf_queue_reg_write(nic, NIC_QSET_SQ_0_7_CFG, qidx, 0); in nicvf_reclaim_snd_queue()
397 if (nicvf_poll_reg(nic, qidx, NIC_QSET_SQ_0_7_STATUS, 21, 1, 0x01)) in nicvf_reclaim_snd_queue()
400 nicvf_queue_reg_write(nic, NIC_QSET_SQ_0_7_CFG, qidx, NICVF_SQ_RESET); in nicvf_reclaim_snd_queue()
404 struct queue_set *qs, int qidx) in nicvf_reclaim_rcv_queue() argument
414 struct queue_set *qs, int qidx) in nicvf_reclaim_cmp_queue() argument
417 nicvf_queue_reg_write(nic, NIC_QSET_CQ_0_7_CFG2, qidx, 0); in nicvf_reclaim_cmp_queue()
419 nicvf_queue_reg_write(nic, NIC_QSET_CQ_0_7_CFG, qidx, 0); in nicvf_reclaim_cmp_queue()
421 nicvf_queue_reg_write(nic, NIC_QSET_CQ_0_7_CFG, qidx, NICVF_CQ_RESET); in nicvf_reclaim_cmp_queue()
425 struct rbdr *rbdr, int qidx) in nicvf_reclaim_rbdr() argument
433 qidx) >> 3; in nicvf_reclaim_rbdr()
436 qidx) >> 3; in nicvf_reclaim_rbdr()
441 fifo_state = nicvf_queue_reg_read(nic, NIC_QSET_RBDR_0_1_STATUS0, qidx); in nicvf_reclaim_rbdr()
444 qidx, NICVF_RBDR_RESET); in nicvf_reclaim_rbdr()
447 nicvf_queue_reg_write(nic, NIC_QSET_RBDR_0_1_CFG, qidx, 0); in nicvf_reclaim_rbdr()
448 if (nicvf_poll_reg(nic, qidx, NIC_QSET_RBDR_0_1_STATUS0, 62, 2, 0x00)) in nicvf_reclaim_rbdr()
453 qidx); in nicvf_reclaim_rbdr()
465 qidx, NICVF_RBDR_RESET); in nicvf_reclaim_rbdr()
467 if (nicvf_poll_reg(nic, qidx, NIC_QSET_RBDR_0_1_STATUS0, 62, 2, 0x02)) in nicvf_reclaim_rbdr()
469 nicvf_queue_reg_write(nic, NIC_QSET_RBDR_0_1_CFG, qidx, 0x00); in nicvf_reclaim_rbdr()
470 if (nicvf_poll_reg(nic, qidx, NIC_QSET_RBDR_0_1_STATUS0, 62, 2, 0x00)) in nicvf_reclaim_rbdr()
510 int qidx, bool enable) in nicvf_rcv_queue_config() argument
516 rq = &qs->rq[qidx]; in nicvf_rcv_queue_config()
520 nicvf_queue_reg_write(nic, NIC_QSET_RQ_0_7_CFG, qidx, 0); in nicvf_rcv_queue_config()
523 nicvf_reclaim_rcv_queue(nic, qs, qidx); in nicvf_rcv_queue_config()
528 rq->cq_idx = qidx; in nicvf_rcv_queue_config()
539 mbx.rq.rq_num = qidx; in nicvf_rcv_queue_config()
557 if (!nic->sqs_mode && (qidx == 0)) { in nicvf_rcv_queue_config()
568 nicvf_queue_reg_write(nic, NIC_QSET_RQ_0_7_CFG, qidx, *(u64 *)&rq_cfg); in nicvf_rcv_queue_config()
573 int qidx, bool enable) in nicvf_cmp_queue_config() argument
578 cq = &qs->cq[qidx]; in nicvf_cmp_queue_config()
582 nicvf_reclaim_cmp_queue(nic, qs, qidx); in nicvf_cmp_queue_config()
587 nicvf_queue_reg_write(nic, NIC_QSET_CQ_0_7_CFG, qidx, NICVF_CQ_RESET); in nicvf_cmp_queue_config()
595 qidx, (u64)(cq->dmem.phys_base)); in nicvf_cmp_queue_config()
604 nicvf_queue_reg_write(nic, NIC_QSET_CQ_0_7_CFG, qidx, *(u64 *)&cq_cfg); in nicvf_cmp_queue_config()
607 nicvf_queue_reg_write(nic, NIC_QSET_CQ_0_7_THRESH, qidx, cq->thresh); in nicvf_cmp_queue_config()
609 qidx, CMP_QUEUE_TIMER_THRESH); in nicvf_cmp_queue_config()
614 int qidx, bool enable) in nicvf_snd_queue_config() argument
620 sq = &qs->sq[qidx]; in nicvf_snd_queue_config()
624 nicvf_reclaim_snd_queue(nic, qs, qidx); in nicvf_snd_queue_config()
629 nicvf_queue_reg_write(nic, NIC_QSET_SQ_0_7_CFG, qidx, NICVF_SQ_RESET); in nicvf_snd_queue_config()
632 sq->cq_idx = qidx; in nicvf_snd_queue_config()
637 mbx.sq.sq_num = qidx; in nicvf_snd_queue_config()
644 qidx, (u64)(sq->dmem.phys_base)); in nicvf_snd_queue_config()
653 nicvf_queue_reg_write(nic, NIC_QSET_SQ_0_7_CFG, qidx, *(u64 *)&sq_cfg); in nicvf_snd_queue_config()
656 nicvf_queue_reg_write(nic, NIC_QSET_SQ_0_7_THRESH, qidx, sq->thresh); in nicvf_snd_queue_config()
659 if (cpu_online(qidx)) { in nicvf_snd_queue_config()
660 cpumask_set_cpu(qidx, &sq->affinity_mask); in nicvf_snd_queue_config()
662 &sq->affinity_mask, qidx); in nicvf_snd_queue_config()
668 int qidx, bool enable) in nicvf_rbdr_config() argument
673 rbdr = &qs->rbdr[qidx]; in nicvf_rbdr_config()
674 nicvf_reclaim_rbdr(nic, rbdr, qidx); in nicvf_rbdr_config()
680 qidx, (u64)(rbdr->dmem.phys_base)); in nicvf_rbdr_config()
692 qidx, *(u64 *)&rbdr_cfg); in nicvf_rbdr_config()
696 qidx, qs->rbdr_len - 1); in nicvf_rbdr_config()
700 qidx, rbdr->thresh - 1); in nicvf_rbdr_config()
738 int qidx; in nicvf_free_resources() local
742 for (qidx = 0; qidx < qs->rbdr_cnt; qidx++) in nicvf_free_resources()
743 nicvf_free_rbdr(nic, &qs->rbdr[qidx]); in nicvf_free_resources()
746 for (qidx = 0; qidx < qs->cq_cnt; qidx++) in nicvf_free_resources()
747 nicvf_free_cmp_queue(nic, &qs->cq[qidx]); in nicvf_free_resources()
750 for (qidx = 0; qidx < qs->sq_cnt; qidx++) in nicvf_free_resources()
751 nicvf_free_snd_queue(nic, &qs->sq[qidx]); in nicvf_free_resources()
756 int qidx; in nicvf_alloc_resources() local
760 for (qidx = 0; qidx < qs->rbdr_cnt; qidx++) { in nicvf_alloc_resources()
761 if (nicvf_init_rbdr(nic, &qs->rbdr[qidx], qs->rbdr_len, in nicvf_alloc_resources()
767 for (qidx = 0; qidx < qs->sq_cnt; qidx++) { in nicvf_alloc_resources()
768 if (nicvf_init_snd_queue(nic, &qs->sq[qidx], qs->sq_len)) in nicvf_alloc_resources()
773 for (qidx = 0; qidx < qs->cq_cnt; qidx++) { in nicvf_alloc_resources()
774 if (nicvf_init_cmp_queue(nic, &qs->cq[qidx], qs->cq_len)) in nicvf_alloc_resources()
814 int qidx; in nicvf_config_data_transfer() local
823 for (qidx = 0; qidx < qs->sq_cnt; qidx++) in nicvf_config_data_transfer()
824 nicvf_snd_queue_config(nic, qs, qidx, enable); in nicvf_config_data_transfer()
825 for (qidx = 0; qidx < qs->cq_cnt; qidx++) in nicvf_config_data_transfer()
826 nicvf_cmp_queue_config(nic, qs, qidx, enable); in nicvf_config_data_transfer()
827 for (qidx = 0; qidx < qs->rbdr_cnt; qidx++) in nicvf_config_data_transfer()
828 nicvf_rbdr_config(nic, qs, qidx, enable); in nicvf_config_data_transfer()
829 for (qidx = 0; qidx < qs->rq_cnt; qidx++) in nicvf_config_data_transfer()
830 nicvf_rcv_queue_config(nic, qs, qidx, enable); in nicvf_config_data_transfer()
832 for (qidx = 0; qidx < qs->rq_cnt; qidx++) in nicvf_config_data_transfer()
833 nicvf_rcv_queue_config(nic, qs, qidx, disable); in nicvf_config_data_transfer()
834 for (qidx = 0; qidx < qs->rbdr_cnt; qidx++) in nicvf_config_data_transfer()
835 nicvf_rbdr_config(nic, qs, qidx, disable); in nicvf_config_data_transfer()
836 for (qidx = 0; qidx < qs->sq_cnt; qidx++) in nicvf_config_data_transfer()
837 nicvf_snd_queue_config(nic, qs, qidx, disable); in nicvf_config_data_transfer()
838 for (qidx = 0; qidx < qs->cq_cnt; qidx++) in nicvf_config_data_transfer()
839 nicvf_cmp_queue_config(nic, qs, qidx, disable); in nicvf_config_data_transfer()
882 void nicvf_sq_enable(struct nicvf *nic, struct snd_queue *sq, int qidx) in nicvf_sq_enable() argument
886 sq_cfg = nicvf_queue_reg_read(nic, NIC_QSET_SQ_0_7_CFG, qidx); in nicvf_sq_enable()
888 nicvf_queue_reg_write(nic, NIC_QSET_SQ_0_7_CFG, qidx, sq_cfg); in nicvf_sq_enable()
890 nicvf_queue_reg_write(nic, NIC_QSET_SQ_0_7_DOOR, qidx, 0); in nicvf_sq_enable()
893 void nicvf_sq_disable(struct nicvf *nic, int qidx) in nicvf_sq_disable() argument
897 sq_cfg = nicvf_queue_reg_read(nic, NIC_QSET_SQ_0_7_CFG, qidx); in nicvf_sq_disable()
899 nicvf_queue_reg_write(nic, NIC_QSET_SQ_0_7_CFG, qidx, sq_cfg); in nicvf_sq_disable()
903 int qidx) in nicvf_sq_free_used_descs() argument
910 head = nicvf_queue_reg_read(nic, NIC_QSET_SQ_0_7_HEAD, qidx) >> 4; in nicvf_sq_free_used_descs()
911 tail = nicvf_queue_reg_read(nic, NIC_QSET_SQ_0_7_TAIL, qidx) >> 4; in nicvf_sq_free_used_descs()