drivers/net/ethernet/meta/fbnic/fbnic.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/meta/fbnic/fbnic.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/meta/fbnic/fbnic.h- Extension
.h- Size
- 7552 bytes
- Lines
- 264
- 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/interrupt.hlinux/io.hlinux/ptp_clock_kernel.hlinux/types.hlinux/workqueue.hfbnic_csr.hfbnic_fw.hfbnic_fw_log.hfbnic_hw_stats.hfbnic_mac.hfbnic_rpc.h
Detected Declarations
struct fbnic_napi_vectorstruct fbnic_devstruct fbnic_infoenum fbnic_msix_self_test_codesenum fbnic_boardsfunction fbnic_presentfunction fbnic_wr32function fbnic_wrflfunction fbnic_rmw32function fbnic_bmc_presentfunction fbnic_init_failure
Annotated Snippet
struct fbnic_dev {
struct device *dev;
struct net_device *netdev;
struct dentry *dbg_fbd;
struct device *hwmon;
struct devlink_health_reporter *fw_reporter;
struct devlink_health_reporter *otp_reporter;
u32 __iomem *uc_addr0;
u32 __iomem *uc_addr4;
const struct fbnic_mac *mac;
unsigned int fw_msix_vector;
unsigned int mac_msix_vector;
unsigned short num_irqs;
struct {
u8 users;
char name[IFNAMSIZ + 9];
} napi_irq[FBNIC_MAX_NAPI_VECTORS];
struct delayed_work service_task;
struct fbnic_fw_mbx mbx[FBNIC_IPC_MBX_INDICES];
struct fbnic_fw_cap fw_cap;
struct fbnic_fw_completion *cmpl_data[FBNIC_MBX_CMPL_SLOTS];
/* Lock protecting Tx Mailbox queue to prevent possible races */
spinlock_t fw_tx_lock;
unsigned long last_heartbeat_request;
unsigned long last_heartbeat_response;
u8 fw_heartbeat_enabled;
u64 dsn;
u32 mps;
u32 readrq;
u8 relaxed_ord;
/* Local copy of the devices TCAM */
struct fbnic_act_tcam act_tcam[FBNIC_RPC_TCAM_ACT_NUM_ENTRIES];
struct fbnic_mac_addr mac_addr[FBNIC_RPC_TCAM_MACDA_NUM_ENTRIES];
u8 mac_addr_boundary;
u8 tce_tcam_last;
/* IP TCAM */
struct fbnic_ip_addr ip_src[FBNIC_RPC_TCAM_IP_ADDR_NUM_ENTRIES];
struct fbnic_ip_addr ip_dst[FBNIC_RPC_TCAM_IP_ADDR_NUM_ENTRIES];
struct fbnic_ip_addr ipo_src[FBNIC_RPC_TCAM_IP_ADDR_NUM_ENTRIES];
struct fbnic_ip_addr ipo_dst[FBNIC_RPC_TCAM_IP_ADDR_NUM_ENTRIES];
/* Number of TCQs/RCQs available on hardware */
u16 max_num_queues;
/* Lock protecting writes to @time_high, @time_offset of fbnic_netdev,
* and the HW time CSR machinery.
*/
spinlock_t time_lock;
/* Externally accessible PTP clock, may be NULL */
struct ptp_clock *ptp;
struct ptp_clock_info ptp_info;
/* Last @time_high refresh time in jiffies (to catch stalls) */
unsigned long last_read;
/* PMD specific data */
unsigned long end_of_pmd_training;
u8 pmd_state;
/* Local copy of hardware statistics */
struct fbnic_hw_stats hw_stats;
/* Firmware time since boot in milliseconds */
u64 firmware_time;
u64 prev_firmware_time;
struct fbnic_fw_log fw_log;
/* MDIO bus for PHYs */
struct mii_bus *mdio_bus;
/* In units of ms since API supports values in ms */
u16 ps_timeout;
};
/* Reserve entry 0 in the MSI-X "others" array until we have filled all
* 32 of the possible interrupt slots. By doing this we can avoid any
* potential conflicts should we need to enable one of the debug interrupt
* causes later.
*/
enum {
FBNIC_FW_MSIX_ENTRY,
FBNIC_PCS_MSIX_ENTRY,
Annotation
- Immediate include surface: `linux/interrupt.h`, `linux/io.h`, `linux/ptp_clock_kernel.h`, `linux/types.h`, `linux/workqueue.h`, `fbnic_csr.h`, `fbnic_fw.h`, `fbnic_fw_log.h`.
- Detected declarations: `struct fbnic_napi_vector`, `struct fbnic_dev`, `struct fbnic_info`, `enum fbnic_msix_self_test_codes`, `enum fbnic_boards`, `function fbnic_present`, `function fbnic_wr32`, `function fbnic_wrfl`, `function fbnic_rmw32`, `function fbnic_bmc_present`.
- 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.