drivers/net/ethernet/amd/xgbe/xgbe.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/amd/xgbe/xgbe.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/amd/xgbe/xgbe.h- Extension
.h- Size
- 39134 bytes
- Lines
- 1386
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- 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/dma-mapping.hlinux/netdevice.hlinux/workqueue.hlinux/phy.hlinux/if_vlan.hlinux/bitops.hlinux/ptp_clock_kernel.hlinux/timecounter.hlinux/net_tstamp.hnet/dcbnl.hlinux/completion.hlinux/cpumask.hlinux/interrupt.hlinux/dcache.hlinux/ethtool.hlinux/list.h
Detected Declarations
struct xgbe_prv_datastruct xgbe_packet_datastruct xgbe_ring_descstruct xgbe_page_allocstruct xgbe_buffer_datastruct xgbe_tx_ring_datastruct xgbe_rx_ring_datastruct xgbe_ring_datastruct xgbe_ringstruct xgbe_channelstruct xgbe_phystruct xgbe_i2c_opstruct xgbe_i2c_op_statestruct xgbe_i2cstruct xgbe_mmc_statsstruct xgbe_ext_statsstruct xgbe_pps_configstruct xgbe_hw_ifstruct xgbe_phy_impl_ifstruct xgbe_phy_ifstruct xgbe_i2c_ifstruct xgbe_desc_ifstruct xgbe_hw_featuresstruct xgbe_version_datastruct xgbe_prv_dataenum xgbe_stateenum xgbe_intenum xgbe_int_stateenum xgbe_ecc_secenum xgbe_speedenum xgbe_xpcs_accessenum xgbe_an_modeenum xgbe_anenum xgbe_rxenum xgbe_modeenum xgbe_speedsetenum xgbe_mdio_modeenum xgbe_mb_cmdenum xgbe_mb_subcmdenum xgbe_i2c_cmdfunction xgbe_pci_initfunction xgbe_pci_exitfunction xgbe_debugfs_init
Annotated Snippet
const struct net_device_ops *xgbe_get_netdev_ops(void);
const struct ethtool_ops *xgbe_get_ethtool_ops(void);
const struct udp_tunnel_nic_info *xgbe_get_udp_tunnel_info(void);
#ifdef CONFIG_AMD_XGBE_DCB
const struct dcbnl_rtnl_ops *xgbe_get_dcbnl_ops(void);
#endif
void xgbe_ptp_register(struct xgbe_prv_data *);
void xgbe_ptp_unregister(struct xgbe_prv_data *);
void xgbe_dump_tx_desc(struct xgbe_prv_data *, struct xgbe_ring *,
unsigned int, unsigned int, unsigned int);
void xgbe_dump_rx_desc(struct xgbe_prv_data *, struct xgbe_ring *,
unsigned int);
void xgbe_print_pkt(struct net_device *, struct sk_buff *, bool);
void xgbe_get_all_hw_features(struct xgbe_prv_data *);
int xgbe_powerup(struct net_device *netdev);
int xgbe_powerdown(struct net_device *netdev);
void xgbe_init_rx_coalesce(struct xgbe_prv_data *);
void xgbe_init_tx_coalesce(struct xgbe_prv_data *);
void xgbe_restart_dev(struct xgbe_prv_data *pdata);
void xgbe_full_restart_dev(struct xgbe_prv_data *pdata);
/* For Timestamp config */
void xgbe_config_tstamp(struct xgbe_prv_data *pdata, unsigned int mac_tscr);
u64 xgbe_get_tstamp_time(struct xgbe_prv_data *pdata);
u64 xgbe_get_tx_tstamp(struct xgbe_prv_data *pdata);
void xgbe_get_rx_tstamp(struct xgbe_packet_data *packet,
struct xgbe_ring_desc *rdesc);
void xgbe_get_rx_tstamp(struct xgbe_packet_data *packet,
struct xgbe_ring_desc *rdesc);
void xgbe_update_tstamp_addend(struct xgbe_prv_data *pdata,
unsigned int addend);
void xgbe_set_tstamp_time(struct xgbe_prv_data *pdata, unsigned int sec,
unsigned int nsec);
void xgbe_tx_tstamp(struct work_struct *work);
int xgbe_get_hwtstamp_settings(struct net_device *netdev,
struct kernel_hwtstamp_config *config);
int xgbe_set_hwtstamp_settings(struct net_device *netdev,
struct kernel_hwtstamp_config *config,
struct netlink_ext_ack *extack);
void xgbe_prep_tx_tstamp(struct xgbe_prv_data *pdata,
struct sk_buff *skb,
struct xgbe_packet_data *packet);
int xgbe_init_ptp(struct xgbe_prv_data *pdata);
void xgbe_update_tstamp_time(struct xgbe_prv_data *pdata, unsigned int sec,
unsigned int nsec);
int xgbe_pps_config(struct xgbe_prv_data *pdata, struct xgbe_pps_config *cfg,
int index, bool on);
/* Selftest functions */
void xgbe_selftest_run(struct net_device *dev,
struct ethtool_test *etest, u64 *buf);
void xgbe_selftest_get_strings(struct xgbe_prv_data *pdata, u8 *data);
int xgbe_selftest_get_count(struct xgbe_prv_data *pdata);
/* Loopback control */
int xgbe_enable_mac_loopback(struct xgbe_prv_data *pdata);
void xgbe_disable_mac_loopback(struct xgbe_prv_data *pdata);
#ifdef CONFIG_DEBUG_FS
void xgbe_debugfs_init(struct xgbe_prv_data *);
void xgbe_debugfs_exit(struct xgbe_prv_data *);
void xgbe_debugfs_rename(struct xgbe_prv_data *pdata);
#else
static inline void xgbe_debugfs_init(struct xgbe_prv_data *pdata) {}
static inline void xgbe_debugfs_exit(struct xgbe_prv_data *pdata) {}
static inline void xgbe_debugfs_rename(struct xgbe_prv_data *pdata) {}
#endif /* CONFIG_DEBUG_FS */
/* NOTE: Uncomment for function trace log messages in KERNEL LOG */
#if 0
#define YDEBUG
#define YDEBUG_MDIO
#endif
/* For debug prints */
#ifdef YDEBUG
#define DBGPR(x...) pr_alert(x)
#else
#define DBGPR(x...) do { } while (0)
#endif
#ifdef YDEBUG_MDIO
#define DBGPR_MDIO(x...) pr_alert(x)
#else
#define DBGPR_MDIO(x...) do { } while (0)
#endif
Annotation
- Immediate include surface: `linux/dma-mapping.h`, `linux/netdevice.h`, `linux/workqueue.h`, `linux/phy.h`, `linux/if_vlan.h`, `linux/bitops.h`, `linux/ptp_clock_kernel.h`, `linux/timecounter.h`.
- Detected declarations: `struct xgbe_prv_data`, `struct xgbe_packet_data`, `struct xgbe_ring_desc`, `struct xgbe_page_alloc`, `struct xgbe_buffer_data`, `struct xgbe_tx_ring_data`, `struct xgbe_rx_ring_data`, `struct xgbe_ring_data`, `struct xgbe_ring`, `struct xgbe_channel`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: pattern 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.