/Linux-v6.6/drivers/net/ethernet/marvell/octeontx2/af/ |
D | cgx.c | 62 static int cgx_fwi_link_change(struct cgx *cgx, int lmac_id, bool en); 76 struct cgx *cgx = cgxd; in is_dev_rpm() local 78 return (cgx->pdev->device == PCI_DEVID_CN10K_RPM) || in is_dev_rpm() 79 (cgx->pdev->device == PCI_DEVID_CN10KB_RPM); in is_dev_rpm() 82 bool is_lmac_valid(struct cgx *cgx, int lmac_id) in is_lmac_valid() argument 84 if (!cgx || lmac_id < 0 || lmac_id >= cgx->max_lmac_per_mac) in is_lmac_valid() 86 return test_bit(lmac_id, &cgx->lmac_bmap); in is_lmac_valid() 92 static int get_sequence_id_of_lmac(struct cgx *cgx, int lmac_id) in get_sequence_id_of_lmac() argument 96 for_each_set_bit(tmp, &cgx->lmac_bmap, cgx->max_lmac_per_mac) { in get_sequence_id_of_lmac() 110 return ((struct cgx *)cgxd)->mac_ops; in get_mac_ops() [all …]
|
D | lmac_common.h | 44 struct cgx *cgx; member 88 int (*get_nr_lmacs)(void *cgx); 89 u8 (*get_lmac_type)(void *cgx, int lmac_id); 90 u32 (*lmac_fifo_len)(void *cgx, int lmac_id); 91 int (*mac_lmac_intl_lbk)(void *cgx, int lmac_id, 94 int (*mac_get_rx_stats)(void *cgx, int lmac_id, 96 int (*mac_get_tx_stats)(void *cgx, int lmac_id, 137 struct cgx { struct 158 typedef struct cgx rpm_t; argument 161 void cgx_write(struct cgx *cgx, u64 lmac, u64 offset, u64 val); [all …]
|
D | rvu_cgx.c | 128 int cgx, lmac, iter; in rvu_map_cgx_lmac_pf() local 158 for (cgx = 0; cgx < cgx_cnt_max; cgx++) { in rvu_map_cgx_lmac_pf() 159 if (!rvu_cgx_pdata(cgx, rvu)) in rvu_map_cgx_lmac_pf() 161 lmac_bmap = cgx_get_lmac_bmap(rvu_cgx_pdata(cgx, rvu)); in rvu_map_cgx_lmac_pf() 163 lmac = cgx_get_lmacid(rvu_cgx_pdata(cgx, rvu), in rvu_map_cgx_lmac_pf() 165 rvu->pf2cgxlmac_map[pf] = cgxlmac_id_to_bmap(cgx, lmac); in rvu_map_cgx_lmac_pf() 166 rvu->cgxlmac2pf_map[CGX_OFFSET(cgx) + lmac] = 1 << pf; in rvu_map_cgx_lmac_pf() 169 rvu_map_cgx_nix_block(rvu, pf, cgx, lmac); in rvu_map_cgx_lmac_pf() 302 int cgx, lmac, err; in cgx_lmac_event_handler_init() local 317 for (cgx = 0; cgx <= rvu->cgx_cnt_max; cgx++) { in cgx_lmac_event_handler_init() [all …]
|
D | rvu_cn10k.c | 297 hw->cgx = (nix_const >> 12) & 0xFULL; in rvu_set_channels_base() 299 hw->cgx_links = hw->cgx * hw->lmac_per_cgx; in rvu_set_channels_base() 523 int cgx, lmac; in rvu_rpm_set_channels() local 525 for (cgx = 0; cgx < rvu->cgx_cnt_max; cgx++) { in rvu_rpm_set_channels() 527 __rvu_rpm_set_channels(cgx, lmac, base); in rvu_rpm_set_channels()
|
D | Makefile | 11 rvu_af-y := cgx.o rvu.o rvu_cgx.o rvu_npa.o rvu_nix.o \
|
D | rvu_debugfs.c | 844 char cgx[10], lmac[10]; in rvu_dbg_rvu_pf_cgx_map_display() local 865 cgx[0] = 0; in rvu_dbg_rvu_pf_cgx_map_display() 877 sprintf(cgx, "%s%d", mac_ops->name, cgx_id); in rvu_dbg_rvu_pf_cgx_map_display() 880 dev_name(&pdev->dev), pcifunc, blkid, cgx, lmac); in rvu_dbg_rvu_pf_cgx_map_display() 2599 void *cgx; in rvu_dbg_cgx_init() local 2612 cgx = rvu_cgx_pdata(i, rvu); in rvu_dbg_cgx_init() 2613 if (!cgx) in rvu_dbg_cgx_init() 2615 lmac_bmap = cgx_get_lmac_bmap(cgx); in rvu_dbg_cgx_init() 2618 rvu->rvu_dbg.cgx = debugfs_create_dir(dname, in rvu_dbg_cgx_init() 2625 debugfs_create_dir(dname, rvu->rvu_dbg.cgx); in rvu_dbg_cgx_init() [all …]
|
D | mcs_rvu_if.c | 853 int cgx, lmac, port; in rvu_mcs_set_lmac_bmap() local 856 cgx = port / rvu->hw->lmac_per_cgx; in rvu_mcs_set_lmac_bmap() 858 if (!is_lmac_valid(rvu_cgx_pdata(cgx, rvu), lmac)) in rvu_mcs_set_lmac_bmap()
|
D | rvu.h | 64 struct dentry *cgx; member 377 u8 cgx; member 911 u32 rvu_cgx_get_lmac_fifolen(struct rvu *rvu, int cgx, int lmac);
|
D | rvu_nix.c | 4227 u8 cgx = 0, lmac = 0; in rvu_mbox_handler_nix_set_hw_frs() local 4279 rvu_get_cgx_lmac_id(rvu->pf2cgxlmac_map[pf], &cgx, &lmac); in rvu_mbox_handler_nix_set_hw_frs() 4280 link = (cgx * hw->lmac_per_cgx) + lmac; in rvu_mbox_handler_nix_set_hw_frs() 4304 lmac_fifo_len = rvu_cgx_get_lmac_fifolen(rvu, cgx, lmac); in rvu_mbox_handler_nix_set_hw_frs() 4308 __func__, cgx, lmac); in rvu_mbox_handler_nix_set_hw_frs() 4361 int cgx, lmac_cnt, slink, link; in nix_link_config() local 4395 for (cgx = 0; cgx < hw->cgx; cgx++) { in nix_link_config() 4396 lmac_cnt = cgx_get_lmac_cnt(rvu_cgx_pdata(cgx, rvu)); in nix_link_config() 4400 slink = cgx * hw->lmac_per_cgx; in nix_link_config() 4403 lmac_bmap = cgx_get_lmac_bmap(rvu_cgx_pdata(cgx, rvu)); in nix_link_config() [all …]
|