drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.h- Extension
.h- Size
- 9685 bytes
- Lines
- 345
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hlinux/if_ether.h
Detected Declarations
struct firmwarestruct nfp_cppstruct nfp_nspstruct nfp_eth_tablestruct nfp_eth_table_portstruct nfp_nsp_identifystruct nfp_eth_media_bufenum nfp_eth_interfaceenum nfp_eth_mediaenum nfp_eth_anegenum nfp_eth_fecenum nfp_ethtool_link_mode_listenum nfp_nsp_sensor_idenum nfp_nsp_versionsfunction nfp_nsp_has_mac_reinitfunction nfp_nsp_has_stored_fw_loadfunction nfp_nsp_has_hwinfo_lookupfunction nfp_nsp_has_hwinfo_setfunction nfp_nsp_has_fw_loadedfunction nfp_nsp_has_versionsfunction nfp_nsp_has_read_module_eepromfunction nfp_nsp_has_read_mediafunction nfp_eth_can_support_fecfunction nfp_eth_supported_fec_modes
Annotated Snippet
struct nfp_eth_table {
unsigned int count;
unsigned int max_index;
struct nfp_eth_table_port {
unsigned int eth_index;
unsigned int index;
unsigned int nbi;
unsigned int base;
unsigned int lanes;
unsigned int speed;
unsigned int interface;
enum nfp_eth_media media;
enum nfp_eth_fec fec;
enum nfp_eth_fec act_fec;
enum nfp_eth_aneg aneg;
u8 mac_addr[ETH_ALEN];
u8 label_port;
u8 label_subport;
bool enabled;
bool tx_enabled;
bool rx_enabled;
bool supp_aneg;
bool rx_pause;
bool tx_pause;
bool override_changed;
/* Computed fields */
u8 port_type;
unsigned int port_lanes;
bool is_split;
unsigned int fec_modes_supported;
u64 link_modes_supp[2];
u64 link_modes_ad[2];
} ports[] __counted_by(count);
};
struct nfp_eth_table *nfp_eth_read_ports(struct nfp_cpp *cpp);
struct nfp_eth_table *
__nfp_eth_read_ports(struct nfp_cpp *cpp, struct nfp_nsp *nsp);
int nfp_eth_set_mod_enable(struct nfp_cpp *cpp, unsigned int idx, bool enable);
int nfp_eth_set_configured(struct nfp_cpp *cpp, unsigned int idx,
bool configed);
int
nfp_eth_set_fec(struct nfp_cpp *cpp, unsigned int idx, enum nfp_eth_fec mode);
int nfp_eth_set_idmode(struct nfp_cpp *cpp, unsigned int idx, bool state);
int nfp_eth_set_pauseparam(struct nfp_cpp *cpp, unsigned int idx,
unsigned int tx_pause, unsigned int rx_pause);
static inline bool nfp_eth_can_support_fec(struct nfp_eth_table_port *eth_port)
{
return !!eth_port->fec_modes_supported;
}
static inline unsigned int
nfp_eth_supported_fec_modes(struct nfp_eth_table_port *eth_port)
{
return eth_port->fec_modes_supported;
}
struct nfp_nsp *nfp_eth_config_start(struct nfp_cpp *cpp, unsigned int idx);
int nfp_eth_config_commit_end(struct nfp_nsp *nsp);
void nfp_eth_config_cleanup_end(struct nfp_nsp *nsp);
int __nfp_eth_set_aneg(struct nfp_nsp *nsp, enum nfp_eth_aneg mode);
int __nfp_eth_set_speed(struct nfp_nsp *nsp, unsigned int speed);
int __nfp_eth_set_split(struct nfp_nsp *nsp, unsigned int lanes);
/**
* struct nfp_nsp_identify - NSP static information
* @version: opaque version string
* @flags: version flags
* @br_primary: branch id of primary bootloader
* @br_secondary: branch id of secondary bootloader
* @br_nsp: branch id of NSP
* @primary: version of primarary bootloader
* @secondary: version id of secondary bootloader
* @nsp: version id of NSP
* @sensor_mask: mask of present sensors available on NIC
Annotation
- Immediate include surface: `linux/types.h`, `linux/if_ether.h`.
- Detected declarations: `struct firmware`, `struct nfp_cpp`, `struct nfp_nsp`, `struct nfp_eth_table`, `struct nfp_eth_table_port`, `struct nfp_nsp_identify`, `struct nfp_eth_media_buf`, `enum nfp_eth_interface`, `enum nfp_eth_media`, `enum nfp_eth_aneg`.
- 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.