drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c- Extension
.c- Size
- 52095 bytes
- Lines
- 1887
- 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/types.hlinux/delay.hlinux/pci.hlinux/io.hlinux/netdevice.hlinux/ethtool.hqlcnic.h
Detected Declarations
struct qlcnic_statsfunction qlcnic_82xx_statisticsfunction qlcnic_83xx_statisticsfunction qlcnic_dev_statistics_lenfunction qlcnic_get_ring_regs_lenfunction qlcnic_get_regs_lenfunction qlcnic_get_eeprom_lenfunction qlcnic_get_drvinfofunction qlcnic_82xx_get_link_ksettingsfunction qlcnic_get_link_ksettingsfunction qlcnic_set_port_configfunction qlcnic_set_link_ksettingsfunction qlcnic_82xx_get_registersfunction qlcnic_get_regsfunction qlcnic_test_linkfunction qlcnic_get_eepromfunction qlcnic_get_ringparamfunction qlcnic_validate_ringparamfunction qlcnic_set_ringparamfunction qlcnic_validate_ring_countfunction qlcnic_get_channelsfunction qlcnic_set_channelsfunction qlcnic_get_pauseparamfunction qlcnic_set_pauseparamfunction qlcnic_reg_testfunction qlcnic_eeprom_testfunction qlcnic_get_sset_countfunction qlcnic_irq_testfunction qlcnic_create_loopback_bufffunction qlcnic_check_loopback_bufffunction qlcnic_do_lb_testfunction qlcnic_loopback_testfunction qlcnic_diag_testfunction qlcnic_get_stringsfunction qlcnic_update_statsfunction qlcnic_get_ethtool_statsfunction qlcnic_set_ledfunction qlcnic_get_wolfunction qlcnic_set_wolfunction qlcnic_set_intr_coalescefunction qlcnic_get_intr_coalescefunction qlcnic_get_msglevelfunction qlcnic_set_msglevelfunction qlcnic_enable_fw_dump_statefunction qlcnic_disable_fw_dump_statefunction qlcnic_check_fw_dump_statefunction qlcnic_get_dump_flagfunction qlcnic_get_dump_data
Annotated Snippet
struct qlcnic_stats {
char stat_string[ETH_GSTRING_LEN];
int sizeof_stat;
int stat_offset;
};
#define QLC_SIZEOF(m) sizeof_field(struct qlcnic_adapter, m)
#define QLC_OFF(m) offsetof(struct qlcnic_adapter, m)
static const u32 qlcnic_fw_dump_level[] = {
0x3, 0x7, 0xf, 0x1f, 0x3f, 0x7f, 0xff
};
static const struct qlcnic_stats qlcnic_gstrings_stats[] = {
{"xmit_on", QLC_SIZEOF(stats.xmit_on), QLC_OFF(stats.xmit_on)},
{"xmit_off", QLC_SIZEOF(stats.xmit_off), QLC_OFF(stats.xmit_off)},
{"xmit_called", QLC_SIZEOF(stats.xmitcalled),
QLC_OFF(stats.xmitcalled)},
{"xmit_finished", QLC_SIZEOF(stats.xmitfinished),
QLC_OFF(stats.xmitfinished)},
{"tx dma map error", QLC_SIZEOF(stats.tx_dma_map_error),
QLC_OFF(stats.tx_dma_map_error)},
{"tx_bytes", QLC_SIZEOF(stats.txbytes), QLC_OFF(stats.txbytes)},
{"tx_dropped", QLC_SIZEOF(stats.txdropped), QLC_OFF(stats.txdropped)},
{"rx dma map error", QLC_SIZEOF(stats.rx_dma_map_error),
QLC_OFF(stats.rx_dma_map_error)},
{"rx_pkts", QLC_SIZEOF(stats.rx_pkts), QLC_OFF(stats.rx_pkts)},
{"rx_bytes", QLC_SIZEOF(stats.rxbytes), QLC_OFF(stats.rxbytes)},
{"rx_dropped", QLC_SIZEOF(stats.rxdropped), QLC_OFF(stats.rxdropped)},
{"null rxbuf", QLC_SIZEOF(stats.null_rxbuf), QLC_OFF(stats.null_rxbuf)},
{"csummed", QLC_SIZEOF(stats.csummed), QLC_OFF(stats.csummed)},
{"lro_pkts", QLC_SIZEOF(stats.lro_pkts), QLC_OFF(stats.lro_pkts)},
{"lrobytes", QLC_SIZEOF(stats.lrobytes), QLC_OFF(stats.lrobytes)},
{"lso_frames", QLC_SIZEOF(stats.lso_frames), QLC_OFF(stats.lso_frames)},
{"encap_lso_frames", QLC_SIZEOF(stats.encap_lso_frames),
QLC_OFF(stats.encap_lso_frames)},
{"encap_tx_csummed", QLC_SIZEOF(stats.encap_tx_csummed),
QLC_OFF(stats.encap_tx_csummed)},
{"encap_rx_csummed", QLC_SIZEOF(stats.encap_rx_csummed),
QLC_OFF(stats.encap_rx_csummed)},
{"skb_alloc_failure", QLC_SIZEOF(stats.skb_alloc_failure),
QLC_OFF(stats.skb_alloc_failure)},
{"mac_filter_limit_overrun", QLC_SIZEOF(stats.mac_filter_limit_overrun),
QLC_OFF(stats.mac_filter_limit_overrun)},
{"spurious intr", QLC_SIZEOF(stats.spurious_intr),
QLC_OFF(stats.spurious_intr)},
{"mbx spurious intr", QLC_SIZEOF(stats.mbx_spurious_intr),
QLC_OFF(stats.mbx_spurious_intr)},
};
static const char qlcnic_device_gstrings_stats[][ETH_GSTRING_LEN] = {
"tx unicast frames",
"tx multicast frames",
"tx broadcast frames",
"tx dropped frames",
"tx errors",
"tx local frames",
"tx numbytes",
"rx unicast frames",
"rx multicast frames",
"rx broadcast frames",
"rx dropped frames",
"rx errors",
"rx local frames",
"rx numbytes",
};
static const char qlcnic_83xx_tx_stats_strings[][ETH_GSTRING_LEN] = {
"ctx_tx_bytes",
"ctx_tx_pkts",
"ctx_tx_errors",
"ctx_tx_dropped_pkts",
"ctx_tx_num_buffers",
};
static const char qlcnic_83xx_mac_stats_strings[][ETH_GSTRING_LEN] = {
"mac_tx_frames",
"mac_tx_bytes",
"mac_tx_mcast_pkts",
"mac_tx_bcast_pkts",
"mac_tx_pause_cnt",
"mac_tx_ctrl_pkt",
"mac_tx_lt_64b_pkts",
"mac_tx_lt_127b_pkts",
"mac_tx_lt_255b_pkts",
"mac_tx_lt_511b_pkts",
"mac_tx_lt_1023b_pkts",
"mac_tx_lt_1518b_pkts",
"mac_tx_gt_1518b_pkts",
"mac_rx_frames",
"mac_rx_bytes",
Annotation
- Immediate include surface: `linux/types.h`, `linux/delay.h`, `linux/pci.h`, `linux/io.h`, `linux/netdevice.h`, `linux/ethtool.h`, `qlcnic.h`.
- Detected declarations: `struct qlcnic_stats`, `function qlcnic_82xx_statistics`, `function qlcnic_83xx_statistics`, `function qlcnic_dev_statistics_len`, `function qlcnic_get_ring_regs_len`, `function qlcnic_get_regs_len`, `function qlcnic_get_eeprom_len`, `function qlcnic_get_drvinfo`, `function qlcnic_82xx_get_link_ksettings`, `function qlcnic_get_link_ksettings`.
- 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.