drivers/net/ethernet/atheros/atlx/atl1.h

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/atheros/atlx/atl1.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/atheros/atlx/atl1.h
Extension
.h
Size
23395 bytes
Lines
791
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 stats_msg_block {
	/* rx */
	u32 rx_ok;		/* good RX packets */
	u32 rx_bcast;		/* good RX broadcast packets */
	u32 rx_mcast;		/* good RX multicast packets */
	u32 rx_pause;		/* RX pause frames */
	u32 rx_ctrl;		/* RX control packets other than pause frames */
	u32 rx_fcs_err;		/* RX packets with bad FCS */
	u32 rx_len_err;		/* RX packets with length != actual size */
	u32 rx_byte_cnt;	/* good bytes received. FCS is NOT included */
	u32 rx_runt;		/* RX packets < 64 bytes with good FCS */
	u32 rx_frag;		/* RX packets < 64 bytes with bad FCS */
	u32 rx_sz_64;		/* 64 byte RX packets */
	u32 rx_sz_65_127;
	u32 rx_sz_128_255;
	u32 rx_sz_256_511;
	u32 rx_sz_512_1023;
	u32 rx_sz_1024_1518;
	u32 rx_sz_1519_max;	/* 1519 byte to MTU RX packets */
	u32 rx_sz_ov;		/* truncated RX packets > MTU */
	u32 rx_rxf_ov;		/* frames dropped due to RX FIFO overflow */
	u32 rx_rrd_ov;		/* frames dropped due to RRD overflow */
	u32 rx_align_err;	/* alignment errors */
	u32 rx_bcast_byte_cnt;	/* RX broadcast bytes, excluding FCS */
	u32 rx_mcast_byte_cnt;	/* RX multicast bytes, excluding FCS */
	u32 rx_err_addr;	/* packets dropped due to address filtering */

	/* tx */
	u32 tx_ok;		/* good TX packets */
	u32 tx_bcast;		/* good TX broadcast packets */
	u32 tx_mcast;		/* good TX multicast packets */
	u32 tx_pause;		/* TX pause frames */
	u32 tx_exc_defer;	/* TX packets deferred excessively */
	u32 tx_ctrl;		/* TX control frames, excluding pause frames */
	u32 tx_defer;		/* TX packets deferred */
	u32 tx_byte_cnt;	/* bytes transmitted, FCS is NOT included */
	u32 tx_sz_64;		/* 64 byte TX packets */
	u32 tx_sz_65_127;
	u32 tx_sz_128_255;
	u32 tx_sz_256_511;
	u32 tx_sz_512_1023;
	u32 tx_sz_1024_1518;
	u32 tx_sz_1519_max;	/* 1519 byte to MTU TX packets */
	u32 tx_1_col;		/* packets TX after a single collision */
	u32 tx_2_col;		/* packets TX after multiple collisions */
	u32 tx_late_col;	/* TX packets with late collisions */
	u32 tx_abort_col;	/* TX packets aborted w/excessive collisions */
	u32 tx_underrun;	/* TX packets aborted due to TX FIFO underrun
				 * or TRD FIFO underrun */
	u32 tx_rd_eop;		/* reads beyond the EOP into the next frame
				 * when TRD was not written timely */
	u32 tx_len_err;		/* TX packets where length != actual size */
	u32 tx_trunc;		/* TX packets truncated due to size > MTU */
	u32 tx_bcast_byte;	/* broadcast bytes transmitted, excluding FCS */
	u32 tx_mcast_byte;	/* multicast bytes transmitted, excluding FCS */
	u32 smb_updated;	/* 1: SMB Updated. This is used by software to
				 * indicate the statistics update. Software
				 * should clear this bit after retrieving the
				 * statistics information. */
};

/* Coalescing Message Block */
struct coals_msg_block {
	u32 int_stats;		/* interrupt status */
	u16 rrd_prod_idx;	/* TRD Producer Index. */
	u16 rfd_cons_idx;	/* RFD Consumer Index. */
	u16 update;		/* Selene sets this bit every time it DMAs the
				 * CMB to host memory. Software should clear
				 * this bit when CMB info is processed. */
	u16 tpd_cons_idx;	/* TPD Consumer Index. */
};

/* RRD descriptor */
struct rx_return_desc {
	u8 num_buf;	/* Number of RFD buffers used by the received packet */
	u8 resved;
	u16 buf_indx;	/* RFD Index of the first buffer */
	union {
		u32 valid;
		struct {
			u16 rx_chksum;
			u16 pkt_size;
		} xsum_sz;
	} xsz;

	u16 pkt_flg;	/* Packet flags */
	u16 err_flg;	/* Error flags */
	u16 resved2;
	u16 vlan_tag;	/* VLAN TAG */
};

Annotation

Implementation Notes