drivers/net/ethernet/freescale/fman/fman_memac.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/freescale/fman/fman_memac.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/freescale/fman/fman_memac.c- Extension
.c- Size
- 37184 bytes
- Lines
- 1336
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- 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
fman_memac.hfman.hmac.hlinux/slab.hlinux/io.hlinux/pcs-lynx.hlinux/phy.hlinux/phy_fixed.hlinux/phy/phy.hlinux/of_mdio.h
Detected Declarations
struct mac_addrstruct memac_regsstruct memac_cfgstruct fman_macfunction add_addr_in_paddrfunction resetfunction set_exceptionfunction initfunction set_dfltsfunction get_mac_addr_hash_codefunction check_init_parametersfunction get_exception_flagfunction memac_err_exceptionfunction memac_exceptionfunction free_init_resourcesfunction memac_enablefunction memac_disablefunction memac_set_promiscuousfunction memac_set_tx_pause_framesfunction memac_accept_rx_pause_framesfunction memac_get_capsfunction memac_if_modefunction memac_preparefunction memac_mac_configfunction memac_link_upfunction memac_link_downfunction memac_modify_mac_addressfunction memac_add_hash_mac_addressfunction memac_set_allmultifunction memac_set_tstampfunction memac_del_hash_mac_addressfunction list_for_eachfunction memac_set_exceptionfunction memac_read64function memac_get_pause_statsfunction memac_get_rmon_statsfunction memac_get_eth_ctrl_statsfunction memac_get_eth_mac_statsfunction memac_initfunction pcs_putfunction memac_freefunction memac_supportsfunction memac_initialization
Annotated Snippet
struct mac_addr {
/* Lower 32 bits of 48-bit MAC address */
u32 mac_addr_l;
/* Upper 16 bits of 48-bit MAC address */
u32 mac_addr_u;
};
/* memory map */
struct memac_regs {
u32 res0000[2]; /* General Control and Status */
u32 command_config; /* 0x008 Ctrl and cfg */
struct mac_addr mac_addr0; /* 0x00C-0x010 MAC_ADDR_0...1 */
u32 maxfrm; /* 0x014 Max frame length */
u32 res0018[1];
u32 rx_fifo_sections; /* Receive FIFO configuration reg */
u32 tx_fifo_sections; /* Transmit FIFO configuration reg */
u32 res0024[2];
u32 hashtable_ctrl; /* 0x02C Hash table control */
u32 res0030[4];
u32 ievent; /* 0x040 Interrupt event */
u32 tx_ipg_length; /* 0x044 Transmitter inter-packet-gap */
u32 res0048;
u32 imask; /* 0x04C Interrupt mask */
u32 res0050;
u32 pause_quanta[4]; /* 0x054 Pause quanta */
u32 pause_thresh[4]; /* 0x064 Pause quanta threshold */
u32 rx_pause_status; /* 0x074 Receive pause status */
u32 res0078[2];
struct mac_addr mac_addr[MEMAC_NUM_OF_PADDRS];/* 0x80-0x0B4 mac padr */
u32 lpwake_timer; /* 0x0B8 Low Power Wakeup Timer */
u32 sleep_timer; /* 0x0BC Transmit EEE Low Power Timer */
u32 res00c0[8];
u32 statn_config; /* 0x0E0 Statistics configuration */
u32 res00e4[7];
/* Rx Statistics Counter */
u32 reoct_l;
u32 reoct_u;
u32 roct_l;
u32 roct_u;
u32 raln_l;
u32 raln_u;
u32 rxpf_l;
u32 rxpf_u;
u32 rfrm_l;
u32 rfrm_u;
u32 rfcs_l;
u32 rfcs_u;
u32 rvlan_l;
u32 rvlan_u;
u32 rerr_l;
u32 rerr_u;
u32 ruca_l;
u32 ruca_u;
u32 rmca_l;
u32 rmca_u;
u32 rbca_l;
u32 rbca_u;
u32 rdrp_l;
u32 rdrp_u;
u32 rpkt_l;
u32 rpkt_u;
u32 rund_l;
u32 rund_u;
u32 r64_l;
u32 r64_u;
u32 r127_l;
u32 r127_u;
u32 r255_l;
u32 r255_u;
u32 r511_l;
u32 r511_u;
u32 r1023_l;
u32 r1023_u;
u32 r1518_l;
u32 r1518_u;
u32 r1519x_l;
u32 r1519x_u;
u32 rovr_l;
u32 rovr_u;
u32 rjbr_l;
u32 rjbr_u;
u32 rfrg_l;
u32 rfrg_u;
u32 rcnp_l;
u32 rcnp_u;
u32 rdrntp_l;
u32 rdrntp_u;
u32 res01d0[12];
/* Tx Statistics Counter */
u32 teoct_l;
Annotation
- Immediate include surface: `fman_memac.h`, `fman.h`, `mac.h`, `linux/slab.h`, `linux/io.h`, `linux/pcs-lynx.h`, `linux/phy.h`, `linux/phy_fixed.h`.
- Detected declarations: `struct mac_addr`, `struct memac_regs`, `struct memac_cfg`, `struct fman_mac`, `function add_addr_in_paddr`, `function reset`, `function set_exception`, `function init`, `function set_dflts`, `function get_mac_addr_hash_code`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
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.