/kernel/linux/linux-5.10/drivers/net/ethernet/marvell/octeontx2/af/ |
H A D | cgx.c | 22 #include "cgx.h" 24 #define DRV_NAME "octeontx2-cgx" 37 * @cgx: parent cgx port 49 struct cgx *cgx; member 54 struct cgx { struct 74 static int cgx_fwi_link_change(struct cgx *cgx, int lmac_id, bool en); 84 static void cgx_write(struct cgx *cg argument 89 cgx_read(struct cgx *cgx, u64 lmac, u64 offset) cgx_read() argument 94 lmac_pdata(u8 lmac_id, struct cgx *cgx) lmac_pdata() argument 119 struct cgx *cgx = cgxd; cgx_get_lmac_cnt() local 140 struct cgx *cgx = cgxd; cgx_get_cgxid() local 216 struct cgx *cgx = cgxd; cgx_set_pkind() local 225 cgx_get_lmac_type(struct cgx *cgx, int lmac_id) cgx_get_lmac_type() argument 236 struct cgx *cgx = cgxd; cgx_lmac_internal_loopback() local 264 struct cgx *cgx = cgx_get_pdata(cgx_id); cgx_lmac_promisc_config() local 298 struct cgx *cgx = cgxd; cgx_lmac_enadis_rx_pause_fwding() local 325 struct cgx *cgx = cgxd; cgx_get_rx_stats() local 335 struct cgx *cgx = cgxd; cgx_get_tx_stats() local 345 struct cgx *cgx = cgxd; cgx_lmac_rx_tx_enable() local 362 struct cgx *cgx = cgxd; cgx_lmac_tx_enable() local 383 struct cgx *cgx = cgxd; cgx_lmac_get_pause_frm() local 400 struct cgx *cgx = cgxd; cgx_lmac_set_pause_frm() local 427 cgx_lmac_pause_frm_config(struct cgx *cgx, int lmac_id, bool enable) cgx_lmac_pause_frm_config() argument 483 struct cgx *cgx = cgxd; cgx_lmac_ptp_config() local 513 struct cgx *cgx = lmac->cgx; cgx_fwi_cmd_send() local 559 cgx_fwi_cmd_generic(u64 req, u64 *resp, struct cgx *cgx, int lmac_id) cgx_fwi_cmd_generic() argument 609 link_status_user_format(u64 lstat, struct cgx_link_user_info *linfo, struct cgx *cgx, u8 lmac_id) link_status_user_format() argument 628 struct cgx *cgx = lmac->cgx; cgx_link_change_handler() local 690 struct cgx *cgx; cgx_fwi_event_handler() local 740 struct cgx *cgx = cgxd; cgx_lmac_evh_register() local 756 struct cgx *cgx = cgxd; cgx_lmac_evh_unregister() local 773 struct cgx *cgx; cgx_get_fwdata_base() local 788 cgx_fwi_link_change(struct cgx *cgx, int lmac_id, bool enable) cgx_fwi_link_change() argument 801 cgx_fwi_read_version(u64 *resp, struct cgx *cgx) cgx_fwi_read_version() argument 809 cgx_lmac_verify_fwi_version(struct cgx *cgx) cgx_lmac_verify_fwi_version() argument 835 struct cgx *cgx = container_of(work, struct cgx, cgx_cmd_work); cgx_lmac_linkup_work() local 850 struct cgx *cgx = cgxd; cgx_lmac_linkup_start() local 860 cgx_lmac_init(struct cgx *cgx) cgx_lmac_init() argument 908 cgx_lmac_exit(struct cgx *cgx) cgx_lmac_exit() argument 936 struct cgx *cgx; cgx_probe() local 1012 struct cgx *cgx = pci_get_drvdata(pdev); cgx_remove() local [all...] |
H A D | rvu_cgx.c | 16 #include "cgx.h" 57 /* Assumes only one pf mapped to a cgx lmac port */ in cgxlmac_to_pf() 95 int cgx, lmac_cnt, lmac; in rvu_map_cgx_lmac_pf() local 114 /* Initialize all entries with an invalid cgx and lmac id */ in rvu_map_cgx_lmac_pf() 125 for (cgx = 0; cgx < cgx_cnt_max; cgx++) { in rvu_map_cgx_lmac_pf() 126 if (!rvu_cgx_pdata(cgx, rvu)) in rvu_map_cgx_lmac_pf() 128 lmac_cnt = cgx_get_lmac_cnt(rvu_cgx_pdata(cgx, rvu)); in rvu_map_cgx_lmac_pf() 130 rvu->pf2cgxlmac_map[pf] = cgxlmac_id_to_bmap(cgx, lma in rvu_map_cgx_lmac_pf() 255 int cgx, lmac, err; cgx_lmac_event_handler_init() local 297 int cgx, err; rvu_cgx_init() local 352 int cgx, lmac; rvu_cgx_exit() local [all...] |
H A D | Makefile | 11 octeontx2_af-y := cgx.o rvu.o rvu_cgx.o rvu_npa.o rvu_nix.o \
|
H A D | rvu_nix.c | 18 #include "cgx.h" 345 * cgx(0)_lmac(0)_chan(0 - 15) = bpid(0 - 15) in rvu_nix_get_bpid() 346 * cgx(0)_lmac(1)_chan(0 - 15) = bpid(16 - 31) .... in rvu_nix_get_bpid() 347 * cgx(1)_lmac(0)_chan(0 - 15) = bpid(64 - 79) .... in rvu_nix_get_bpid() 354 /* Assign bpid based on cgx, lmac and chan id */ in rvu_nix_get_bpid() 1584 /* enable cgx tx if disabled */ in nix_smq_flush() 1609 /* restore cgx tx state */ in nix_smq_flush() 2823 u8 cgx = 0, lmac = 0; in rvu_mbox_handler_nix_set_hw_frs() local 2869 rvu_get_cgx_lmac_id(rvu->pf2cgxlmac_map[pf], &cgx, &lmac); in rvu_mbox_handler_nix_set_hw_frs() 2870 link = (cgx * h in rvu_mbox_handler_nix_set_hw_frs() 2996 int cgx, lmac_cnt, slink, link; nix_link_config() local [all...] |
H A D | rvu_debugfs.c | 21 #include "cgx.h" 1583 void *cgx; in rvu_dbg_cgx_init() local 1585 rvu->rvu_dbg.cgx_root = debugfs_create_dir("cgx", rvu->rvu_dbg.root); in rvu_dbg_cgx_init() 1588 cgx = rvu_cgx_pdata(i, rvu); in rvu_dbg_cgx_init() 1589 if (!cgx) in rvu_dbg_cgx_init() 1591 /* cgx debugfs dir */ in rvu_dbg_cgx_init() 1592 sprintf(dname, "cgx%d", i); in rvu_dbg_cgx_init() 1593 rvu->rvu_dbg.cgx = debugfs_create_dir(dname, in rvu_dbg_cgx_init() 1595 for (lmac_id = 0; lmac_id < cgx_get_lmac_cnt(cgx); lmac_id++) { in rvu_dbg_cgx_init() 1599 debugfs_create_dir(dname, rvu->rvu_dbg.cgx); in rvu_dbg_cgx_init() [all...] |
H A D | rvu.h | 49 struct dentry *cgx; member 186 int cgx_users; /* number of cgx users - used only by PFs */ 252 u8 cgx; member 345 * every cgx lmac port 348 void **cgx_idmap; /* cgx id to cgx data map table */ 351 spinlock_t cgx_evq_lock; /* cgx event queue lock */ 352 struct list_head cgx_evq_head; /* cgx event queue head */ 353 struct mutex cgx_cfg_lock; /* serialize cgx configuration */
|
/kernel/linux/linux-6.6/drivers/net/ethernet/marvell/octeontx2/af/ |
H A D | cgx.c | 20 #include "cgx.h" 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_i in is_lmac_valid() 92 get_sequence_id_of_lmac(struct cgx *cgx, int lmac_id) get_sequence_id_of_lmac() argument 113 cgx_write(struct cgx *cgx, u64 lmac, u64 offset, u64 val) cgx_write() argument 119 cgx_read(struct cgx *cgx, u64 lmac, u64 offset) cgx_read() argument 125 lmac_pdata(u8 lmac_id, struct cgx *cgx) lmac_pdata() argument 150 struct cgx *cgx = cgxd; cgx_get_lmac_cnt() local 192 struct cgx *cgx = cgxd; cgx_get_cgxid() local 264 struct cgx *cgx = cgxd; cgx_read_dmac_ctrl() local 279 struct cgx *cgx; cgx_read_dmac_entry() local 478 struct cgx *cgx = cgxd; cgx_set_pkind() local 489 struct cgx *cgx = cgxd; cgx_get_lmac_type() local 498 struct cgx *cgx = cgxd; cgx_get_lmac_fifo_len() local 525 struct cgx *cgx = cgxd; cgx_lmac_internal_loopback() local 554 struct cgx *cgx = cgx_get_pdata(cgx_id); cgx_lmac_promisc_config() local 607 struct cgx *cgx = cgxd; cgx_lmac_get_pause_frm_status() local 627 struct cgx *cgx = cgxd; cgx_lmac_enadis_rx_pause_fwding() local 681 struct cgx *cgx = cgxd; cgx_get_rx_stats() local 691 struct cgx *cgx = cgxd; cgx_get_tx_stats() local 736 struct cgx *cgx = cgxd; cgx_get_fec_stats() local 764 struct cgx *cgx = cgxd; cgx_lmac_rx_tx_enable() local 781 struct cgx *cgx = cgxd; cgx_lmac_tx_enable() local 802 struct cgx *cgx = cgxd; cgx_lmac_enadis_pause_frm() local 834 struct cgx *cgx = cgxd; cgx_lmac_pause_frm_config() local 887 struct cgx *cgx = cgxd; verify_lmac_fc_cfg() local 923 struct cgx *cgx = cgxd; cgx_lmac_pfc_config() local 966 struct cgx *cgx = cgxd; cgx_lmac_get_pfc_frm_cfg() local 982 struct cgx *cgx = cgxd; cgx_lmac_ptp_config() local 1012 struct cgx *cgx = lmac->cgx; cgx_fwi_cmd_send() local 1058 cgx_fwi_cmd_generic(u64 req, u64 *resp, struct cgx *cgx, int lmac_id) cgx_fwi_cmd_generic() argument 1217 link_status_user_format(u64 lstat, struct cgx_link_user_info *linfo, struct cgx *cgx, u8 lmac_id) link_status_user_format() argument 1246 struct cgx *cgx = lmac->cgx; cgx_link_change_handler() local 1313 struct cgx *cgx; cgx_fwi_event_handler() local 1366 struct cgx *cgx = cgxd; cgx_lmac_evh_register() local 1382 struct cgx *cgx = cgxd; cgx_lmac_evh_unregister() local 1399 struct cgx *cgx; cgx_get_fwdata_base() local 1419 struct cgx *cgx = cgxd; cgx_set_link_mode() local 1443 struct cgx *cgx; cgx_set_fec() local 1463 struct cgx *cgx = cgxd; cgx_get_phy_fec_stats() local 1473 cgx_fwi_link_change(struct cgx *cgx, int lmac_id, bool enable) cgx_fwi_link_change() argument 1494 cgx_fwi_read_version(u64 *resp, struct cgx *cgx) cgx_fwi_read_version() argument 1503 cgx_lmac_verify_fwi_version(struct cgx *cgx) cgx_lmac_verify_fwi_version() argument 1529 struct cgx *cgx = container_of(work, struct cgx, cgx_cmd_work); cgx_lmac_linkup_work() local 1544 struct cgx *cgx = cgxd; cgx_lmac_linkup_start() local 1556 struct cgx *cgx = cgxd; cgx_lmac_reset() local 1571 cgx_configure_interrupt(struct cgx *cgx, struct lmac *lmac, int cnt, bool req_free) cgx_configure_interrupt() argument 1600 struct cgx *cgx = cgxd; cgx_get_nr_lmacs() local 1607 struct cgx *cgx = cgxd; cgx_get_lmacid() local 1614 struct cgx *cgx = cgxd; cgx_get_lmac_bmap() local 1619 cgx_lmac_init(struct cgx *cgx) cgx_lmac_init() argument 1708 cgx_lmac_exit(struct cgx *cgx) cgx_lmac_exit() argument 1733 cgx_populate_features(struct cgx *cgx) cgx_populate_features() argument 1749 cgx_get_rxid_mapoffset(struct cgx *cgx) cgx_get_rxid_mapoffset() argument 1793 struct cgx *cgx; cgx_probe() local 1887 struct cgx *cgx = pci_get_drvdata(pdev); cgx_remove() local [all...] |
H A D | lmac_common.h | 12 #include "cgx.h" 24 * @cgx: parent cgx port 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, in 137 struct cgx { global() struct [all...] |
H A D | rvu_cgx.c | 13 #include "cgx.h" 71 /* Assumes only one pf mapped to a cgx lmac port */ in cgxlmac_to_pf() 128 int cgx, lmac, iter; in rvu_map_cgx_lmac_pf() local 146 /* Initialize all entries with an invalid cgx and lmac id */ in rvu_map_cgx_lmac_pf() 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, rv in rvu_map_cgx_lmac_pf() 308 int cgx, lmac, err; cgx_lmac_event_handler_init() local 350 int cgx, err; rvu_cgx_init() local 406 int cgx, lmac; rvu_cgx_exit() local 905 rvu_cgx_get_lmac_fifolen(struct rvu *rvu, int cgx, int lmac) rvu_cgx_get_lmac_fifolen() argument 1286 u8 cgx, lmac; rvu_mac_reset() local [all...] |
H A D | rvu_cn10k.c | 10 #include "cgx.h" 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()
|
H A D | Makefile | 11 rvu_af-y := cgx.o rvu.o rvu_cgx.o rvu_npa.o rvu_nix.o \
|
H A D | rvu_debugfs.c | 18 #include "cgx.h" 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() 2616 /* cgx debugf in rvu_dbg_cgx_init() [all...] |
H A D | mcs_rvu_if.c | 858 int cgx, lmac, port; in rvu_mcs_set_lmac_bmap() local 861 cgx = port / rvu->hw->lmac_per_cgx; in rvu_mcs_set_lmac_bmap() 863 if (!is_lmac_valid(rvu_cgx_pdata(cgx, rvu), lmac)) in rvu_mcs_set_lmac_bmap()
|
H A D | rvu.h | 64 struct dentry *cgx; member 251 int cgx_users; /* number of cgx users - used only by PFs */ 378 u8 cgx; member 512 * every cgx lmac port 515 void **cgx_idmap; /* cgx id to cgx data map table */ 518 spinlock_t cgx_evq_lock; /* cgx event queue lock */ 519 struct list_head cgx_evq_head; /* cgx event queue head */ 520 struct mutex cgx_cfg_lock; /* serialize cgx configuration */ 915 u32 rvu_cgx_get_lmac_fifolen(struct rvu *rvu, int cgx, in [all...] |
H A D | rvu_nix.c | 16 #include "cgx.h" 536 * cgx(0)_lmac(0)_chan(0 - 15) = bpid(0 - 15) in rvu_nix_get_bpid() 537 * cgx(0)_lmac(1)_chan(0 - 15) = bpid(16 - 31) .... in rvu_nix_get_bpid() 538 * cgx(1)_lmac(0)_chan(0 - 15) = bpid(64 - 79) .... in rvu_nix_get_bpid() 545 /* Assign bpid based on cgx, lmac and chan id */ in rvu_nix_get_bpid() 2263 /* enable cgx tx if disabled */ in nix_smq_flush() 2302 /* restore cgx tx state */ in nix_smq_flush() 4155 u8 cgx = 0, lmac = 0; in rvu_mbox_handler_nix_set_hw_frs() local 4189 rvu_get_cgx_lmac_id(rvu->pf2cgxlmac_map[pf], &cgx, &lmac); in rvu_mbox_handler_nix_set_hw_frs() 4190 link = (cgx * h in rvu_mbox_handler_nix_set_hw_frs() 4258 int cgx, lmac_cnt, slink, link; nix_link_config() local [all...] |