drivers/net/ethernet/sfc/efx.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/sfc/efx.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/sfc/efx.h- Extension
.h- Size
- 7664 bytes
- Lines
- 241
- 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/indirect_call_wrapper.hnet_driver.hef100_rx.hef100_tx.hefx_common.hfilter.h
Detected Declarations
function efx_enqueue_skbfunction efx_rx_flush_packetfunction efx_rx_buf_hash_validfunction efx_rss_enabledfunction efx_filter_insert_filterfunction efx_filter_remove_id_safefunction efx_filter_get_filter_safefunction efx_filter_count_rx_usedfunction efx_filter_get_rx_id_limitfunction efx_filter_get_rx_idsfunction efx_rss_activefunction efx_mtd_probefunction efx_mtd_probefunction efx_mtd_renamefunction efx_device_detach_syncfunction efx_device_attach_if_not_resettingfunction efx_rwsem_assert_write_locked
Annotated Snippet
static inline int efx_mtd_probe(struct efx_nic *efx) { return 0; }
static inline void efx_mtd_rename(struct efx_nic *efx) {}
static inline void efx_mtd_remove(struct efx_nic *efx) {}
#endif
#ifdef CONFIG_SFC_SRIOV
static inline unsigned int efx_vf_size(struct efx_nic *efx)
{
return 1 << efx->vi_scale;
}
#endif
static inline void efx_device_detach_sync(struct efx_nic *efx)
{
struct net_device *dev = efx->net_dev;
/* We must stop reps (which use our TX) before we stop ourselves. */
efx_detach_reps(efx);
/* Lock/freeze all TX queues so that we can be sure the
* TX scheduler is stopped when we're done and before
* netif_device_present() becomes false.
*/
netif_tx_lock_bh(dev);
netif_device_detach(dev);
netif_tx_unlock_bh(dev);
}
static inline void efx_device_attach_if_not_resetting(struct efx_nic *efx)
{
if ((efx->state != STATE_DISABLED) && !efx->reset_pending) {
netif_device_attach(efx->net_dev);
if (efx->state == STATE_NET_UP)
efx_attach_reps(efx);
}
}
static inline bool efx_rwsem_assert_write_locked(struct rw_semaphore *sem)
{
if (WARN_ON(down_read_trylock(sem))) {
up_read(sem);
return false;
}
return true;
}
int efx_xdp_tx_buffers(struct efx_nic *efx, int n, struct xdp_frame **xdpfs,
bool flush);
#endif /* EFX_EFX_H */
Annotation
- Immediate include surface: `linux/indirect_call_wrapper.h`, `net_driver.h`, `ef100_rx.h`, `ef100_tx.h`, `efx_common.h`, `filter.h`.
- Detected declarations: `function efx_enqueue_skb`, `function efx_rx_flush_packet`, `function efx_rx_buf_hash_valid`, `function efx_rss_enabled`, `function efx_filter_insert_filter`, `function efx_filter_remove_id_safe`, `function efx_filter_get_filter_safe`, `function efx_filter_count_rx_used`, `function efx_filter_get_rx_id_limit`, `function efx_filter_get_rx_ids`.
- 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.