/* CGX & RPM has different feature set *updatethestructurefieldswithdifferentone
*/ struct mac_ops { char *name; /* Features like RXSTAT, TXSTAT, DMAC FILTER csrs differs by fixed *baroffsetforexample *CGXDMAC_CTL00x1f8 *RPMDMAC_CTL00x4ff8
*/
u64 csr_offset; /* For ATF to send events to kernel, there is no dedicated interrupt *definedhenceCGXusesOVERFLOWbitinCMR_INT.RPMblocksupports *SW_INTsothatATFtriggersthisinterruptafterprocessingof *requestedcommand
*/
u64 int_register;
u64 int_set_reg; /* lmac offset is different is RPM */
u8 lmac_offset;
u8 irq_offset;
u8 int_ena_bit;
u8 lmac_fwi; bool non_contiguous_serdes_lane; /* RPM & CGX differs in number of Receive/transmit stats */
u8 rx_stats_cnt;
u8 tx_stats_cnt; /* Unlike CN10K which shares same CSR offset with CGX *CNF10KBhasdifferentcsroffset
*/
u64 rxid_map_offset;
u8 dmac_filter_count; /* Incase of RPM get number of lmacs from RPMX_CMR_RX_LMACS[LMAC_EXIST] *numberofsetbitsinlmac_existtellsnumberoflmacs
*/ int (*get_nr_lmacs)(void *cgx);
u8 (*get_lmac_type)(void *cgx, int lmac_id);
u32 (*lmac_fifo_len)(void *cgx, int lmac_id); int (*mac_lmac_intl_lbk)(void *cgx, int lmac_id, bool enable); /* Register Stats related functions */ int (*mac_get_rx_stats)(void *cgx, int lmac_id, int idx, u64 *rx_stat); int (*mac_get_tx_stats)(void *cgx, int lmac_id, int idx, u64 *tx_stat);
int (*mac_rx_tx_enable)(void *cgxd, int lmac_id, bool enable); int (*mac_tx_enable)(void *cgxd, int lmac_id, bool enable); int (*pfc_config)(void *cgxd, int lmac_id,
u8 tx_pause, u8 rx_pause, u16 pfc_en);
int (*mac_get_pfc_frm_cfg)(void *cgxd, int lmac_id,
u8 *tx_pause, u8 *rx_pause); int (*mac_reset)(void *cgxd, int lmac_id, u8 pf_req_flr);
/* FEC stats */ int (*get_fec_stats)(void *cgxd, int lmac_id, struct cgx_fec_stats_rsp *rsp); int (*mac_stats_reset)(void *cgxd, int lmac_id); void (*mac_x2p_reset)(void *cgxd, bool enable); int (*mac_enadis_rx)(void *cgxd, int lmac_id, bool enable);
};
struct cgx { void __iomem *reg_base; struct pci_dev *pdev;
u8 cgx_id;
u8 lmac_count; /* number of LMACs per MAC could be 4 or 8 */
u8 max_lmac_per_mac; /* length of fifo varies depending on the number *ofLMACS
*/
u32 fifo_len; #define MAX_LMAC_COUNT 8 struct lmac *lmac_idmap[MAX_LMAC_COUNT]; struct work_struct cgx_cmd_work; struct workqueue_struct *cgx_cmd_workq; struct list_head cgx_list;
u64 hw_features; struct mac_ops *mac_ops; unsignedlong lmac_bmap; /* bitmap of enabled lmacs */ /* Lock to serialize read/write of global csrs like *RPMX_MTI_STAT_DATA_HI_CDCetc
*/ struct mutex lock;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.