drivers/net/ethernet/freescale/enetc/enetc_pf.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/freescale/enetc/enetc_pf.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/freescale/enetc/enetc_pf.h- Extension
.h- Size
- 1762 bytes
- Lines
- 69
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
enetc.hlinux/phylink.h
Detected Declarations
struct enetc_vf_statestruct enetc_port_capsstruct enetc_pfstruct enetc_pf_opsstruct enetc_pfenum enetc_vf_flags
Annotated Snippet
struct enetc_vf_state {
struct mutex lock; /* Prevent concurrent access */
enum enetc_vf_flags flags;
};
struct enetc_port_caps {
u32 half_duplex:1;
int num_vsi;
int num_msix;
int num_rx_bdr;
int num_tx_bdr;
int mac_filter_num;
};
struct enetc_pf;
struct enetc_pf_ops {
void (*set_si_primary_mac)(struct enetc_hw *hw, int si, const u8 *addr);
void (*get_si_primary_mac)(struct enetc_hw *hw, int si, u8 *addr);
struct phylink_pcs *(*create_pcs)(struct enetc_pf *pf, struct mii_bus *bus);
void (*destroy_pcs)(struct phylink_pcs *pcs);
int (*enable_psfp)(struct enetc_ndev_priv *priv);
};
struct enetc_pf {
struct enetc_si *si;
int num_vfs; /* number of active VFs, after sriov_init */
int total_vfs; /* max number of VFs, set for PF at probe */
struct enetc_vf_state *vf_state;
struct enetc_mac_filter mac_filter[MADDR_TYPE];
struct enetc_msg_swbd *rxmsg;
struct work_struct msg_task;
char msg_int_name[ENETC_INT_NAME_MAX];
char vlan_promisc_simap; /* bitmap of SIs in VLAN promisc mode */
DECLARE_BITMAP(vlan_ht_filter, ENETC_VLAN_HT_SIZE);
DECLARE_BITMAP(active_vlans, VLAN_N_VID);
struct mii_bus *mdio; /* saved for cleanup */
struct mii_bus *imdio;
struct phylink_pcs *pcs;
phy_interface_t if_mode;
struct phylink_config phylink_config;
struct enetc_port_caps caps;
const struct enetc_pf_ops *ops;
int num_mfe; /* number of mac address filter table entries */
};
#define phylink_to_enetc_pf(config) \
container_of((config), struct enetc_pf, phylink_config)
Annotation
- Immediate include surface: `enetc.h`, `linux/phylink.h`.
- Detected declarations: `struct enetc_vf_state`, `struct enetc_port_caps`, `struct enetc_pf`, `struct enetc_pf_ops`, `struct enetc_pf`, `enum enetc_vf_flags`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source 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.