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

📄 xmac_ii.h

📁 这是Marvell Technology Group Ltd. 4355 (rev 12)网卡在linux下的驱动程序源代码
💻 H
📖 第 1 页 / 共 5 页
字号:
#define PHY_L_QS_AN_C		(1<<7)	/* Bit  7:	AN is Complete */#define PHY_L_QS_LLE		(7<<4)	/* Bit  6..4:	Line Length Estim. */#define PHY_L_QS_PAUSE		(1<<3)	/* Bit  3:	LP advertised Pause */#define PHY_L_QS_AS_PAUSE	(1<<2)	/* Bit  2:	LP adv. asym. Pause */#define PHY_L_QS_ISOLATE	(1<<1)	/* Bit  1:	CIM Isolated */#define PHY_L_QS_EVENT		(1<<0)	/* Bit  0:	Event has occurred *//*****  PHY_LONE_INT_ENAB	16 bit r/w	Interrupt Enable Reg *****//*****  PHY_LONE_INT_STAT	16 bit r/o	Interrupt Status Reg *****/									/* Bit 15..14:	reserved */#define PHY_L_IS_AN_F		(1<<13)	/* Bit 13:	Auto-Negotiation fault */									/* Bit 12:	not described */#define PHY_L_IS_CROSS		(1<<11)	/* Bit 11:	Crossover used */#define PHY_L_IS_POL		(1<<10)	/* Bit 10:	Polarity correct. used */#define PHY_L_IS_SS			(1<<9)	/* Bit  9:	Smart Speed Downgrade */#define PHY_L_IS_CFULL		(1<<8)	/* Bit  8:	Counter Full */#define PHY_L_IS_AN_C		(1<<7)	/* Bit  7:	AutoNeg Complete */#define PHY_L_IS_SPEED		(1<<6)	/* Bit  6:	Speed Changed */#define PHY_L_IS_DUP		(1<<5)	/* Bit  5:	Duplex Changed */#define PHY_L_IS_LS			(1<<4)	/* Bit  4:	Link Status Changed */#define PHY_L_IS_ISOL		(1<<3)	/* Bit  3:	Isolate Occurred */#define PHY_L_IS_MDINT		(1<<2)	/* Bit  2: (ro)	STAT: MII Int Pending */#define PHY_L_IS_INTEN		(1<<1)	/* Bit  1:	ENAB: Enable IRQs */#define PHY_L_IS_FORCE		(1<<0)	/* Bit  0:	ENAB: Force Interrupt *//* int. mask */#define PHY_L_DEF_MSK		(PHY_L_IS_LS | PHY_L_IS_ISOL | PHY_L_IS_INTEN)/*****  PHY_LONE_LED_CFG	16 bit r/w	LED Configuration Reg *****/#define PHY_L_LC_LEDC		(3<<14)	/* Bit 15..14:	Col/Blink/On/Off */#define PHY_L_LC_LEDR		(3<<12)	/* Bit 13..12:	Rx/Blink/On/Off */#define PHY_L_LC_LEDT		(3<<10)	/* Bit 11..10:	Tx/Blink/On/Off */#define PHY_L_LC_LEDG		(3<<8)	/* Bit  9..8:	Giga/Blink/On/Off */#define PHY_L_LC_LEDS		(3<<6)	/* Bit  7..6:	10-100/Blink/On/Off */#define PHY_L_LC_LEDL		(3<<4)	/* Bit  5..4:	Link/Blink/On/Off */#define PHY_L_LC_LEDF		(3<<2)	/* Bit  3..2:	Duplex/Blink/On/Off */#define PHY_L_LC_PSTRECH	(1<<1)	/* Bit  1:	Strech LED Pulses */#define PHY_L_LC_FREQ		(1<<0)	/* Bit  0:	30/100 ms *//*****  PHY_LONE_PORT_CTRL	16 bit r/w	Port Control Reg *****/#define PHY_L_PC_TX_TCLK	(1<<15)	/* Bit 15:	Enable TX_TCLK */									/* Bit 14:	reserved */#define PHY_L_PC_ALT_NP		(1<<13)	/* Bit 14:	Alternate Next Page */#define PHY_L_PC_GMII_ALT	(1<<12)	/* Bit 13:	Alternate GMII driver */									/* Bit 11:	reserved */#define PHY_L_PC_TEN_CRS	(1<<10)	/* Bit 10:	Extend CRS*/									/* Bit  9..0:	not described *//*****  PHY_LONE_CIM		16 bit r/o	CIM Reg *****/#define PHY_L_CIM_ISOL		(0xff<<8)	/* Bit 15..8:	Isolate Count */#define PHY_L_CIM_FALSE_CAR	0xff		/* Bit  7..0:	False Carrier Count *//* * Pause Bits (PHY_L_AN_ASP and PHY_L_AN_PC) encoding */#define PHY_L_P_NO_PAUSE	(0<<10)	/* Bit 11..10:	no Pause Mode */#define PHY_L_P_SYM_MD		(1<<10)	/* Bit 11..10:	symmetric Pause Mode */#define PHY_L_P_ASYM_MD		(2<<10)	/* Bit 11..10:	asymmetric Pause Mode */#define PHY_L_P_BOTH_MD		(3<<10)	/* Bit 11..10:	both Pause Mode *//* * National-Specific *//*****  PHY_NAT_1000T_CTRL	16 bit r/w	1000Base-T Control Reg *****/#define PHY_N_1000C_TEST	(7<<13)	/* Bit 15..13:	Test Modes */#define PHY_N_1000C_MSE		(1<<12)	/* Bit 12:	Master/Slave Enable */#define PHY_N_1000C_MSC		(1<<11)	/* Bit 11:	M/S Configuration */#define PHY_N_1000C_RD		(1<<10)	/* Bit 10:	Repeater/DTE */#define PHY_N_1000C_AFD		(1<<9)	/* Bit  9:	Advertise Full Duplex */#define PHY_N_1000C_AHD		(1<<8)	/* Bit  8:	Advertise Half Duplex */#define PHY_N_1000C_APC		(1<<7)	/* Bit  7:	Asymmetric Pause Cap. */									/* Bit  6..0:	reserved *//*****  PHY_NAT_1000T_STAT	16 bit r/o	1000Base-T Status Reg *****/#define PHY_N_1000S_MSF		(1<<15)	/* Bit 15:	Master/Slave Fault */#define PHY_N_1000S_MSR		(1<<14)	/* Bit 14:	Master/Slave Result */#define PHY_N_1000S_LRS		(1<<13)	/* Bit 13:	Local Receiver Status */#define PHY_N_1000S_RRS		(1<<12)	/* Bit 12:	Remote Receiver Status*/#define PHY_N_1000S_LP_FD	(1<<11)	/* Bit 11:	Link Partner can FD */#define PHY_N_1000S_LP_HD	(1<<10)	/* Bit 10:	Link Partner can HD */#define PHY_N_1000C_LP_APC	(1<<9)	/* Bit  9:	LP Asym. Pause Cap. */									/* Bit  8:	reserved */#define PHY_N_1000S_IEC		0xff	/* Bit  7..0:	Idle Error Count *//*****  PHY_NAT_EXT_STAT	16 bit r/o	Extended Status Register *****/#define PHY_N_ES_X_FD_CAP	(1<<15)	/* Bit 15:	1000Base-X FD capable */#define PHY_N_ES_X_HD_CAP	(1<<14)	/* Bit 14:	1000Base-X HD capable */#define PHY_N_ES_T_FD_CAP	(1<<13)	/* Bit 13:	1000Base-T FD capable */#define PHY_N_ES_T_HD_CAP	(1<<12)	/* Bit 12:	1000Base-T HD capable */									/* Bit 11..0:	reserved *//* todo: those are still missing *//*****  PHY_NAT_EXT_CTRL1	16 bit r/o	Extended Control Reg1 *****//*****  PHY_NAT_Q_STAT1		16 bit r/o	Quick Status Reg1 *****//*****  PHY_NAT_10B_OP		16 bit r/o	10Base-T Operations Reg *****//*****  PHY_NAT_EXT_CTRL2	16 bit r/o	Extended Control Reg1 *****//*****  PHY_NAT_Q_STAT2		16 bit r/o	Quick Status Reg2 *****//*****  PHY_NAT_PHY_ADDR	16 bit r/o	PHY Address Register *****//* * Marvell-Specific *//*****  PHY_MARV_AUNE_ADV	16 bit r/w	Auto-Negotiation Advertisement *****//*****  PHY_MARV_AUNE_LP	16 bit r/w	Link Partner Ability Reg *****/#define PHY_M_AN_NXT_PG		BIT_15S	/* Request Next Page */#define PHY_M_AN_ACK		BIT_14S	/* (ro)	Acknowledge Received */#define PHY_M_AN_RF			BIT_13S	/* Remote Fault */								/* Bit 12:	reserved */#define PHY_M_AN_ASP		BIT_11S	/* Asymmetric Pause */#define PHY_M_AN_PC			BIT_10S	/* MAC Pause implemented */#define PHY_M_AN_100_T4		BIT_9S	/* Not cap. 100Base-T4 (always 0) */#define PHY_M_AN_100_FD		BIT_8S	/* Advertise 100Base-TX Full Duplex */#define PHY_M_AN_100_HD		BIT_7S	/* Advertise 100Base-TX Half Duplex */#define PHY_M_AN_10_FD		BIT_6S	/* Advertise 10Base-TX Full Duplex */#define PHY_M_AN_10_HD		BIT_5S	/* Advertise 10Base-TX Half Duplex */#define PHY_M_AN_SEL_MSK	(0x1f<<4)	/* Bit  4.. 0: Selector Field Mask */#define PHY_M_AN_100_FD_HD	(PHY_M_AN_100_FD | PHY_M_AN_100_HD)#define PHY_M_AN_10_FD_HD	(PHY_M_AN_10_FD | PHY_M_AN_10_HD)/* special defines for FIBER (88E1040S only) */#define PHY_M_AN_ASP_X		BIT_8S	/* Asymmetric Pause */#define PHY_M_AN_PC_X		BIT_7S	/* MAC Pause implemented */#define PHY_M_AN_1000X_AHD	BIT_6S	/* Advertise 10000Base-X Half Duplex */#define PHY_M_AN_1000X_AFD	BIT_5S	/* Advertise 10000Base-X Full Duplex *//* Pause Bits (PHY_M_AN_ASP_X and PHY_M_AN_PC_X) encoding */#define PHY_M_P_NO_PAUSE_X	(0<<7)	/* Bit  8.. 7:	no Pause Mode */#define PHY_M_P_SYM_MD_X	(1<<7)	/* Bit  8.. 7:	symmetric Pause Mode */#define PHY_M_P_ASYM_MD_X	(2<<7)	/* Bit  8.. 7:	asymmetric Pause Mode */#define PHY_M_P_BOTH_MD_X	(3<<7)	/* Bit  8.. 7:	both Pause Mode *//*****  PHY_MARV_1000T_CTRL	16 bit r/w	1000Base-T Control Reg *****/#define PHY_M_1000C_TEST	(7<<13)	/* Bit 15..13:	Test Modes */#define PHY_M_1000C_MSE		BIT_12S	/* Manual Master/Slave Enable */#define PHY_M_1000C_MSC		BIT_11S	/* M/S Configuration (1=Master) */#define PHY_M_1000C_MPD		BIT_10S	/* Multi-Port Device */#define PHY_M_1000C_AFD		BIT_9S	/* Advertise Full Duplex */#define PHY_M_1000C_AHD		BIT_8S	/* Advertise Half Duplex */									/* Bit  7..0:	reserved *//*****  PHY_MARV_PHY_CTRL	16 bit r/w	PHY Specific Ctrl Reg *****/#define PHY_M_PC_TX_FFD_MSK	(3<<14)	/* Bit 15..14: Tx FIFO Depth Mask */#define PHY_M_PC_RX_FFD_MSK	(3<<12)	/* Bit 13..12: Rx FIFO Depth Mask */#define PHY_M_PC_ASS_CRS_TX	BIT_11S	/* Assert CRS on Transmit */#define PHY_M_PC_FL_GOOD	BIT_10S	/* Force Link Good */#define PHY_M_PC_EN_DET_MSK	(3<<8)	/* Bit  9.. 8: Energy Detect Mask */#define PHY_M_PC_ENA_EXT_D	BIT_7S	/* Enable Ext. Distance (10BT) */#define PHY_M_PC_MDIX_MSK	(3<<5)	/* Bit  6.. 5: MDI/MDIX Config. Mask */#define PHY_M_PC_DIS_125CLK	BIT_4S	/* Disable 125 CLK */#define PHY_M_PC_MAC_POW_UP	BIT_3S	/* MAC Power up */#define PHY_M_PC_SQE_T_ENA	BIT_2S	/* SQE Test Enabled */#define PHY_M_PC_POL_R_DIS	BIT_1S	/* Polarity Reversal Disabled */#define PHY_M_PC_DIS_JABBER	BIT_0S	/* Disable Jabber */#define PHY_M_PC_EN_DET			SHIFT8(2)	/* Energy Detect (Mode 1) */#define PHY_M_PC_EN_DET_PLUS	SHIFT8(3)	/* Energy Detect Plus (Mode 2) */#define PHY_M_PC_MDI_XMODE(x)	(SHIFT5(x) & PHY_M_PC_MDIX_MSK)#define PHY_M_PC_MAN_MDI	0		/* 00 = Manual MDI configuration */#define PHY_M_PC_MAN_MDIX	1		/* 01 = Manual MDIX configuration */#define PHY_M_PC_ENA_AUTO	3		/* 11 = Enable Automatic Crossover *//* for Yukon-2/-EC Ultra Gigabit Ethernet PHY (88E1112/88E1149 only) */#define PHY_M_PC_DIS_LINK_P	BIT_15S	/* Disable Link Pulses */#define PHY_M_PC_DSC_MSK	(7<<12)	/* Bit 14..12:	Downshift Counter */#define PHY_M_PC_DOWN_S_ENA	BIT_11S	/* Downshift Enable */									/* !!! Errata in spec. (1 = disable) */#define PHY_M_PC_DSC(x)			(SHIFT12(x) & PHY_M_PC_DSC_MSK)										/* 000=1x; 001=2x; 010=3x; 011=4x */										/* 100=5x; 101=6x; 110=7x; 111=8x *//* for Yukon-EC Ultra Gigabit Ethernet PHY (88E1149 only) */								/* Bit  4:	reserved */#define PHY_M_PC_COP_TX_DIS	BIT_3S	/* Copper Transmitter Disable */#define PHY_M_PC_POW_D_ENA	BIT_2S	/* Power Down Enable *//* for 10/100 Fast Ethernet PHY (88E3082 only) */#define PHY_M_PC_ENA_DTE_DT	BIT_15S	/* Enable Data Terminal Equ. (DTE) Detect */#define PHY_M_PC_ENA_ENE_DT	BIT_14S	/* Enable Energy Detect (sense & pulse) */#define PHY_M_PC_DIS_NLP_CK	BIT_13S	/* Disable Normal Link Puls (NLP) Check */#define PHY_M_PC_ENA_LIP_NP	BIT_12S	/* Enable Link Partner Next Page Reg. */#define PHY_M_PC_DIS_NLP_GN	BIT_11S	/* Disable Normal Link Puls Generation */#define PHY_M_PC_DIS_SCRAMB	BIT_9S	/* Disable Scrambler */#define PHY_M_PC_DIS_FEFI	BIT_8S	/* Disable Far End Fault Indic. (FEFI) */#define PHY_M_PC_SH_TP_SEL	BIT_6S	/* Shielded Twisted Pair Select */#define PHY_M_PC_RX_FD_MSK	(3<<2)	/* Bit  3.. 2: Rx FIFO Depth Mask *//*****  PHY_MARV_PHY_STAT	16 bit r/o	PHY Specific Status Reg *****/#define PHY_M_PS_SPEED_MSK	(3<<14)	/* Bit 15..14: Speed Mask */#define PHY_M_PS_SPEED_1000	BIT_15S	/*		10 = 1000 Mbps */#define PHY_M_PS_SPEED_100	BIT_14S	/*		01 =  100 Mbps */#define PHY_M_PS_SPEED_10	0		/*		00 =   10 Mbps */#define PHY_M_PS_FULL_DUP	BIT_13S	/* Full Duplex */#define PHY_M_PS_PAGE_REC	BIT_12S	/* Page Received */#define PHY_M_PS_SPDUP_RES	BIT_11S	/* Speed & Duplex Resolved */#define PHY_M_PS_LINK_UP	BIT_10S	/* Link Up */#define PHY_M_PS_CABLE_MSK	(7<<7)	/* Bit  9.. 7: Cable Length Mask */#define PHY_M_PS_MDI_X_STAT	BIT_6S	/* MDI Crossover Stat (1=MDIX) */#define PHY_M_PS_DOWNS_STAT	BIT_5S	/* Downshift Status (1=downshift) */#define PHY_M_PS_ENDET_STAT	BIT_4S	/* Energy Detect Status (1=sleep) */#define PHY_M_PS_TX_P_EN	BIT_3S	/* Tx Pause Enabled */#define PHY_M_PS_RX_P_EN	BIT_2S	/* Rx Pause Enabled */#define PHY_M_PS_POL_REV	BIT_1S	/* Polarity Reversed */#define PHY_M_PS_JABBER		BIT_0S	/* Jabber */#define PHY_M_PS_PAUSE_MSK	(PHY_M_PS_TX_P_EN | PHY_M_PS_RX_P_EN)/* for 10/100 Fast Ethernet PHY (88E3082 only) */#define PHY_M_PS_DTE_DETECT	BIT_15S	/* Data Terminal Equipment (DTE) Detected */#define PHY_M_PS_RES_SPEED	BIT_14S	/* Resolved Speed (1=100 Mbps, 0=10 Mbps *//*****  PHY_MARV_INT_MASK	16 bit r/w	Interrupt Mask Reg *****//*****  PHY_MARV_INT_STAT	16 bit r/o	Interrupt Status Reg *****/#define PHY_M_IS_AN_ERROR	BIT_15S	/* Auto-Negotiation Error */#define PHY_M_IS_LSP_CHANGE	BIT_14S	/* Link Speed Changed */#define PHY_M_IS_DUP_CHANGE	BIT_13S	/* Duplex Mode Changed */#define PHY_M_IS_AN_PR		BIT_12S	/* Page Received */#define PHY_M_IS_AN_COMPL	BIT_11S	/* Auto-Negotiation Completed */#define PHY_M_IS_LST_CHANGE	BIT_10S	/* Link Status Changed */#define PHY_M_IS_SYMB_ERROR	BIT_9S	/* Symbol Error */#define PHY_M_IS_FALSE_CARR	BIT_8S	/* False Carrier */#define PHY_M_IS_FIFO_ERROR	BIT_7S	/* FIFO Overflow/Underrun Error */#define PHY_M_IS_MDI_CHANGE	BIT_6S	/* MDI Crossover Changed */#define PHY_M_IS_DOWNSH_DET	BIT_5S	/* Downshift Detected */#define PHY_M_IS_END_CHANGE	BIT_4S	/* Energy Detect Changed */								/* Bit   3:	reserved */#define PHY_M_IS_DTE_CHANGE	BIT_2S	/* DTE Power Det. Status Changed */									/* (88E1111 only) */#define PHY_M_IS_POL_CHANGE	BIT_1S	/* Polarity Changed */#define PHY_M_IS_JABBER		BIT_0S	/* Jabber */#define PHY_M_DEF_MSK		(PHY_M_IS_AN_ERROR | PHY_M_IS_AN_PR | \							PHY_M_IS_LST_CHANGE | PHY_M_IS_FIFO_ERROR | \							PHY_M_IS_END_CHANGE)/*****  PHY_MARV_EXT_CTRL	16 bit r/w	Ext. PHY Specific Ctrl *****/#define PHY_M_EC_ENA_BC_EXT	BIT_15S	/* Enable Block Carr. Ext. (88E1111 only) */#define PHY_M_EC_ENA_LIN_LB	BIT_14S	/* Enable Line Loopback (88E1111 only) */								/* Bit 13:	reserved */#define PHY_M_EC_DIS_LINK_P	BIT_12S	/* Disable Link Pulses (88E1111 only) */#define PHY_M_EC_M_DSC_MSK	(3<<10)	/* Bit 11..10:	Master Downshift Counter */									/* (88E1040 Rev.C0 only) */#define PHY_M_EC_S_DSC_MSK	(3<<8)	/* Bit  9.. 8:	Slave  Downshift Counter */									/* (88E1040 Rev.C0 only) */#define PHY_M_EC_DSC_MSK_2	(7<<9)	/* Bit 11.. 9:	Downshift Counter */									/* (88E1040 Rev.D0 and higher) */#define PHY_M_EC_DOWN_S_ENA	BIT_8S	/* Downshift Ena

⌨️ 快捷键说明

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