drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/samsung/sxgbe/sxgbe_ethtool.c- Extension
.c- Size
- 11739 bytes
- Lines
- 475
- 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/clk.hlinux/interrupt.hlinux/kernel.hlinux/netdevice.hlinux/net_tstamp.hlinux/phy.hlinux/ptp_clock_kernel.hsxgbe_common.hsxgbe_reg.hsxgbe_dma.h
Detected Declarations
struct sxgbe_statsfunction sxgbe_get_eeefunction sxgbe_set_eeefunction sxgbe_getdrvinfofunction sxgbe_getmsglevelfunction sxgbe_setmsglevelfunction sxgbe_get_stringsfunction sxgbe_get_sset_countfunction sxgbe_get_ethtool_statsfunction sxgbe_get_channelsfunction sxgbe_riwt2usecfunction sxgbe_usec2riwtfunction sxgbe_get_coalescefunction sxgbe_set_coalescefunction sxgbe_get_rxfh_fieldsfunction sxgbe_set_rxfh_fieldsfunction sxgbe_get_regsfunction sxgbe_get_regs_lenfunction sxgbe_set_ethtool_ops
Annotated Snippet
struct sxgbe_stats {
char stat_string[ETH_GSTRING_LEN];
int sizeof_stat;
int stat_offset;
};
#define SXGBE_STAT(m) \
{ \
#m, \
sizeof_field(struct sxgbe_extra_stats, m), \
offsetof(struct sxgbe_priv_data, xstats.m) \
}
static const struct sxgbe_stats sxgbe_gstrings_stats[] = {
/* TX/RX IRQ events */
SXGBE_STAT(tx_process_stopped_irq),
SXGBE_STAT(tx_ctxt_desc_err),
SXGBE_STAT(tx_threshold),
SXGBE_STAT(rx_threshold),
SXGBE_STAT(tx_pkt_n),
SXGBE_STAT(rx_pkt_n),
SXGBE_STAT(normal_irq_n),
SXGBE_STAT(tx_normal_irq_n),
SXGBE_STAT(rx_normal_irq_n),
SXGBE_STAT(napi_poll),
SXGBE_STAT(tx_clean),
SXGBE_STAT(tx_reset_ic_bit),
SXGBE_STAT(rx_process_stopped_irq),
SXGBE_STAT(rx_underflow_irq),
/* Bus access errors */
SXGBE_STAT(fatal_bus_error_irq),
SXGBE_STAT(tx_read_transfer_err),
SXGBE_STAT(tx_write_transfer_err),
SXGBE_STAT(tx_desc_access_err),
SXGBE_STAT(tx_buffer_access_err),
SXGBE_STAT(tx_data_transfer_err),
SXGBE_STAT(rx_read_transfer_err),
SXGBE_STAT(rx_write_transfer_err),
SXGBE_STAT(rx_desc_access_err),
SXGBE_STAT(rx_buffer_access_err),
SXGBE_STAT(rx_data_transfer_err),
/* EEE-LPI stats */
SXGBE_STAT(tx_lpi_entry_n),
SXGBE_STAT(tx_lpi_exit_n),
SXGBE_STAT(rx_lpi_entry_n),
SXGBE_STAT(rx_lpi_exit_n),
SXGBE_STAT(eee_wakeup_error_n),
/* RX specific */
/* L2 error */
SXGBE_STAT(rx_code_gmii_err),
SXGBE_STAT(rx_watchdog_err),
SXGBE_STAT(rx_crc_err),
SXGBE_STAT(rx_gaint_pkt_err),
SXGBE_STAT(ip_hdr_err),
SXGBE_STAT(ip_payload_err),
SXGBE_STAT(overflow_error),
/* L2 Pkt type */
SXGBE_STAT(len_pkt),
SXGBE_STAT(mac_ctl_pkt),
SXGBE_STAT(dcb_ctl_pkt),
SXGBE_STAT(arp_pkt),
SXGBE_STAT(oam_pkt),
SXGBE_STAT(untag_okt),
SXGBE_STAT(other_pkt),
SXGBE_STAT(svlan_tag_pkt),
SXGBE_STAT(cvlan_tag_pkt),
SXGBE_STAT(dvlan_ocvlan_icvlan_pkt),
SXGBE_STAT(dvlan_osvlan_isvlan_pkt),
SXGBE_STAT(dvlan_osvlan_icvlan_pkt),
SXGBE_STAT(dvan_ocvlan_icvlan_pkt),
/* L3/L4 Pkt type */
SXGBE_STAT(not_ip_pkt),
SXGBE_STAT(ip4_tcp_pkt),
SXGBE_STAT(ip4_udp_pkt),
SXGBE_STAT(ip4_icmp_pkt),
SXGBE_STAT(ip4_unknown_pkt),
SXGBE_STAT(ip6_tcp_pkt),
SXGBE_STAT(ip6_udp_pkt),
SXGBE_STAT(ip6_icmp_pkt),
SXGBE_STAT(ip6_unknown_pkt),
/* Filter specific */
SXGBE_STAT(vlan_filter_match),
SXGBE_STAT(sa_filter_fail),
SXGBE_STAT(da_filter_fail),
Annotation
- Immediate include surface: `linux/clk.h`, `linux/interrupt.h`, `linux/kernel.h`, `linux/netdevice.h`, `linux/net_tstamp.h`, `linux/phy.h`, `linux/ptp_clock_kernel.h`, `sxgbe_common.h`.
- Detected declarations: `struct sxgbe_stats`, `function sxgbe_get_eee`, `function sxgbe_set_eee`, `function sxgbe_getdrvinfo`, `function sxgbe_getmsglevel`, `function sxgbe_setmsglevel`, `function sxgbe_get_strings`, `function sxgbe_get_sset_count`, `function sxgbe_get_ethtool_stats`, `function sxgbe_get_channels`.
- 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.