⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ucc_geth.h

📁 linux 内核源代码
💻 H
📖 第 1 页 / 共 4 页
字号:
#define UCC_GETH_UTFTT_GIGA_INIT                0x400/*0x40*/	/* */#define UCC_GETH_REMODER_INIT                   0	/* bits that must be							   set */#define UCC_GETH_TEMODER_INIT                   0xC000	/* bits that must */#define UCC_GETH_UPSMR_INIT                     (UPSMR_RES1)	/* Start value								   for this								   register */#define UCC_GETH_MACCFG1_INIT                   0#define UCC_GETH_MACCFG2_INIT                   (MACCFG2_RESERVED_1)/* Ethernet Address Type. */enum enet_addr_type {	ENET_ADDR_TYPE_INDIVIDUAL,	ENET_ADDR_TYPE_GROUP,	ENET_ADDR_TYPE_BROADCAST};/* UCC GETH 82xx Ethernet Address Recognition Location */enum ucc_geth_enet_address_recognition_location {	UCC_GETH_ENET_ADDRESS_RECOGNITION_LOCATION_STATION_ADDRESS,/* station								      address */	UCC_GETH_ENET_ADDRESS_RECOGNITION_LOCATION_PADDR_FIRST,	/* additional								   station								   address								   paddr1 */	UCC_GETH_ENET_ADDRESS_RECOGNITION_LOCATION_PADDR2,	/* additional								   station								   address								   paddr2 */	UCC_GETH_ENET_ADDRESS_RECOGNITION_LOCATION_PADDR3,	/* additional								   station								   address								   paddr3 */	UCC_GETH_ENET_ADDRESS_RECOGNITION_LOCATION_PADDR_LAST,	/* additional								   station								   address								   paddr4 */	UCC_GETH_ENET_ADDRESS_RECOGNITION_LOCATION_GROUP_HASH,	/* group hash */	UCC_GETH_ENET_ADDRESS_RECOGNITION_LOCATION_INDIVIDUAL_HASH /* individual								      hash */};/* UCC GETH vlan operation tagged */enum ucc_geth_vlan_operation_tagged {	UCC_GETH_VLAN_OPERATION_TAGGED_NOP = 0x0,	/* Tagged - nop */	UCC_GETH_VLAN_OPERATION_TAGGED_REPLACE_VID_PORTION_OF_Q_TAG		= 0x1,	/* Tagged - replace vid portion of q tag */	UCC_GETH_VLAN_OPERATION_TAGGED_IF_VID0_REPLACE_VID_WITH_DEFAULT_VALUE		= 0x2,	/* Tagged - if vid0 replace vid with default value  */	UCC_GETH_VLAN_OPERATION_TAGGED_EXTRACT_Q_TAG_FROM_FRAME		= 0x3	/* Tagged - extract q tag from frame */};/* UCC GETH vlan operation non-tagged */enum ucc_geth_vlan_operation_non_tagged {	UCC_GETH_VLAN_OPERATION_NON_TAGGED_NOP = 0x0,	/* Non tagged - nop */	UCC_GETH_VLAN_OPERATION_NON_TAGGED_Q_TAG_INSERT = 0x1	/* Non tagged -								   q tag insert								 */};/* UCC GETH Rx Quality of Service Mode */enum ucc_geth_qos_mode {	UCC_GETH_QOS_MODE_DEFAULT = 0x0,	/* default queue */	UCC_GETH_QOS_MODE_QUEUE_NUM_FROM_L2_CRITERIA = 0x1,	/* queue								   determined								   by L2								   criteria */	UCC_GETH_QOS_MODE_QUEUE_NUM_FROM_L3_CRITERIA = 0x2	/* queue								   determined								   by L3								   criteria */};/* UCC GETH Statistics Gathering Mode - These are bit flags, 'or' them together   for combined functionality */enum ucc_geth_statistics_gathering_mode {	UCC_GETH_STATISTICS_GATHERING_MODE_NONE = 0x00000000,	/* No								   statistics								   gathering */	UCC_GETH_STATISTICS_GATHERING_MODE_HARDWARE = 0x00000001,/* Enable								    hardware								    statistics								    gathering								  */	UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_TX = 0x00000004,/*Enable								      firmware								      tx								      statistics								      gathering								     */	UCC_GETH_STATISTICS_GATHERING_MODE_FIRMWARE_RX = 0x00000008/* Enable								      firmware								      rx								      statistics								      gathering								    */};/* UCC GETH Pad and CRC Mode - Note, Padding without CRC is not possible */enum ucc_geth_maccfg2_pad_and_crc_mode {	UCC_GETH_PAD_AND_CRC_MODE_NONE		= MACCFG2_PAD_AND_CRC_MODE_NONE,	/* Neither Padding							   short frames							   nor CRC */	UCC_GETH_PAD_AND_CRC_MODE_CRC_ONLY		= MACCFG2_PAD_AND_CRC_MODE_CRC_ONLY,	/* Append							   CRC only */	UCC_GETH_PAD_AND_CRC_MODE_PAD_AND_CRC =	    MACCFG2_PAD_AND_CRC_MODE_PAD_AND_CRC};/* UCC GETH upsmr Flow Control Mode */enum ucc_geth_flow_control_mode {	UPSMR_AUTOMATIC_FLOW_CONTROL_MODE_NONE = 0x00000000,	/* No automatic								   flow control								 */	UPSMR_AUTOMATIC_FLOW_CONTROL_MODE_PAUSE_WHEN_EMERGENCY		= 0x00004000	/* Send pause frame when RxFIFO reaches its				   emergency threshold */};/* UCC GETH number of threads */enum ucc_geth_num_of_threads {	UCC_GETH_NUM_OF_THREADS_1 = 0x1,	/* 1 */	UCC_GETH_NUM_OF_THREADS_2 = 0x2,	/* 2 */	UCC_GETH_NUM_OF_THREADS_4 = 0x0,	/* 4 */	UCC_GETH_NUM_OF_THREADS_6 = 0x3,	/* 6 */	UCC_GETH_NUM_OF_THREADS_8 = 0x4	/* 8 */};/* UCC GETH number of station addresses */enum ucc_geth_num_of_station_addresses {	UCC_GETH_NUM_OF_STATION_ADDRESSES_1,	/* 1 */	UCC_GETH_NUM_OF_STATION_ADDRESSES_5	/* 5 */};/* UCC GETH 82xx Ethernet Address Container */struct enet_addr_container {	u8 address[ENET_NUM_OCTETS_PER_ADDRESS];	/* ethernet address */	enum ucc_geth_enet_address_recognition_location location;	/* location in								   82xx address								   recognition								   hardware */	struct list_head node;};#define ENET_ADDR_CONT_ENTRY(ptr) list_entry(ptr, struct enet_addr_container, node)/* UCC GETH Termination Action Descriptor (TAD) structure. */struct ucc_geth_tad_params {	int rx_non_dynamic_extended_features_mode;	int reject_frame;	enum ucc_geth_vlan_operation_tagged vtag_op;	enum ucc_geth_vlan_operation_non_tagged vnontag_op;	enum ucc_geth_qos_mode rqos;	u8 vpri;	u16 vid;};/* GETH protocol initialization structure */struct ucc_geth_info {	struct ucc_fast_info uf_info;	u8 numQueuesTx;	u8 numQueuesRx;	int ipCheckSumCheck;	int ipCheckSumGenerate;	int rxExtendedFiltering;	u32 extendedFilteringChainPointer;	u16 typeorlen;	int dynamicMaxFrameLength;	int dynamicMinFrameLength;	u8 nonBackToBackIfgPart1;	u8 nonBackToBackIfgPart2;	u8 miminumInterFrameGapEnforcement;	u8 backToBackInterFrameGap;	int ipAddressAlignment;	int lengthCheckRx;	u32 mblinterval;	u16 nortsrbytetime;	u8 fracsiz;	u8 strictpriorityq;	u8 txasap;	u8 extrabw;	int miiPreambleSupress;	u8 altBebTruncation;	int altBeb;	int backPressureNoBackoff;	int noBackoff;	int excessDefer;	u8 maxRetransmission;	u8 collisionWindow;	int pro;	int cap;	int rsh;	int rlpb;	int cam;	int bro;	int ecm;	int receiveFlowControl;	int transmitFlowControl;	u8 maxGroupAddrInHash;	u8 maxIndAddrInHash;	u8 prel;	u16 maxFrameLength;	u16 minFrameLength;	u16 maxD1Length;	u16 maxD2Length;	u16 vlantype;	u16 vlantci;	u32 ecamptr;	u32 eventRegMask;	u16 pausePeriod;	u16 extensionField;	u8 phy_address;	u32 mdio_bus;	u8 weightfactor[NUM_TX_QUEUES];	u8 interruptcoalescingmaxvalue[NUM_RX_QUEUES];	u8 l2qt[UCC_GETH_VLAN_PRIORITY_MAX];	u8 l3qt[UCC_GETH_IP_PRIORITY_MAX];	u32 vtagtable[UCC_GETH_TX_VTAG_TABLE_ENTRY_MAX];	u8 iphoffset[TX_IP_OFFSET_ENTRY_MAX];	u16 bdRingLenTx[NUM_TX_QUEUES];	u16 bdRingLenRx[NUM_RX_QUEUES];	enum ucc_geth_num_of_station_addresses numStationAddresses;	enum qe_fltr_largest_external_tbl_lookup_key_size	    largestexternallookupkeysize;	enum ucc_geth_statistics_gathering_mode statisticsMode;	enum ucc_geth_vlan_operation_tagged vlanOperationTagged;	enum ucc_geth_vlan_operation_non_tagged vlanOperationNonTagged;	enum ucc_geth_qos_mode rxQoSMode;	enum ucc_geth_flow_control_mode aufc;	enum ucc_geth_maccfg2_pad_and_crc_mode padAndCrc;	enum ucc_geth_num_of_threads numThreadsTx;	enum ucc_geth_num_of_threads numThreadsRx;	enum qe_risc_allocation riscTx;	enum qe_risc_allocation riscRx;};/* structure representing UCC GETH */struct ucc_geth_private {	struct ucc_geth_info *ug_info;	struct ucc_fast_private *uccf;	struct net_device *dev;	struct napi_struct napi;	struct ucc_geth *ug_regs;	struct ucc_geth_init_pram *p_init_enet_param_shadow;	struct ucc_geth_exf_global_pram *p_exf_glbl_param;	u32 exf_glbl_param_offset;	struct ucc_geth_rx_global_pram *p_rx_glbl_pram;	u32 rx_glbl_pram_offset;	struct ucc_geth_tx_global_pram *p_tx_glbl_pram;	u32 tx_glbl_pram_offset;	struct ucc_geth_send_queue_mem_region *p_send_q_mem_reg;	u32 send_q_mem_reg_offset;	struct ucc_geth_thread_data_tx *p_thread_data_tx;	u32 thread_dat_tx_offset;	struct ucc_geth_thread_data_rx *p_thread_data_rx;	u32 thread_dat_rx_offset;	struct ucc_geth_scheduler *p_scheduler;	u32 scheduler_offset;	struct ucc_geth_tx_firmware_statistics_pram *p_tx_fw_statistics_pram;	u32 tx_fw_statistics_pram_offset;	struct ucc_geth_rx_firmware_statistics_pram *p_rx_fw_statistics_pram;	u32 rx_fw_statistics_pram_offset;	struct ucc_geth_rx_interrupt_coalescing_table *p_rx_irq_coalescing_tbl;	u32 rx_irq_coalescing_tbl_offset;	struct ucc_geth_rx_bd_queues_entry *p_rx_bd_qs_tbl;	u32 rx_bd_qs_tbl_offset;	u8 *p_tx_bd_ring[NUM_TX_QUEUES];	u32 tx_bd_ring_offset[NUM_TX_QUEUES];	u8 *p_rx_bd_ring[NUM_RX_QUEUES];	u32 rx_bd_ring_offset[NUM_RX_QUEUES];	u8 *confBd[NUM_TX_QUEUES];	u8 *txBd[NUM_TX_QUEUES];	u8 *rxBd[NUM_RX_QUEUES];	int badFrame[NUM_RX_QUEUES];	u16 cpucount[NUM_TX_QUEUES];	volatile u16 *p_cpucount[NUM_TX_QUEUES];	int indAddrRegUsed[NUM_OF_PADDRS];	u8 paddr[NUM_OF_PADDRS][ENET_NUM_OCTETS_PER_ADDRESS];	/* ethernet address */	u8 numGroupAddrInHash;	u8 numIndAddrInHash;	u8 numIndAddrInReg;	int rx_extended_features;	int rx_non_dynamic_extended_features;	struct list_head conf_skbs;	struct list_head group_hash_q;	struct list_head ind_hash_q;	u32 saved_uccm;	spinlock_t lock;	/* pointers to arrays of skbuffs for tx and rx */	struct sk_buff **tx_skbuff[NUM_TX_QUEUES];	struct sk_buff **rx_skbuff[NUM_RX_QUEUES];	/* indices pointing to the next free sbk in skb arrays */	u16 skb_curtx[NUM_TX_QUEUES];	u16 skb_currx[NUM_RX_QUEUES];	/* index of the first skb which hasn't been transmitted yet. */	u16 skb_dirtytx[NUM_TX_QUEUES];	struct ugeth_mii_info *mii_info;	struct phy_device *phydev;	phy_interface_t phy_interface;	int max_speed;	uint32_t msg_enable;	int oldspeed;	int oldduplex;	int oldlink;};#endif				/* __UCC_GETH_H__ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -