Lines Matching defs:pdata

23 static void xgene_cle_idt_to_hw(struct xgene_enet_pdata *pdata,
27 if (pdata->enet_id == XGENE_ENET1) {
38 static void xgene_cle_dbptr_to_hw(struct xgene_enet_pdata *pdata,
155 static void xgene_cle_enable_ptree(struct xgene_enet_pdata *pdata,
176 static int xgene_cle_setup_dbptr(struct xgene_enet_pdata *pdata,
186 xgene_cle_dbptr_to_hw(pdata, &ptree->dbptr[i], buf);
563 static int xgene_cle_setup_node(struct xgene_enet_pdata *pdata,
595 static int xgene_cle_setup_ptree(struct xgene_enet_pdata *pdata,
600 ret = xgene_cle_setup_node(pdata, cle);
604 ret = xgene_cle_setup_dbptr(pdata, cle);
608 xgene_cle_enable_ptree(pdata, cle);
613 static void xgene_cle_setup_def_dbptr(struct xgene_enet_pdata *pdata,
625 xgene_cle_dbptr_to_hw(pdata, dbptr, buf);
697 static int xgene_cle_set_rss_idt(struct xgene_enet_pdata *pdata)
704 idx = i % pdata->rxq_cnt;
705 pool_id = pdata->rx_ring[idx]->buf_pool->id;
707 dstqid = xgene_enet_dst_ring_num(pdata->rx_ring[idx]);
709 if (pdata->rx_ring[idx]->page_pool) {
710 pool_id = pdata->rx_ring[idx]->page_pool->id;
715 xgene_cle_idt_to_hw(pdata, dstqid, fpsel, nfpsel, &idt_reg);
716 ret = xgene_cle_dram_wr(&pdata->cle, &idt_reg, 1, i,
722 ret = xgene_cle_set_rss_skeys(&pdata->cle);
729 static int xgene_cle_setup_rss(struct xgene_enet_pdata *pdata)
731 struct xgene_enet_cle *cle = &pdata->cle;
754 ret = xgene_cle_set_rss_idt(pdata);
761 static int xgene_enet_cle_init(struct xgene_enet_pdata *pdata)
763 struct xgene_enet_cle *enet_cle = &pdata->cle;
770 if (pdata->phy_mode != PHY_INTERFACE_MODE_XGMII)
776 ret = xgene_cle_setup_rss(pdata);
778 netdev_err(pdata->ndev, "RSS initialization failed\n");
782 def_qid = xgene_enet_dst_ring_num(pdata->rx_ring[0]);
783 pool_id = pdata->rx_ring[0]->buf_pool->id;
786 if (pdata->rx_ring[0]->page_pool) {
787 pool_id = pdata->rx_ring[0]->page_pool->id;
801 xgene_cle_setup_def_dbptr(pdata, enet_cle, &dbptr[DB_RES_DEF],
817 return xgene_cle_setup_ptree(pdata, enet_cle);