drivers/net/dsa/sja1105/sja1105_ethtool.c

Source file repositories/reference/linux-study-clean/drivers/net/dsa/sja1105/sja1105_ethtool.c

File Facts

System
Linux kernel
Corpus path
drivers/net/dsa/sja1105/sja1105_ethtool.c
Extension
.c
Size
10670 bytes
Lines
634
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct sja1105_port_counter {
	enum sja1105_stats_area area;
	const char name[ETH_GSTRING_LEN];
	int offset;
	int start;
	int end;
	bool is_64bit;
};

static const struct sja1105_port_counter sja1105_port_counters[] = {
	/* MAC-Level Diagnostic Counters */
	[N_RUNT] = {
		.area = MAC,
		.name = "n_runt",
		.offset = 0,
		.start = 31,
		.end = 24,
	},
	[N_SOFERR] = {
		.area = MAC,
		.name = "n_soferr",
		.offset = 0x0,
		.start = 23,
		.end = 16,
	},
	[N_ALIGNERR] = {
		.area = MAC,
		.name = "n_alignerr",
		.offset = 0x0,
		.start = 15,
		.end = 8,
	},
	[N_MIIERR] = {
		.area = MAC,
		.name = "n_miierr",
		.offset = 0x0,
		.start = 7,
		.end = 0,
	},
	/* MAC-Level Diagnostic Flags */
	[TYPEERR] = {
		.area = MAC,
		.name = "typeerr",
		.offset = 0x1,
		.start = 27,
		.end = 27,
	},
	[SIZEERR] = {
		.area = MAC,
		.name = "sizeerr",
		.offset = 0x1,
		.start = 26,
		.end = 26,
	},
	[TCTIMEOUT] = {
		.area = MAC,
		.name = "tctimeout",
		.offset = 0x1,
		.start = 25,
		.end = 25,
	},
	[PRIORERR] = {
		.area = MAC,
		.name = "priorerr",
		.offset = 0x1,
		.start = 24,
		.end = 24,
	},
	[NOMASTER] = {
		.area = MAC,
		.name = "nomaster",
		.offset = 0x1,
		.start = 23,
		.end = 23,
	},
	[MEMOV] = {
		.area = MAC,
		.name = "memov",
		.offset = 0x1,
		.start = 22,
		.end = 22,
	},
	[MEMERR] = {
		.area = MAC,
		.name = "memerr",
		.offset = 0x1,
		.start = 21,
		.end = 21,
	},
	[INVTYP] = {

Annotation

Implementation Notes