Lines Matching refs:nix_af

33 int npa_attach_aura(struct nix_af *nix_af, int lf,  in npa_attach_aura()  argument
36 struct npa_af *npa = nix_af->npa_af; in npa_attach_aura()
44 debug("%s(%p, %d, %p, %u)\n", __func__, nix_af, lf, desc, aura_id); in npa_attach_aura()
78 int npa_attach_pool(struct nix_af *nix_af, int lf, in npa_attach_pool() argument
84 struct npa_af *npa = nix_af->npa_af; in npa_attach_pool()
89 debug("%s(%p, %d, %p, %u)\n", __func__, nix_af, lf, desc, pool_id); in npa_attach_pool()
157 int npa_lf_admin_shutdown(struct nix_af *nix_af, int lf, u32 pool_count) in npa_lf_admin_shutdown() argument
175 struct npa_af *npa = nix_af->npa_af; in npa_lf_admin_shutdown()
359 struct nix_af *nix_af = nix->nix_af; in nix_af_setup_sq() local
362 tl1_sched.u = nix_af_reg_read(nix_af, in nix_af_setup_sq()
365 nix_af_reg_write(nix_af, NIXX_AF_TL1X_SCHEDULE(tl1_index), in nix_af_setup_sq()
368 tl2_parent.u = nix_af_reg_read(nix_af, in nix_af_setup_sq()
371 nix_af_reg_write(nix_af, NIXX_AF_TL2X_PARENT(tl2_index), in nix_af_setup_sq()
374 tl3_parent.u = nix_af_reg_read(nix_af, in nix_af_setup_sq()
377 nix_af_reg_write(nix_af, NIXX_AF_TL3X_PARENT(tl3_index), in nix_af_setup_sq()
379 tl3_tl2_cfg.u = nix_af_reg_read(nix_af, in nix_af_setup_sq()
382 nix_af_reg_write(nix_af, NIXX_AF_TL3_TL2X_CFG(tl3_index), in nix_af_setup_sq()
387 tl3_tl2_link_cfg.u = nix_af_reg_read(nix_af, offset); in nix_af_setup_sq()
393 nix_af_reg_write(nix_af, offset, tl3_tl2_link_cfg.u); in nix_af_setup_sq()
395 tl4_parent.u = nix_af_reg_read(nix_af, in nix_af_setup_sq()
398 nix_af_reg_write(nix_af, NIXX_AF_TL4X_PARENT(tl4_index), in nix_af_setup_sq()
402 tl4_sdp_link_cfg.u = nix_af_reg_read(nix_af, offset); in nix_af_setup_sq()
407 nix_af_reg_write(nix_af, offset, tl4_sdp_link_cfg.u); in nix_af_setup_sq()
409 smq_cfg.u = nix_af_reg_read(nix_af, NIXX_AF_SMQX_CFG(smq_index)); in nix_af_setup_sq()
415 nix_af_reg_write(nix_af, NIXX_AF_SMQX_CFG(smq_index), smq_cfg.u); in nix_af_setup_sq()
417 mdq_sched.u = nix_af_reg_read(nix_af, in nix_af_setup_sq()
421 nix_af_reg_write(nix_af, offset, mdq_sched.u); in nix_af_setup_sq()
422 mdq_parent.u = nix_af_reg_read(nix_af, in nix_af_setup_sq()
425 nix_af_reg_write(nix_af, NIXX_AF_MDQX_PARENT(smq_index), in nix_af_setup_sq()
431 nix_af_reg_write(nix->nix_af, in nix_af_setup_sq()
450 static int nix_aq_issue_command(struct nix_af *nix_af, in nix_aq_issue_command() argument
461 debug("%s(%p, 0x%x, 0x%x, 0x%x, 0x%x, %p)\n", __func__, nix_af, lf, in nix_aq_issue_command()
463 aq_status.u = nix_af_reg_read(nix_af, NIXX_AF_AQ_STATUS()); in nix_aq_issue_command()
464 aq_inst = (union nix_aq_inst_s *)(nix_af->aq.inst.base) + in nix_aq_issue_command()
479 nix_af_reg_write(nix_af, NIXX_AF_AQ_DOOR(), 1); in nix_aq_issue_command()
496 static int nix_attach_receive_queue(struct nix_af *nix_af, int lf) in nix_attach_receive_queue() argument
501 debug("%s(%p, %d)\n", __func__, nix_af, lf); in nix_attach_receive_queue()
539 err = nix_aq_issue_command(nix_af, lf, in nix_attach_receive_queue()
553 struct nix_af *nix_af = nix->nix_af; in nix_attach_send_queue() local
557 debug("%s(%p)\n", __func__, nix_af); in nix_attach_send_queue()
577 err = nix_aq_issue_command(nix_af, nix->lf, in nix_attach_send_queue()
591 struct nix_af *nix_af = nix->nix_af; in nix_attach_completion_queue() local
595 debug("%s(%p)\n", __func__, nix_af); in nix_attach_completion_queue()
610 err = nix_aq_issue_command(nix_af, nix->lf, in nix_attach_completion_queue()
637 struct nix_af *nix_af = nix->nix_af; in nix_lf_admin_setup() local
644 nix_af_reg_write(nix_af, NIXX_AF_LF_RST(), lf_rst.u); in nix_lf_admin_setup()
647 lf_rst.u = nix_af_reg_read(nix_af, NIXX_AF_LF_RST()); in nix_lf_admin_setup()
652 nix_af_reg_write(nix_af, NIXX_AF_LFX_RQS_BASE(nix->lf), in nix_lf_admin_setup()
655 rqs_cfg.u = nix_af_reg_read(nix_af, NIXX_AF_LFX_RQS_CFG(nix->lf)); in nix_lf_admin_setup()
658 nix_af_reg_write(nix_af, NIXX_AF_LFX_RQS_CFG(nix->lf), rqs_cfg.u); in nix_lf_admin_setup()
661 nix_af_reg_write(nix_af, NIXX_AF_LFX_SQS_BASE(nix->lf), in nix_lf_admin_setup()
663 sqs_cfg.u = nix_af_reg_read(nix_af, NIXX_AF_LFX_SQS_CFG(nix->lf)); in nix_lf_admin_setup()
666 nix_af_reg_write(nix_af, NIXX_AF_LFX_SQS_CFG(nix->lf), sqs_cfg.u); in nix_lf_admin_setup()
669 nix_af_reg_write(nix_af, NIXX_AF_LFX_CQS_BASE(nix->lf), in nix_lf_admin_setup()
671 cqs_cfg.u = nix_af_reg_read(nix_af, NIXX_AF_LFX_CQS_CFG(nix->lf)); in nix_lf_admin_setup()
674 nix_af_reg_write(nix_af, NIXX_AF_LFX_CQS_CFG(nix->lf), cqs_cfg.u); in nix_lf_admin_setup()
677 nix_af_reg_write(nix_af, NIXX_AF_LFX_RSS_BASE(nix->lf), in nix_lf_admin_setup()
679 rss_cfg.u = nix_af_reg_read(nix_af, NIXX_AF_LFX_RSS_CFG(nix->lf)); in nix_lf_admin_setup()
682 nix_af_reg_write(nix_af, NIXX_AF_LFX_RSS_CFG(nix->lf), rss_cfg.u); in nix_lf_admin_setup()
688 nix_af_reg_write(nix_af, in nix_lf_admin_setup()
694 nix_af_reg_write(nix_af, NIXX_AF_LFX_CINTS_BASE(nix->lf), in nix_lf_admin_setup()
696 cints_cfg.u = nix_af_reg_read(nix_af, in nix_lf_admin_setup()
699 nix_af_reg_write(nix_af, NIXX_AF_LFX_CINTS_CFG(nix->lf), in nix_lf_admin_setup()
703 nix_af_reg_write(nix_af, NIXX_AF_LFX_QINTS_BASE(nix->lf), in nix_lf_admin_setup()
705 qints_cfg.u = nix_af_reg_read(nix_af, in nix_lf_admin_setup()
708 nix_af_reg_write(nix_af, NIXX_AF_LFX_QINTS_CFG(nix->lf), in nix_lf_admin_setup()
711 debug("%s(%p, %d, %d)\n", __func__, nix_af, nix->lf, nix->pf); in nix_lf_admin_setup()
714 tx_cfg2.u = nix_af_reg_read(nix_af, NIXX_AF_LFX_TX_CFG2(nix->lf)); in nix_lf_admin_setup()
716 nix_af_reg_write(nix_af, NIXX_AF_LFX_TX_CFG2(nix->lf), tx_cfg2.u); in nix_lf_admin_setup()
719 lfx_cfg.u = nix_af_reg_read(nix_af, NIXX_AF_LFX_CFG(nix->lf)); in nix_lf_admin_setup()
722 nix_af_reg_write(nix_af, NIXX_AF_LFX_CFG(nix->lf), lfx_cfg.u); in nix_lf_admin_setup()
724 nix_af_reg_write(nix_af, NIXX_AF_LFX_RX_CFG(nix->lf), 0); in nix_lf_admin_setup()
736 err = nix_attach_receive_queue(nix_af, nix->lf); in nix_lf_admin_setup()
756 int nix_lf_admin_shutdown(struct nix_af *nix_af, int lf, in nix_lf_admin_shutdown() argument
766 nix_af_reg_write(nix_af, NIXX_AF_RX_SW_SYNC(), sw_sync.u); in nix_lf_admin_shutdown()
769 sw_sync.u = nix_af_reg_read(nix_af, NIXX_AF_RX_SW_SYNC()); in nix_lf_admin_shutdown()
779 err = nix_aq_issue_command(nix_af, lf, in nix_lf_admin_shutdown()
797 err = nix_aq_issue_command(nix_af, lf, in nix_lf_admin_shutdown()
815 err = nix_aq_issue_command(nix_af, lf, in nix_lf_admin_shutdown()
831 nix_af_reg_write(nix_af, NIXX_AF_LF_RST(), lf_rst.u); in nix_lf_admin_shutdown()
834 lf_rst.u = nix_af_reg_read(nix_af, NIXX_AF_LF_RST()); in nix_lf_admin_shutdown()
856 struct nix_af *nix_af = nix->nix_af; in npc_lf_admin_setup() local
862 debug("%s(%p, pkind 0x%x)\n", __func__, nix_af, pkind); in npc_lf_admin_setup()
863 af_const.u = npc_af_reg_read(nix_af, NPC_AF_CONST()); in npc_lf_admin_setup()
868 npc_af_reg_write(nix_af, NPC_AF_PKINDX_ACTION0(pkind), action0.u); in npc_lf_admin_setup()
871 npc_af_reg_write(nix_af, NPC_AF_PKINDX_ACTION1(pkind), action1.u); in npc_lf_admin_setup()
876 npc_af_reg_write(nix_af, in npc_lf_admin_setup()
883 npc_af_reg_write(nix_af, in npc_lf_admin_setup()
889 npc_af_reg_write(nix_af, in npc_lf_admin_setup()
895 npc_af_reg_write(nix_af, in npc_lf_admin_setup()
902 npc_af_reg_write(nix_af, in npc_lf_admin_setup()
908 npc_af_reg_write(nix_af, in npc_lf_admin_setup()
912 npc_af_reg_write(nix_af, NPC_AF_MCAMEX_BANKX_CAMX_W1(pkind, 0, 0), in npc_lf_admin_setup()
915 npc_af_reg_write(nix_af, NPC_AF_MCAMEX_BANKX_CAMX_W1(pkind, 0, 1), in npc_lf_admin_setup()
922 npc_af_reg_write(nix_af, in npc_lf_admin_setup()
929 npc_af_reg_write(nix_af, offset, intfx_stat_act.u); in npc_lf_admin_setup()
933 npc_af_reg_write(nix_af, NPC_AF_MCAMEX_BANKX_ACTION(pkind, 0), in npc_lf_admin_setup()
937 npc_af_reg_write(nix_af, NPC_AF_KPUX_CFG(index), 0); in npc_lf_admin_setup()
942 npc_af_reg_write(nix_af, in npc_lf_admin_setup()
947 npc_af_reg_write(nix_af, NPC_AF_MCAMEX_BANKX_CFG(pkind, 0), in npc_lf_admin_setup()
952 npc_af_reg_write(nix_af, in npc_lf_admin_setup()
958 npc_af_reg_write(nix_af, NPC_AF_DBG_CTL(), 0x4); in npc_lf_admin_setup()
964 int npc_af_shutdown(struct nix_af *nix_af) in npc_af_shutdown() argument
970 npc_af_reg_write(nix_af, NPC_AF_BLK_RST(), blk_rst.u); in npc_af_shutdown()
974 blk_rst.u = npc_af_reg_read(nix_af, NPC_AF_BLK_RST()); in npc_af_shutdown()
983 int nix_af_setup(struct nix_af *nix_af) in nix_af_setup() argument
995 debug("%s(%p)\n", __func__, nix_af); in nix_af_setup()
996 err = rvu_aq_alloc(&nix_af->aq, Q_COUNT(AQ_SIZE), in nix_af_setup()
1006 nix_af_reg_write(nix_af, NIXX_AF_BLK_RST(), blk_rst.u); in nix_af_setup()
1010 blk_rst.u = nix_af_reg_read(nix_af, NIXX_AF_BLK_RST()); in nix_af_setup()
1015 af_cfg.u = nix_af_reg_read(nix_af, NIXX_AF_CFG()); in nix_af_setup()
1024 nix_af_reg_write(nix_af, NIXX_AF_CFG(), af_cfg.u); in nix_af_setup()
1027 af_cfg.u = nix_af_reg_read(nix_af, NIXX_AF_CFG()); in nix_af_setup()
1029 nix_af_reg_write(nix_af, NIXX_AF_CFG(), af_cfg.u); in nix_af_setup()
1033 af_status.u = nix_af_reg_read(nix_af, NIXX_AF_STATUS()); in nix_af_setup()
1037 af_cfg.u = nix_af_reg_read(nix_af, NIXX_AF_CFG()); in nix_af_setup()
1039 nix_af_reg_write(nix_af, NIXX_AF_CFG(), af_cfg.u); in nix_af_setup()
1042 ndc_cfg.u = nix_af_reg_read(nix_af, NIXX_AF_NDC_CFG()); in nix_af_setup()
1057 nix_af_reg_write(nix_af, NIXX_AF_NDC_CFG(), ndc_cfg.u); in nix_af_setup()
1062 nix_af_reg_write(nix_af, NIXX_AF_AQ_CFG(), aq_cfg.u); in nix_af_setup()
1065 nix_af_reg_write(nix_af, NIXX_AF_AQ_BASE(), nix_af->aq.inst.iova); in nix_af_setup()
1067 af_const3.u = nix_af_reg_read(nix_af, NIXX_AF_CONST3()); in nix_af_setup()
1068 af_const2.u = nix_af_reg_read(nix_af, NIXX_AF_CONST2()); in nix_af_setup()
1069 sq_const.u = nix_af_reg_read(nix_af, NIXX_AF_SQ_CONST()); in nix_af_setup()
1070 nix_af->rq_ctx_sz = 1ULL << af_const3.s.rq_ctx_log2bytes; in nix_af_setup()
1071 nix_af->sq_ctx_sz = 1ULL << af_const3.s.sq_ctx_log2bytes; in nix_af_setup()
1072 nix_af->cq_ctx_sz = 1ULL << af_const3.s.cq_ctx_log2bytes; in nix_af_setup()
1073 nix_af->rsse_ctx_sz = 1ULL << af_const3.s.rsse_log2bytes; in nix_af_setup()
1074 nix_af->qints = af_const2.s.qints; in nix_af_setup()
1075 nix_af->cints = af_const2.s.cints; in nix_af_setup()
1076 nix_af->cint_ctx_sz = 1ULL << af_const3.s.cint_log2bytes; in nix_af_setup()
1077 nix_af->qint_ctx_sz = 1ULL << af_const3.s.qint_log2bytes; in nix_af_setup()
1078 nix_af->sqb_size = sq_const.s.sqb_size; in nix_af_setup()
1083 int nix_af_shutdown(struct nix_af *nix_af) in nix_af_shutdown() argument
1089 nix_af_reg_write(nix_af, NIXX_AF_BLK_RST(), blk_rst.u); in nix_af_shutdown()
1093 blk_rst.u = nix_af_reg_read(nix_af, NIXX_AF_BLK_RST()); in nix_af_shutdown()
1097 rvu_aq_free(&nix_af->aq); in nix_af_shutdown()