drivers/net/ethernet/cavium/thunder/thunder_bgx.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/cavium/thunder/thunder_bgx.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/cavium/thunder/thunder_bgx.c- Extension
.c- Size
- 45436 bytes
- Lines
- 1737
- 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.
- 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/phy.hlinux/of.hlinux/of_mdio.hlinux/of_net.hnic_reg.hnic.hthunder_bgx.h
Detected Declarations
struct dmac_mapstruct lmacstruct bgxenum MCAST_MODEfunction bgx_reg_readfunction bgx_reg_writefunction bgx_reg_modifyfunction bgx_poll_regfunction set_max_bgx_per_nodefunction bgx_get_mapfunction bgx_get_lmac_countfunction bgx_get_lmac_link_statefunction bgx_set_lmac_macfunction bgx_flush_dmac_cam_filterfunction bgx_lmac_remove_filtersfunction bgx_lmac_save_filterfunction bgx_set_dmac_cam_filter_macfunction bgx_set_dmac_cam_filterfunction bgx_set_xcast_modefunction bgx_reset_xcast_modefunction bgx_lmac_rx_tx_enablefunction bgx_config_timestampingfunction bgx_lmac_get_pfcfunction bgx_lmac_set_pfcfunction bgx_sgmii_change_link_statefunction bgx_lmac_handlerfunction bgx_get_rx_statsfunction bgx_get_tx_statsfunction bgx_lmac_internal_loopbackfunction bgx_lmac_sgmii_initfunction bgx_lmac_xaui_initfunction bgx_xaui_check_linkfunction bgx_poll_for_sgmii_linkfunction bgx_poll_for_linkfunction phy_interface_modefunction bgx_lmac_enablefunction bgx_lmac_disablefunction bgx_init_hwfunction bgx_get_lane2sds_cfgfunction bgx_print_qlm_modefunction lmac_set_lane2sdsfunction lmac_set_trainingfunction bgx_set_lmac_configfunction bgx_get_qlm_modefunction acpi_get_mac_addressfunction bgx_acpi_register_phyfunction bgx_acpi_match_idfunction bgx_init_acpi_phy
Annotated Snippet
static struct pci_driver bgx_driver = {
.name = DRV_NAME,
.id_table = bgx_id_table,
.probe = bgx_probe,
.remove = bgx_remove,
};
static int __init bgx_init_module(void)
{
pr_info("%s, ver %s\n", DRV_NAME, DRV_VERSION);
return pci_register_driver(&bgx_driver);
}
static void __exit bgx_cleanup_module(void)
{
pci_unregister_driver(&bgx_driver);
}
module_init(bgx_init_module);
module_exit(bgx_cleanup_module);
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/module.h`, `linux/interrupt.h`, `linux/pci.h`, `linux/netdevice.h`, `linux/etherdevice.h`, `linux/phy.h`, `linux/of.h`.
- Detected declarations: `struct dmac_map`, `struct lmac`, `struct bgx`, `enum MCAST_MODE`, `function bgx_reg_read`, `function bgx_reg_write`, `function bgx_reg_modify`, `function bgx_poll_reg`, `function set_max_bgx_per_node`, `function bgx_get_map`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: pattern implementation candidate.
- 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.