drivers/net/ethernet/sfc/falcon/nic.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/sfc/falcon/nic.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/sfc/falcon/nic.h- Extension
.h- Size
- 16450 bytes
- Lines
- 508
- 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
linux/net_tstamp.hlinux/i2c-algo-bit.hnet_driver.hefx.h
Detected Declarations
struct falcon_board_typestruct falcon_boardstruct falcon_spi_devicestruct falcon_nic_datastruct kernel_ethtool_ts_infostruct ef4_farch_register_testfunction ef4_nic_revfunction ef4_nic_is_dual_funcfunction ef4_event_presentfunction ef4_tx_descfunction __ef4_nic_tx_is_emptyfunction bugsfunction ef4_rx_descfunction falcon_spi_presentfunction ef4_nic_probe_txfunction ef4_nic_init_txfunction ef4_nic_remove_txfunction ef4_nic_push_buffersfunction ef4_nic_probe_rxfunction ef4_nic_init_rxfunction ef4_nic_remove_rxfunction ef4_nic_notify_rx_descfunction ef4_nic_generate_fill_eventfunction ef4_nic_probe_eventqfunction ef4_nic_init_eventqfunction ef4_nic_fini_eventqfunction ef4_nic_remove_eventqfunction ef4_nic_process_eventqfunction ef4_nic_eventq_read_ackfunction counterfunction ef4_nic_event_test_irq_cpufunction ef4_nic_irq_test_irq_cpu
Annotated Snippet
struct falcon_board_type {
u8 id;
int (*init) (struct ef4_nic *nic);
void (*init_phy) (struct ef4_nic *efx);
void (*fini) (struct ef4_nic *nic);
void (*set_id_led) (struct ef4_nic *efx, enum ef4_led_mode mode);
int (*monitor) (struct ef4_nic *nic);
};
/**
* struct falcon_board - board information
* @type: Type of board
* @major: Major rev. ('A', 'B' ...)
* @minor: Minor rev. (0, 1, ...)
* @i2c_adap: I2C adapter for on-board peripherals
* @i2c_data: Data for bit-banging algorithm
* @hwmon_client: I2C client for hardware monitor
* @ioexp_client: I2C client for power/port control
*/
struct falcon_board {
const struct falcon_board_type *type;
int major;
int minor;
struct i2c_adapter i2c_adap;
struct i2c_algo_bit_data i2c_data;
struct i2c_client *hwmon_client, *ioexp_client;
};
/**
* struct falcon_spi_device - a Falcon SPI (Serial Peripheral Interface) device
* @device_id: Controller's id for the device
* @size: Size (in bytes)
* @addr_len: Number of address bytes in read/write commands
* @munge_address: Flag whether addresses should be munged.
* Some devices with 9-bit addresses (e.g. AT25040A EEPROM)
* use bit 3 of the command byte as address bit A8, rather
* than having a two-byte address. If this flag is set, then
* commands should be munged in this way.
* @erase_command: Erase command (or 0 if sector erase not needed).
* @erase_size: Erase sector size (in bytes)
* Erase commands affect sectors with this size and alignment.
* This must be a power of two.
* @block_size: Write block size (in bytes).
* Write commands are limited to blocks with this size and alignment.
*/
struct falcon_spi_device {
int device_id;
unsigned int size;
unsigned int addr_len;
unsigned int munge_address:1;
u8 erase_command;
unsigned int erase_size;
unsigned int block_size;
};
static inline bool falcon_spi_present(const struct falcon_spi_device *spi)
{
return spi->size != 0;
}
enum {
FALCON_STAT_tx_bytes = GENERIC_STAT_COUNT,
FALCON_STAT_tx_packets,
FALCON_STAT_tx_pause,
FALCON_STAT_tx_control,
FALCON_STAT_tx_unicast,
FALCON_STAT_tx_multicast,
FALCON_STAT_tx_broadcast,
FALCON_STAT_tx_lt64,
FALCON_STAT_tx_64,
FALCON_STAT_tx_65_to_127,
FALCON_STAT_tx_128_to_255,
FALCON_STAT_tx_256_to_511,
FALCON_STAT_tx_512_to_1023,
FALCON_STAT_tx_1024_to_15xx,
FALCON_STAT_tx_15xx_to_jumbo,
FALCON_STAT_tx_gtjumbo,
FALCON_STAT_tx_non_tcpudp,
FALCON_STAT_tx_mac_src_error,
FALCON_STAT_tx_ip_src_error,
FALCON_STAT_rx_bytes,
FALCON_STAT_rx_good_bytes,
FALCON_STAT_rx_bad_bytes,
FALCON_STAT_rx_packets,
FALCON_STAT_rx_good,
FALCON_STAT_rx_bad,
FALCON_STAT_rx_pause,
FALCON_STAT_rx_control,
FALCON_STAT_rx_unicast,
FALCON_STAT_rx_multicast,
Annotation
- Immediate include surface: `linux/net_tstamp.h`, `linux/i2c-algo-bit.h`, `net_driver.h`, `efx.h`.
- Detected declarations: `struct falcon_board_type`, `struct falcon_board`, `struct falcon_spi_device`, `struct falcon_nic_data`, `struct kernel_ethtool_ts_info`, `struct ef4_farch_register_test`, `function ef4_nic_rev`, `function ef4_nic_is_dual_func`, `function ef4_event_present`, `function ef4_tx_desc`.
- 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.