drivers/net/ethernet/freescale/fman/fman.h

Source file repositories/reference/linux-study-clean/drivers/net/ethernet/freescale/fman/fman.h

File Facts

System
Linux kernel
Corpus path
drivers/net/ethernet/freescale/fman/fman.h
Extension
.h
Size
13065 bytes
Lines
385
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 fman_rev_info {
	u8 major;			/* Major revision */
	u8 minor;			/* Minor revision */
};

enum fman_exceptions {
	FMAN_EX_DMA_BUS_ERROR = 0,	/* DMA bus error. */
	FMAN_EX_DMA_READ_ECC,		/* Read Buffer ECC error */
	FMAN_EX_DMA_SYSTEM_WRITE_ECC,	/* Write Buffer ECC err on sys side */
	FMAN_EX_DMA_FM_WRITE_ECC,	/* Write Buffer ECC error on FM side */
	FMAN_EX_DMA_SINGLE_PORT_ECC,	/* Single Port ECC error on FM side */
	FMAN_EX_FPM_STALL_ON_TASKS,	/* Stall of tasks on FPM */
	FMAN_EX_FPM_SINGLE_ECC,		/* Single ECC on FPM. */
	FMAN_EX_FPM_DOUBLE_ECC,		/* Double ECC error on FPM ram access */
	FMAN_EX_QMI_SINGLE_ECC,	/* Single ECC on QMI. */
	FMAN_EX_QMI_DOUBLE_ECC,	/* Double bit ECC occurred on QMI */
	FMAN_EX_QMI_DEQ_FROM_UNKNOWN_PORTID,/* DeQ from unknown port id */
	FMAN_EX_BMI_LIST_RAM_ECC,	/* Linked List RAM ECC error */
	FMAN_EX_BMI_STORAGE_PROFILE_ECC,/* storage profile */
	FMAN_EX_BMI_STATISTICS_RAM_ECC,/* Statistics RAM ECC Err Enable */
	FMAN_EX_BMI_DISPATCH_RAM_ECC,	/* Dispatch RAM ECC Error Enable */
	FMAN_EX_IRAM_ECC,		/* Double bit ECC occurred on IRAM */
	FMAN_EX_MURAM_ECC		/* Double bit ECC occurred on MURAM */
};

/* Parse results memory layout */
struct fman_prs_result {
	u8 lpid;		/* Logical port id */
	u8 shimr;		/* Shim header result  */
	__be16 l2r;		/* Layer 2 result */
	__be16 l3r;		/* Layer 3 result */
	u8 l4r;		/* Layer 4 result */
	u8 cplan;		/* Classification plan id */
	__be16 nxthdr;		/* Next Header  */
	__be16 cksum;		/* Running-sum */
	/* Flags&fragment-offset field of the last IP-header */
	__be16 flags_frag_off;
	/* Routing type field of a IPV6 routing extension header */
	u8 route_type;
	/* Routing Extension Header Present; last bit is IP valid */
	u8 rhp_ip_valid;
	u8 shim_off[2];		/* Shim offset */
	u8 ip_pid_off;		/* IP PID (last IP-proto) offset */
	u8 eth_off;		/* ETH offset */
	u8 llc_snap_off;	/* LLC_SNAP offset */
	u8 vlan_off[2];		/* VLAN offset */
	u8 etype_off;		/* ETYPE offset */
	u8 pppoe_off;		/* PPP offset */
	u8 mpls_off[2];		/* MPLS offset */
	u8 ip_off[2];		/* IP offset */
	u8 gre_off;		/* GRE offset */
	u8 l4_off;		/* Layer 4 offset */
	u8 nxthdr_off;		/* Parser end point */
};

/* A structure for defining buffer prefix area content. */
struct fman_buffer_prefix_content {
	/* Number of bytes to be left at the beginning of the external
	 * buffer; Note that the private-area will start from the base
	 * of the buffer address.
	 */
	u16 priv_data_size;
	/* true to pass the parse result to/from the FM;
	 * User may use FM_PORT_GetBufferPrsResult() in
	 * order to get the parser-result from a buffer.
	 */
	bool pass_prs_result;
	/* true to pass the timeStamp to/from the FM User */
	bool pass_time_stamp;
	/* true to pass the KG hash result to/from the FM User may
	 * use FM_PORT_GetBufferHashResult() in order to get the
	 * parser-result from a buffer.
	 */
	bool pass_hash_result;
	/* Add all other Internal-Context information: AD,
	 * hash-result, key, etc.
	 */
	u16 data_align;
};

/* A structure of information about each of the external
 * buffer pools used by a port or storage-profile.
 */
struct fman_ext_pool_params {
	u8 id;		    /* External buffer pool id */
	u16 size;		    /* External buffer pool buffer size */
};

/* A structure for informing the driver about the external
 * buffer pools allocated in the BM and used by a port or a

Annotation

Implementation Notes