drivers/net/ethernet/marvell/octeontx2/af/cgx.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/marvell/octeontx2/af/cgx.c- Extension
.c- Size
- 52172 bytes
- Lines
- 2068
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/acpi.hlinux/module.hlinux/interrupt.hlinux/pci.hlinux/netdevice.hlinux/etherdevice.hlinux/ethtool.hlinux/phy.hlinux/of.hlinux/of_mdio.hlinux/of_net.hcgx.hrvu.hlmac_common.h
Detected Declarations
function is_dev_rpmfunction is_lmac_validfunction get_sequence_id_of_lmacfunction for_each_set_bitfunction cgx_get_fifo_lenfunction cgx_writefunction cgx_readfunction cgx_get_cgxcnt_maxfunction cgx_get_lmac_cntfunction list_for_each_entryfunction cgx_lmac_writefunction cgx_lmac_readfunction cgx_get_cgxidfunction cgx_lmac_get_p2xfunction cgx_get_nix_resetbitfunction cgx_get_link_infofunction cgx_lmac_addr_setfunction cgx_read_dmac_ctrlfunction cgx_read_dmac_entryfunction cgx_lmac_addr_addfunction cgx_lmac_addr_resetfunction cgx_lmac_addr_updatefunction cgx_lmac_addr_delfunction cgx_lmac_addr_max_entries_getfunction cgx_lmac_addr_getfunction cgx_set_pkindfunction cgx_get_lmac_typefunction cgx_get_lmac_fifo_lenfunction cgx_lmac_internal_loopbackfunction cgx_lmac_promisc_configfunction cgx_lmac_get_pause_frm_statusfunction cgx_lmac_enadis_rx_pause_fwdingfunction cgx_get_rx_statsfunction cgx_get_tx_statsfunction cgx_features_getfunction cgx_stats_resetfunction cgx_set_fec_stats_countfunction cgx_get_fec_statsfunction cgx_lmac_rx_tx_enablefunction cgx_lmac_tx_enablefunction cgx_lmac_enadis_pause_frmfunction cgx_lmac_pause_frm_configfunction verify_lmac_fc_cfgfunction cgx_lmac_pfc_configfunction cgx_lmac_get_pfc_frm_cfgfunction cgx_lmac_ptp_configfunction cgx_fwi_cmd_sendfunction msecs_to_jiffies
Annotated Snippet
struct pci_driver cgx_driver = {
.name = DRV_NAME,
.id_table = cgx_id_table,
.probe = cgx_probe,
.remove = cgx_remove,
};
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/module.h`, `linux/interrupt.h`, `linux/pci.h`, `linux/netdevice.h`, `linux/etherdevice.h`, `linux/ethtool.h`, `linux/phy.h`.
- Detected declarations: `function is_dev_rpm`, `function is_lmac_valid`, `function get_sequence_id_of_lmac`, `function for_each_set_bit`, `function cgx_get_fifo_len`, `function cgx_write`, `function cgx_read`, `function cgx_get_cgxcnt_max`, `function cgx_get_lmac_cnt`, `function list_for_each_entry`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.