drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c- Extension
.c- Size
- 32754 bytes
- Lines
- 1137
- 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/etherdevice.hlinux/ethtool.hlinux/interrupt.hlinux/io.hlinux/mii.hlinux/phylink.hlinux/net_tstamp.hstmmac.hstmmac_fpe.hdwmac_dma.hdwxgmac2.h
Detected Declarations
struct stmmac_statsfunction stmmac_ethtool_getdrvinfofunction stmmac_ethtool_get_link_ksettingsfunction stmmac_ethtool_set_link_ksettingsfunction stmmac_ethtool_getmsglevelfunction stmmac_ethtool_setmsglevelfunction stmmac_ethtool_get_regs_lenfunction stmmac_ethtool_gregsfunction stmmac_nway_resetfunction stmmac_get_ringparamfunction stmmac_set_ringparamfunction stmmac_get_pauseparamfunction stmmac_set_pauseparamfunction stmmac_get_rx_normal_irq_nfunction stmmac_get_tx_normal_irq_nfunction stmmac_get_per_qstatsfunction stmmac_get_ethtool_statsfunction stmmac_get_sset_countfunction stmmac_get_qstats_stringfunction stmmac_get_stringsfunction stmmac_get_wolfunction stmmac_set_wolfunction stmmac_ethtool_op_get_eeefunction stmmac_ethtool_op_set_eeefunction stmmac_usec2riwtfunction stmmac_riwt2usecfunction __stmmac_get_coalescefunction stmmac_get_coalescefunction stmmac_get_per_queue_coalescefunction __stmmac_set_coalescefunction stmmac_set_coalescefunction stmmac_set_per_queue_coalescefunction stmmac_get_rx_ring_countfunction stmmac_get_rxfh_key_sizefunction stmmac_get_rxfh_indir_sizefunction stmmac_get_rxfhfunction stmmac_set_rxfhfunction stmmac_get_channelsfunction stmmac_set_channelsfunction stmmac_get_ts_infofunction stmmac_get_mmfunction stmmac_set_mmfunction stmmac_get_mm_statsfunction stmmac_set_ethtool_ops
Annotated Snippet
struct stmmac_stats {
char stat_string[ETH_GSTRING_LEN] __nonstring;
int sizeof_stat;
int stat_offset;
};
#define STMMAC_STAT(m) \
{ #m, sizeof_field(struct stmmac_extra_stats, m), \
offsetof(struct stmmac_priv, xstats.m)}
static const struct stmmac_stats stmmac_gstrings_stats[] = {
/* Transmit errors */
STMMAC_STAT(tx_underflow),
STMMAC_STAT(tx_carrier),
STMMAC_STAT(tx_losscarrier),
STMMAC_STAT(vlan_tag),
STMMAC_STAT(tx_deferred),
STMMAC_STAT(tx_vlan),
STMMAC_STAT(tx_jabber),
STMMAC_STAT(tx_frame_flushed),
STMMAC_STAT(tx_payload_error),
STMMAC_STAT(tx_ip_header_error),
/* Receive errors */
STMMAC_STAT(rx_desc),
STMMAC_STAT(sa_filter_fail),
STMMAC_STAT(overflow_error),
STMMAC_STAT(ipc_csum_error),
STMMAC_STAT(rx_collision),
STMMAC_STAT(rx_crc_errors),
STMMAC_STAT(dribbling_bit),
STMMAC_STAT(rx_length),
STMMAC_STAT(rx_mii),
STMMAC_STAT(rx_multicast),
STMMAC_STAT(rx_gmac_overflow),
STMMAC_STAT(rx_watchdog),
STMMAC_STAT(da_rx_filter_fail),
STMMAC_STAT(sa_rx_filter_fail),
STMMAC_STAT(rx_missed_cntr),
STMMAC_STAT(rx_overflow_cntr),
STMMAC_STAT(rx_vlan),
STMMAC_STAT(rx_split_hdr_pkt_n),
/* Tx/Rx IRQ error info */
STMMAC_STAT(tx_undeflow_irq),
STMMAC_STAT(tx_process_stopped_irq),
STMMAC_STAT(tx_jabber_irq),
STMMAC_STAT(rx_overflow_irq),
STMMAC_STAT(rx_buf_unav_irq),
STMMAC_STAT(rx_process_stopped_irq),
STMMAC_STAT(rx_watchdog_irq),
STMMAC_STAT(tx_early_irq),
STMMAC_STAT(fatal_bus_error_irq),
/* Tx/Rx IRQ Events */
STMMAC_STAT(rx_early_irq),
STMMAC_STAT(threshold),
STMMAC_STAT(irq_receive_pmt_irq_n),
/* MMC info */
STMMAC_STAT(mmc_tx_irq_n),
STMMAC_STAT(mmc_rx_irq_n),
STMMAC_STAT(mmc_rx_csum_offload_irq_n),
/* EEE */
STMMAC_STAT(irq_tx_path_in_lpi_mode_n),
STMMAC_STAT(irq_tx_path_exit_lpi_mode_n),
STMMAC_STAT(irq_rx_path_in_lpi_mode_n),
STMMAC_STAT(irq_rx_path_exit_lpi_mode_n),
STMMAC_STAT(phy_eee_wakeup_error_n),
/* Extended RDES status */
STMMAC_STAT(ip_hdr_err),
STMMAC_STAT(ip_payload_err),
STMMAC_STAT(ip_csum_bypassed),
STMMAC_STAT(ipv4_pkt_rcvd),
STMMAC_STAT(ipv6_pkt_rcvd),
STMMAC_STAT(no_ptp_rx_msg_type_ext),
STMMAC_STAT(ptp_rx_msg_type_sync),
STMMAC_STAT(ptp_rx_msg_type_follow_up),
STMMAC_STAT(ptp_rx_msg_type_delay_req),
STMMAC_STAT(ptp_rx_msg_type_delay_resp),
STMMAC_STAT(ptp_rx_msg_type_pdelay_req),
STMMAC_STAT(ptp_rx_msg_type_pdelay_resp),
STMMAC_STAT(ptp_rx_msg_type_pdelay_follow_up),
STMMAC_STAT(ptp_rx_msg_type_announce),
STMMAC_STAT(ptp_rx_msg_type_management),
STMMAC_STAT(ptp_rx_msg_pkt_reserved_type),
STMMAC_STAT(ptp_frame_type),
STMMAC_STAT(ptp_ver),
STMMAC_STAT(timestamp_dropped),
STMMAC_STAT(av_pkt_rcvd),
STMMAC_STAT(av_tagged_pkt_rcvd),
STMMAC_STAT(vlan_tag_priority_val),
STMMAC_STAT(l3_filter_match),
STMMAC_STAT(l4_filter_match),
Annotation
- Immediate include surface: `linux/etherdevice.h`, `linux/ethtool.h`, `linux/interrupt.h`, `linux/io.h`, `linux/mii.h`, `linux/phylink.h`, `linux/net_tstamp.h`, `stmmac.h`.
- Detected declarations: `struct stmmac_stats`, `function stmmac_ethtool_getdrvinfo`, `function stmmac_ethtool_get_link_ksettings`, `function stmmac_ethtool_set_link_ksettings`, `function stmmac_ethtool_getmsglevel`, `function stmmac_ethtool_setmsglevel`, `function stmmac_ethtool_get_regs_len`, `function stmmac_ethtool_gregs`, `function stmmac_nway_reset`, `function stmmac_get_ringparam`.
- 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.