patch-2.4.23 linux-2.4.23/drivers/net/sk98lin/h/skgeinit.h

Next file: linux-2.4.23/drivers/net/sk98lin/h/skgepnm2.h
Previous file: linux-2.4.23/drivers/net/sk98lin/h/skgehwt.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.22/drivers/net/sk98lin/h/skgeinit.h linux-2.4.23/drivers/net/sk98lin/h/skgeinit.h
@@ -1,16 +1,17 @@
 /******************************************************************************
  *
  * Name:	skgeinit.h
- * Project:	GEnesis, PCI Gigabit Ethernet Adapter
- * Version:	$Revision: 1.73 $
- * Date:	$Date: 2002/11/15 12:47:25 $
+ * Project:	Gigabit Ethernet Adapters, Common Modules
+ * Version:	$Revision: 1.81 $
+ * Date:	$Date: 2003/07/04 12:30:38 $
  * Purpose:	Structures and prototypes for the GE Init Module
  *
  ******************************************************************************/
 
 /******************************************************************************
  *
- *	(C)Copyright 1998-2002 SysKonnect GmbH.
+ *	(C)Copyright 1998-2002 SysKonnect.
+ *	(C)Copyright 2002-2003 Marvell.
  *
  *	This program is free software; you can redistribute it and/or modify
  *	it under the terms of the GNU General Public License as published by
@@ -26,66 +27,98 @@
  * History:
  *
  *	$Log: skgeinit.h,v $
+ *	Revision 1.81  2003/07/04 12:30:38  rschmidt
+ *	Added SK_FAR to pointers in MAC statistic functions (for PXE)
+ *	Editorial changes
+ *	
+ *	Revision 1.80  2003/05/28 15:25:30  rschmidt
+ *	Added SK_FAR to pointers in MAC/PHY read functions (for PXE)
+ *	Minor changes to avoid LINT warnings
+ *	Editorial changes
+ *
+ *	Revision 1.79  2003/05/06 12:02:33  rschmidt
+ *	Added entry GIYukon in s_GeInit structure
+ *	Editorial changes
+ *
+ *	Revision 1.78  2003/04/28 08:59:57  rschmidt
+ *	Added entries GIValIrqMask and GITimeStampCnt in s_GeInit structure
+ *
+ *	Revision 1.77  2003/04/08 16:27:02  rschmidt
+ *	Added entry GILedBlinkCtrl in s_GeInit structure
+ *	Added defines for LED Blink Control
+ *
+ *	Revision 1.76  2003/03/31 07:21:01  mkarl
+ *	Added PGmANegAdv to SK_GEPORT.
+ *	Corrected Copyright.
+ *
+ *	Revision 1.75  2003/02/05 13:36:39  rschmidt
+ *	Added define SK_FACT_78	for YUKON's Host Clock of 78.12 MHz
+ *	Editorial changes
+ *
+ *	Revision 1.74  2003/01/28 09:39:16  rschmidt
+ *	Added entry GIYukonLite in s_GeInit structure
+ *	Editorial changes
+ *
  *	Revision 1.73  2002/11/15 12:47:25  rschmidt
  *	Replaced error message SKERR_HWI_E024 for Cable Diagnostic with
  *	Rx queue error in SkGeStopPort().
- *	
+ *
  *	Revision 1.72  2002/11/12 17:08:35  rschmidt
  *	Added entries for Cable Diagnostic to Port structure
  *	Added entries GIPciSlot64 and GIPciClock66 in s_GeInit structure
  *	Added error message for Cable Diagnostic
  *	Added prototypes for SkGmCableDiagStatus()
  *	Editorial changes
- *	
+ *
  *	Revision 1.71  2002/10/21 11:26:10  mkarl
  *	Changed interface of SkGeInitAssignRamToQueues().
- *	
+ *
  *	Revision 1.70  2002/10/14 08:21:32  rschmidt
  *	Changed type of GICopperType, GIVauxAvail to SK_BOOL
  *	Added entry PRxOverCnt to Port structure
  *	Added entry GIYukon32Bit in s_GeInit structure
  *	Editorial changes
- *	
+ *
  *	Revision 1.69  2002/10/09 16:57:15  mkarl
  *	Added some constants and macros for SkGeInitAssignRamToQueues().
- *	
+ *
  *	Revision 1.68  2002/09/12 08:58:51  rwahl
  *	Retrieve counters needed for XMAC errata workarounds directly because
  *	PNMI returns corrected counter values (e.g. #10620).
- *	
+ *
  *	Revision 1.67  2002/08/16 14:40:30  rschmidt
  *	Added entries GIGenesis and GICopperType in s_GeInit structure
  *	Added prototypes for SkMacHashing()
  *	Editorial changes
- *	
+ *
  *	Revision 1.66  2002/08/12 13:27:21  rschmidt
  *	Added defines for Link speed capabilities
  *	Added entry PLinkSpeedCap to Port structure
  *	Added entry GIVauxAvail in s_GeInit structure
  *	Added prototypes for SkMacPromiscMode()
  *	Editorial changes
- *	
+ *
  *	Revision 1.65  2002/08/08 15:46:18  rschmidt
  *	Added define SK_PHY_ACC_TO for PHY access timeout
  *	Added define SK_XM_RX_HI_WM for XMAC Rx High Watermark
  *	Added define SK_MIN_TXQ_SIZE for Min RAM Buffer Tx Queue Size
  *	Added entry PhyId1 to Port structure
- *	
+ *
  *	Revision 1.64  2002/07/23 16:02:56  rschmidt
  *	Added entry GIWolOffs in s_GeInit struct (HW-Bug in YUKON 1st rev.)
  *	Added prototypes for: SkGePhyRead(), SkGePhyWrite()
- *	
+ *
  *	Revision 1.63  2002/07/18 08:17:38  rwahl
  *	Corrected definitions for SK_LSPEED_xxx & SK_LSPEED_STAT_xxx.
- *	
+ *
  *	Revision 1.62  2002/07/17 18:21:55  rwahl
  *	Added SK_LSPEED_INDETERMINATED define.
- *	
+ *
  *	Revision 1.61  2002/07/17 17:16:03  rwahl
  *	- MacType now member of GIni struct.
  *	- Struct alignment to 32bit.
  *	- Editorial change.
- *	
+ *
  *	Revision 1.60  2002/07/15 18:23:39  rwahl
  *	Added GeMacFunc to GE Init structure.
  *	Added prototypes for SkXmUpdateStats(), SkGmUpdateStats(),
@@ -93,19 +126,19 @@
  *	  SkGmResetCounter(), SkXmOverflowStatus(), SkGmOverflowStatus().
  *	Added defines for current link speed state.
  *	Added ERRMSG defintions for MacUpdateStat() & MacStatistics().
- *	
+ *
  *	Revision 1.59  2002/07/15 15:40:22  rschmidt
  *	Added entry PLinkSpeedUsed to Port structure
  *	Editorial changes
- *	
+ *
  *	Revision 1.58  2002/06/10 09:36:30  rschmidt
  *	Editorial changes.
- *	
+ *
  *	Revision 1.57  2002/06/05 08:18:00  rschmidt
  *	Corrected alignment in Port Structure
  *	Added new prototypes for GMAC
  *	Editorial changes
- *	
+ *
  *	Revision 1.56  2002/04/25 11:38:12  rschmidt
  *	Added defines for Link speed values
  *	Added defines for Loopback parameters for MAC and PHY
@@ -120,150 +153,150 @@
  *	SkXmPhyRead(), SkXmPhyRead(), SkGmPhyWrite(), SkGmPhyWrite();
  *	Removed prototypes for static functions in SkXmac2.c
  *	Editorial changes
- *	
+ *
  *	Revision 1.55  2002/02/26 15:24:53  rwahl
  *	Fix: no link with manual configuration (#10673). The previous fix for
  *	#10639 was removed. So for RLMT mode = CLS the RLMT may switch to
  *	misconfigured port. It should not occur for the other RLMT modes.
- *	
+ *
  *	Revision 1.54  2002/01/18 16:52:52  rwahl
  *	Editorial corrections.
- *	
+ *
  *	Revision 1.53  2001/11/20 09:19:58  rwahl
  *	Reworked bugfix #10639 (no dependency to RLMT mode).
- *	
+ *
  *	Revision 1.52  2001/10/26 07:52:23  afischer
  *	Port switching bug in `check local link` mode
- *	
+ *
  *	Revision 1.51  2001/02/09 12:26:38  cgoos
  *	Inserted #ifdef DIAG for half duplex workaround timer.
- *	
+ *
  *	Revision 1.50  2001/02/07 07:56:40  rassmann
  *	Corrected copyright.
- *	
+ *
  *	Revision 1.49  2001/01/31 15:32:18  gklug
  *	fix: problem with autosensing an SR8800 switch
  *	add: counter for autoneg timeouts
- *	
+ *
  *	Revision 1.48  2000/11/09 11:30:10  rassmann
  *	WA: Waiting after releasing reset until BCom chip is accessible.
- *	
+ *
  *	Revision 1.47  2000/10/18 12:22:40  cgoos
  *	Added workaround for half duplex hangup.
- *	
+ *
  *	Revision 1.46  2000/08/10 11:28:00  rassmann
  *	Editorial changes.
  *	Preserving 32-bit alignment in structs for the adapter context.
- *	
+ *
  *	Revision 1.45  1999/11/22 13:56:19  cgoos
  *	Changed license header to GPL.
- *	
+ *
  *	Revision 1.44  1999/10/26 07:34:15  malthoff
  *	The define SK_LNK_ON has been lost in v1.41.
- *	
+ *
  *	Revision 1.43  1999/10/06 09:30:16  cgoos
  *	Changed SK_XM_THR_JUMBO.
- *	
+ *
  *	Revision 1.42  1999/09/16 12:58:26  cgoos
  *	Changed SK_LED_STANDY macro to be independent of HW link sync.
- *	
+ *
  *	Revision 1.41  1999/07/30 06:56:14  malthoff
  *	Correct comment for SK_MS_STAT_UNSET.
- *	
+ *
  *	Revision 1.40  1999/05/27 13:38:46  cgoos
  *	Added SK_BMU_TX_WM.
  *	Made SK_BMU_TX_WM and SK_BMU_RX_WM user-definable.
  *	Changed XMAC Tx treshold to max. values.
- *	
+ *
  *	Revision 1.39  1999/05/20 14:35:26  malthoff
  *	Remove prototypes for SkGeLinkLED().
- *	
+ *
  *	Revision 1.38  1999/05/19 11:59:12  cgoos
  *	Added SK_MS_CAP_INDETERMINATED define.
- *	
+ *
  *	Revision 1.37  1999/05/19 07:32:33  cgoos
  *	Changes for 1000Base-T.
  *	LED-defines for HWAC_LINK_LED macro.
- *	
+ *
  *	Revision 1.36  1999/04/08 14:00:24  gklug
  *	add:Port struct field PLinkResCt
- *	
+ *
  *	Revision 1.35  1999/03/25 07:43:07  malthoff
  *	Add error string for SKERR_HWI_E018MSG.
- *	
+ *
  *	Revision 1.34  1999/03/12 16:25:57  malthoff
  *	Remove PPollRxD and PPollTxD.
  *	Add SKERR_HWI_E017MSG. and SK_DPOLL_MAX.
- *	
+ *
  *	Revision 1.33  1999/03/12 13:34:41  malthoff
  *	Add Autonegotiation error codes.
  *	Change defines for parameter Mode in SkXmSetRxCmd().
  *	Replace __STDC__ by SK_KR_PROTO.
- *	
+ *
  *	Revision 1.32  1999/01/25 14:40:20  mhaveman
  *	Added new return states for the virtual management port if multiple
  *	ports are active but differently configured.
- *	
+ *
  *	Revision 1.31  1998/12/11 15:17:02  gklug
- *	add: Link partnet autoneg states : Unknown Manual and Autonegotiation
- *	
+ *	add: Link partnet autoneg states : Unknown Manual and Auto-negotiation
+ *
  *	Revision 1.30  1998/12/07 12:17:04  gklug
- *	add: Link Partner autonegotiation flag
- *	
+ *	add: Link Partner auto-negotiation flag
+ *
  *	Revision 1.29  1998/12/01 10:54:42  gklug
  *	add: variables for XMAC Errata
- *	
+ *
  *	Revision 1.28  1998/12/01 10:14:15  gklug
  *	add: PIsave saves the Interrupt status word
- *	
+ *
  *	Revision 1.27  1998/11/26 15:24:52  mhaveman
  *	Added link status states SK_LMODE_STAT_AUTOHALF and
  *	SK_LMODE_STAT_AUTOFULL which are used by PNMI.
- *	
+ *
  *	Revision 1.26  1998/11/26 14:53:01  gklug
  *	add:autoNeg Timeout variable
- *	
+ *
  *	Revision 1.25  1998/11/26 08:58:50  gklug
  *	add: Link Mode configuration (AUTO Sense mode)
- *	
+ *
  *	Revision 1.24  1998/11/24 13:30:27  gklug
  *	add: PCheckPar to port struct
- *	
+ *
  *	Revision 1.23  1998/11/18 13:23:26  malthoff
  *	Add SK_PKT_TO_MAX.
- *	
+ *
  *	Revision 1.22  1998/11/18 13:19:54  gklug
  *	add: PPrevShorts and PLinkBroken to port struct for WA XMAC Errata #C1
  *
  *	Revision 1.21  1998/10/26 08:02:57  malthoff
  *	Add GIRamOffs.
- *	
+ *
  *	Revision 1.20  1998/10/19 07:28:37  malthoff
  *	Add prototype for SkGeInitRamIface().
- *	
+ *
  *	Revision 1.19  1998/10/14 14:47:48  malthoff
  *	SK_TIMER should not be defined for Diagnostics.
  *	Add SKERR_HWI_E015MSG and SKERR_HWI_E016MSG.
- *	
+ *
  *	Revision 1.18  1998/10/14 14:00:03  gklug
  *	add: timer to port struct for workaround of Errata #2
- *	
+ *
  *	Revision 1.17  1998/10/14 11:23:09  malthoff
  *	Add prototype for SkXmAutoNegDone().
  *	Fix SkXmSetRxCmd() prototype statement.
  *
  *	Revision 1.16  1998/10/14 05:42:29  gklug
  *	add: HWLinkUp flag to Port struct
- *	
+ *
  *	Revision 1.15  1998/10/09 08:26:33  malthoff
  *	Rename SK_RB_ULPP_B to SK_RB_LLPP_B.
- *	
+ *
  *	Revision 1.14  1998/10/09 07:11:13  malthoff
  *	bug fix: SK_FACT_53 is 85 not 117.
  *	Rework time out init values.
  *	Add GIPortUsage and corresponding defines.
  *	Add some error log messages.
- *	
+ *
  *	Revision 1.13  1998/10/06 14:13:14  malthoff
  *	Add prototype for SkGeLoadLnkSyncCnt().
  *
@@ -328,9 +361,11 @@
 
 /* defines ********************************************************************/
 
+#define SK_TEST_VAL		0x11335577UL
+
 /* modifying Link LED behaviour (used with SkGeLinkLED()) */
 #define SK_LNK_OFF		LED_OFF
-#define SK_LNK_ON		(LED_ON | LED_BLK_OFF | LED_SYNC_OFF)	
+#define SK_LNK_ON		(LED_ON | LED_BLK_OFF | LED_SYNC_OFF)
 #define SK_LNK_BLINK	(LED_ON | LED_BLK_ON  | LED_SYNC_ON)
 #define SK_LNK_PERM		(LED_ON | LED_BLK_OFF | LED_SYNC_ON)
 #define SK_LNK_TST		(LED_ON | LED_BLK_ON  | LED_SYNC_OFF)
@@ -352,14 +387,17 @@
 #define SK_LED_TST	2
 
 /* Counter and Timer constants, for a host clock of 62.5 MHz */
-#define SK_XMIT_DUR		0x002faf08L		/*  50 ms */
-#define SK_BLK_DUR		0x01dcd650L		/* 500 ms */
+#define SK_XMIT_DUR		0x002faf08UL	/*  50 ms */
+#define SK_BLK_DUR		0x01dcd650UL	/* 500 ms */
+
+#define SK_DPOLL_DEF	0x00ee6b28UL	/* 250 ms at 62.5 MHz */
 
-#define SK_DPOLL_DEF	0x00EE6B28L		/* 250 ms */
-#define SK_DPOLL_MAX	0x00FFFFFFL		/* ca. 268ms */
+#define SK_DPOLL_MAX	0x00ffffffUL	/* 268 ms at 62.5 MHz */
+										/* 215 ms at 78.12 MHz */
 
 #define SK_FACT_62		100			/* is given in percent */
-#define SK_FACT_53		 85
+#define SK_FACT_53		 85         /* on GENESIS:	53.12 MHz */
+#define SK_FACT_78		125			/* on YUKON:	78.12 MHz */
 
 /* Timeout values */
 #define SK_MAC_TO_53	72			/* MAC arbiter timeout */
@@ -447,9 +485,7 @@
 #define SK_LMODE_AUTOFULL	4	/* AutoFull Duplex Mode */
 #define SK_LMODE_AUTOBOTH	5	/* AutoBoth Duplex Mode */
 #define SK_LMODE_AUTOSENSE	6	/* configured mode auto sensing */
-#define SK_LMODE_INDETERMINATED	7	/* Return value for virtual port if
-								* multiple ports are differently configured.
-								*/
+#define SK_LMODE_INDETERMINATED	7	/* indeterminated */
 
 /* Auto-negotiation timeout in 100ms granularity */
 #define SK_AND_MAX_TO		6	/* Wait 600 msec before link comes up */
@@ -465,27 +501,21 @@
 #define SK_LSPEED_CAP_10MBPS		(1<<1)	/* 10 Mbps */
 #define SK_LSPEED_CAP_100MBPS		(1<<2)	/* 100 Mbps */
 #define SK_LSPEED_CAP_1000MBPS		(1<<3)	/* 1000 Mbps */
-#define SK_LSPEED_CAP_INDETERMINATED (1<<4) /* Return value for virtual port if
-									  * multiple ports are differently configured.
-									  */
+#define SK_LSPEED_CAP_INDETERMINATED (1<<4) /* indeterminated */
 
 /* Link Speed Parameter */
 #define SK_LSPEED_AUTO				1	/* Automatic resolution */
 #define SK_LSPEED_10MBPS			2	/* 10 Mbps */
 #define SK_LSPEED_100MBPS			3	/* 100 Mbps */
 #define SK_LSPEED_1000MBPS			4	/* 1000 Mbps */
-#define SK_LSPEED_INDETERMINATED	5	/* Return value for virtual port if
-					 * multiple ports are differently configured.
-					 */
+#define SK_LSPEED_INDETERMINATED	5	/* indeterminated */
 
 /* Link Speed Current State */
 #define SK_LSPEED_STAT_UNKNOWN		1
 #define SK_LSPEED_STAT_10MBPS		2
 #define SK_LSPEED_STAT_100MBPS 		3
 #define SK_LSPEED_STAT_1000MBPS		4
-#define SK_LSPEED_STAT_INDETERMINATED 5	/* Return value for virtual port if
-					 * multiple ports are differently configured.
-					 */
+#define SK_LSPEED_STAT_INDETERMINATED 5
 
 
 /* Link Capability Parameter */
@@ -493,62 +523,50 @@
 #define SK_LMODE_CAP_FULL		(1<<1)	/* Full Duplex Mode */
 #define SK_LMODE_CAP_AUTOHALF	(1<<2)	/* AutoHalf Duplex Mode */
 #define SK_LMODE_CAP_AUTOFULL	(1<<3)	/* AutoFull Duplex Mode */
-#define SK_LMODE_CAP_INDETERMINATED (1<<4) /* Return value for virtual port if
-					 * multiple ports are differently configured.
-					 */
+#define SK_LMODE_CAP_INDETERMINATED (1<<4) /* indeterminated */
 
 /* Link Mode Current State */
 #define SK_LMODE_STAT_UNKNOWN	1	/* Unknown Duplex Mode */
 #define SK_LMODE_STAT_HALF		2	/* Half Duplex Mode */
 #define SK_LMODE_STAT_FULL		3	/* Full Duplex Mode */
-#define SK_LMODE_STAT_AUTOHALF	4	/* Half Duplex Mode obtained by AutoNeg */
-#define SK_LMODE_STAT_AUTOFULL	5	/* Full Duplex Mode obtained by AutoNeg */
-#define SK_LMODE_STAT_INDETERMINATED 6	/* Return value for virtual port if
-					 * multiple ports are differently configured.
-					 */
+#define SK_LMODE_STAT_AUTOHALF	4	/* Half Duplex Mode obtained by Auto-Neg */
+#define SK_LMODE_STAT_AUTOFULL	5	/* Full Duplex Mode obtained by Auto-Neg */
+#define SK_LMODE_STAT_INDETERMINATED 6	/* indeterminated */
+
 /* Flow Control Mode Parameter (and capabilities) */
-#define SK_FLOW_MODE_NONE		1	/* No Flow Control */
+#define SK_FLOW_MODE_NONE		1	/* No Flow-Control */
 #define SK_FLOW_MODE_LOC_SEND	2	/* Local station sends PAUSE */
-#define SK_FLOW_MODE_SYMMETRIC	3	/* Both station may send PAUSE */
-#define SK_FLOW_MODE_SYM_OR_REM	4	/* Both station may send PAUSE or
+#define SK_FLOW_MODE_SYMMETRIC	3	/* Both stations may send PAUSE */
+#define SK_FLOW_MODE_SYM_OR_REM	4	/* Both stations may send PAUSE or
 					 * just the remote station may send PAUSE
 					 */
-#define SK_FLOW_MODE_INDETERMINATED 5	/* Return value for virtual port if
-					 * multiple ports are differently configured.
-					 */
+#define SK_FLOW_MODE_INDETERMINATED 5	/* indeterminated */
 
 /* Flow Control Status Parameter */
 #define SK_FLOW_STAT_NONE		1	/* No Flow Control */
 #define SK_FLOW_STAT_REM_SEND	2	/* Remote Station sends PAUSE */
 #define SK_FLOW_STAT_LOC_SEND	3	/* Local station sends PAUSE */
 #define SK_FLOW_STAT_SYMMETRIC	4	/* Both station may send PAUSE */
-#define SK_FLOW_STAT_INDETERMINATED 5	/* Return value for virtual port if
-					 * multiple ports are differently configured.
-					 */
+#define SK_FLOW_STAT_INDETERMINATED 5	/* indeterminated */
+
 /* Master/Slave Mode Capabilities */
 #define SK_MS_CAP_AUTO		(1<<0)	/* Automatic resolution */
 #define SK_MS_CAP_MASTER	(1<<1)	/* This station is master */
 #define SK_MS_CAP_SLAVE		(1<<2)	/* This station is slave */
-#define SK_MS_CAP_INDETERMINATED (1<<3)	/* Return value for virtual port if
-					 * multiple ports are differently configured.
-					 */
+#define SK_MS_CAP_INDETERMINATED (1<<3)	/* indeterminated */
 
 /* Set Master/Slave Mode Parameter (and capabilities) */
 #define SK_MS_MODE_AUTO		1	/* Automatic resolution */
 #define SK_MS_MODE_MASTER	2	/* This station is master */
 #define SK_MS_MODE_SLAVE	3	/* This station is slave */
-#define SK_MS_MODE_INDETERMINATED 4	/* Return value for virtual port if
-					 * multiple ports are differently
-					 */
+#define SK_MS_MODE_INDETERMINATED 4	/* indeterminated */
 
 /* Master/Slave Status Parameter */
-#define SK_MS_STAT_UNSET	1	/* The MS status is never been determ*/
+#define SK_MS_STAT_UNSET	1	/* The M/S status is not set */
 #define SK_MS_STAT_MASTER	2	/* This station is master */
 #define SK_MS_STAT_SLAVE	3	/* This station is slave */
-#define SK_MS_STAT_FAULT	4	/* MS resolution failed */
-#define SK_MS_STAT_INDETERMINATED 5	/* Return value for virtual port if
-					 * multiple ports are differently
-					 */
+#define SK_MS_STAT_FAULT	4	/* M/S resolution failed */
+#define SK_MS_STAT_INDETERMINATED 5	/* indeterminated */
 
 /* parameter 'Mode' when calling SkXmSetRxCmd() */
 #define SK_STRIP_FCS_ON		(1<<0)	/* Enable  FCS stripping of Rx frames */
@@ -557,8 +575,8 @@
 #define SK_STRIP_PAD_OFF	(1<<3)	/* Disable pad byte stripping of Rx fr */
 #define SK_LENERR_OK_ON		(1<<4)	/* Don't chk fr for in range len error */
 #define SK_LENERR_OK_OFF	(1<<5)	/* Check frames for in range len error */
-#define SK_BIG_PK_OK_ON		(1<<6)	/* Don't set rcvError bit for big fr */
-#define SK_BIG_PK_OK_OFF	(1<<7)	/* Set rcvError bit for big frames */	
+#define SK_BIG_PK_OK_ON		(1<<6)	/* Don't set Rx Error bit for big frames */
+#define SK_BIG_PK_OK_OFF	(1<<7)	/* Set Rx Error bit for big frames */
 #define SK_SELF_RX_ON		(1<<8)	/* Enable  Rx of own packets */
 #define SK_SELF_RX_OFF		(1<<9)	/* Disable Rx of own packets */
 
@@ -579,6 +597,11 @@
 /* Default receive frame limit for Workaround of XMAC Errata */
 #define SK_DEF_RX_WA_LIM	SK_CONSTU64(100)
 
+/* values for GILedBlinkCtrl (LED Blink Control) */
+#define SK_ACT_LED_BLINK	(1<<0)	/* Active LED blinking */
+#define SK_DUP_LED_NORMAL	(1<<1)	/* Duplex LED normal */
+#define SK_LED_LINK100_ON	(1<<2)	/* Link 100M LED on */
+
 /* Link Partner Status */
 #define SK_LIPA_UNKNOWN	0	/* Link partner is in unknown state */
 #define SK_LIPA_MANUAL	1	/* Link partner is in detected manual state */
@@ -598,10 +621,10 @@
 typedef struct s_GeMacFunc {
 	int  (*pFnMacUpdateStats)(SK_AC *pAC, SK_IOC IoC, unsigned int Port);
 	int  (*pFnMacStatistic)(SK_AC *pAC, SK_IOC IoC, unsigned int Port,
-							SK_U16 StatAddr, SK_U32 *pVal);
+							SK_U16 StatAddr, SK_U32 SK_FAR *pVal);
 	int  (*pFnMacResetCounter)(SK_AC *pAC, SK_IOC IoC, unsigned int Port);
 	int  (*pFnMacOverflow)(SK_AC *pAC, SK_IOC IoC, unsigned int Port,
-						   SK_U16 IStatus, SK_U64 *pVal);
+						   SK_U16 IStatus, SK_U64 SK_FAR *pVal);
 } SK_GEMACFUNC;
 
 /*
@@ -612,7 +635,7 @@
 	SK_TIMER	PWaTimer;	/* Workaround Timer */
 	SK_TIMER	HalfDupChkTimer;
 #endif /* SK_DIAG */
-	SK_U32	PPrevShorts;	/* Previous short Counter checking */
+	SK_U32	PPrevShorts;	/* Previous Short Counter checking */
 	SK_U32	PPrevFcs;		/* Previous FCS Error Counter checking */
 	SK_U64	PPrevRx;		/* Previous RxOk Counter checking */
 	SK_U64	PRxLim;			/* Previous RxOk Counter checking */
@@ -634,12 +657,13 @@
 	int		PXsQOff;		/* Synchronous Tx Queue Address Offset */
 	int		PXaQOff;		/* Asynchronous Tx Queue Address Offset */
 	int		PhyType;		/* PHY used on this port */
+	int		PState;			/* Port status (reset, stop, init, run) */
 	SK_U16	PhyId1;			/* PHY Id1 on this port */
 	SK_U16	PhyAddr;		/* MDIO/MDC PHY address */
 	SK_U16	PIsave;			/* Saved Interrupt status word */
 	SK_U16	PSsave;			/* Saved PHY status word */
+	SK_U16	PGmANegAdv;		/* Saved GPhy AutoNegAdvertisment register */
 	SK_BOOL	PHWLinkUp;		/* The hardware Link is up (wiring) */
-	SK_BOOL	PState;			/* Is port initialized ? */
 	SK_BOOL	PLinkBroken;	/* Is Link broken ? */
 	SK_BOOL	PCheckPar;		/* Do we check for parity errors ? */
 	SK_BOOL	HalfDupTimerActive;
@@ -656,7 +680,7 @@
 	SK_U8	PMSCap;			/* Master/Slave Capabilities */
 	SK_U8	PMSMode;		/* Master/Slave Mode */
 	SK_U8	PMSStatus;		/* Master/Slave Status */
-	SK_U8	PAutoNegFail;	/* Auto-negotiation fail flag */
+	SK_BOOL	PAutoNegFail;	/* Auto-negotiation fail flag */
 	SK_U8	PLipaAutoNeg;	/* Auto-negotiation possible with Link Partner */
 	SK_U8	PCableLen;		/* Cable Length */
 	SK_U8	PMdiPairLen[4];	/* MDI[0..3] Pair Length */
@@ -668,24 +692,29 @@
  * (has to be included in the adapter context)
  */
 typedef	struct s_GeInit {
+	int			GIChipId;		/* Chip Identification Number */
+	int			GIChipRev;		/* Chip Revision Number */
 	SK_U8		GIPciHwRev;		/* PCI HW Revision Number */
-	SK_U8		GIChipId;		/* Chip Identification Number */
-	SK_U8		GIChipRev;		/* Chip Revision Number */
 	SK_BOOL		GIGenesis;		/* Genesis adapter ? */
+	SK_BOOL		GIYukon;		/* YUKON-A1/Bx chip */
+	SK_BOOL		GIYukonLite;	/* YUKON-Lite chip */
 	SK_BOOL		GICopperType;	/* Copper Type adapter ? */
 	SK_BOOL		GIPciSlot64;	/* 64-bit PCI Slot */
 	SK_BOOL		GIPciClock66;	/* 66 MHz PCI Clock */
 	SK_BOOL		GIVauxAvail;	/* VAUX available (YUKON) */
 	SK_BOOL		GIYukon32Bit;	/* 32-Bit YUKON adapter */
+	SK_U16		GILedBlinkCtrl;	/* LED Blink Control */
 	int			GIMacsFound;	/* Number of MACs found on this adapter */
 	int			GIMacType;		/* MAC Type used on this adapter */
 	int			GIHstClkFact;	/* Host Clock Factor (62.5 / HstClk * 100) */
-	int			GIPortUsage;	/* Driver Port Usage: SK_RED_LINK/SK_MUL_LINK */
+	int			GIPortUsage;	/* Driver Port Usage */
 	int			GILevel;		/* Initialization Level completed */
 	int			GIRamSize;		/* The RAM size of the adapter in kB */
-	int			GIWolOffs;		/* WOL Register Offset (HW-Bug in 1st revision) */
+	int			GIWolOffs;		/* WOL Register Offset (HW-Bug in Rev. A) */
 	SK_U32		GIRamOffs;		/* RAM Address Offset for addr calculation */
-	SK_U32		GIPollTimerVal;	/* Descriptor Poll Timer Init Val in clk ticks*/
+	SK_U32		GIPollTimerVal;	/* Descr. Poll Timer Init Val (HstClk ticks) */
+	SK_U32		GIValIrqMask;	/* Value for Interrupt Mask */
+	SK_U32		GITimeStampCnt;	/* Time Stamp High Counter (YUKON only) */
 	SK_GEPORT	GP[SK_MAX_MACS];/* Port Dependent Information */
 	SK_GEMACFUNC GIFunc;		/* MAC depedent functions */
 } SK_GEINIT;
@@ -714,7 +743,7 @@
 #define SKERR_HWI_E010		(SKERR_HWI_E009+1)
 #define SKERR_HWI_E010MSG	"SkGeCfgSync() called with invalid parameters"
 #define SKERR_HWI_E011		(SKERR_HWI_E010+1)
-#define SKERR_HWI_E011MSG	"SkGeInitPort(): Receive Queue Size to small"
+#define SKERR_HWI_E011MSG	"SkGeInitPort(): Receive Queue Size too small"
 #define SKERR_HWI_E012		(SKERR_HWI_E011+1)
 #define SKERR_HWI_E012MSG	"SkGeInitPort(): invalid Queue Size specified"
 #define SKERR_HWI_E013		(SKERR_HWI_E012+1)
@@ -738,7 +767,7 @@
 #define	SKERR_HWI_E022		(SKERR_HWI_E021+1)
 #define	SKERR_HWI_E022MSG	"MacStatistic(): illegal statistic base address"
 #define SKERR_HWI_E023		(SKERR_HWI_E022+1)
-#define SKERR_HWI_E023MSG	"SkGeInitPort(): Transmit Queue Size to small"
+#define SKERR_HWI_E023MSG	"SkGeInitPort(): Transmit Queue Size too small"
 #define SKERR_HWI_E024		(SKERR_HWI_E023+1)
 #define SKERR_HWI_E024MSG	"FATAL: SkGeStopPort() does not terminate (Rx)"
 #define SKERR_HWI_E025		(SKERR_HWI_E024+1)
@@ -911,7 +940,7 @@
 	SK_IOC	IoC,
 	int		Port,
 	int		Addr,
-	SK_U16	*pVal);
+	SK_U16	SK_FAR *pVal);
 
 extern void	SkXmPhyWrite(
 	SK_AC	*pAC,
@@ -925,7 +954,7 @@
 	SK_IOC	IoC,
 	int		Port,
 	int		Addr,
-	SK_U16	*pVal);
+	SK_U16	SK_FAR *pVal);
 
 extern void	SkGmPhyWrite(
 	SK_AC	*pAC,
@@ -934,20 +963,6 @@
 	int		Addr,
 	SK_U16	Val);
 
-extern void	SkGePhyRead(
-	SK_AC	*pAC,
-	SK_IOC	IoC,
-	int		Port,
-	int		Addr,
-	SK_U16	*pVal);
-
-extern void	SkGePhyWrite(
-	SK_AC	*pAC,
-	SK_IOC	IoC,
-	int		Port,
-	int		Addr,
-	SK_U16	Val);
-
 extern void	SkXmClrExactAddr(
 	SK_AC	*pAC,
 	SK_IOC	IoC,
@@ -986,14 +1001,14 @@
 	SK_IOC	IoC,
 	unsigned int Port,
 	SK_U16	StatAddr,
-	SK_U32	*pVal);
+	SK_U32	SK_FAR *pVal);
 
 extern int SkGmMacStatistic(
 	SK_AC	*pAC,
 	SK_IOC	IoC,
 	unsigned int Port,
 	SK_U16	StatAddr,
-	SK_U32	*pVal);
+	SK_U32	SK_FAR *pVal);
 
 extern int SkXmResetCounter(
 	SK_AC	*pAC,
@@ -1010,14 +1025,14 @@
 	SK_IOC	IoC,
 	unsigned int Port,
 	SK_U16  IStatus,
-	SK_U64	*pStatus);
+	SK_U64	SK_FAR *pStatus);
 
 extern int SkGmOverflowStatus(
 	SK_AC	*pAC,
 	SK_IOC	IoC,
 	unsigned int Port,
 	SK_U16	MacStatus,
-	SK_U64	*pStatus);
+	SK_U64	SK_FAR *pStatus);
 
 extern int SkGmCableDiagStatus(
 	SK_AC	*pAC,
@@ -1026,6 +1041,20 @@
 	SK_BOOL	StartTest);
 
 #ifdef SK_DIAG
+extern void	SkGePhyRead(
+	SK_AC	*pAC,
+	SK_IOC	IoC,
+	int		Port,
+	int		Addr,
+	SK_U16	*pVal);
+
+extern void	SkGePhyWrite(
+	SK_AC	*pAC,
+	SK_IOC	IoC,
+	int		Port,
+	int		Addr,
+	SK_U16	Val);
+
 extern void	SkMacSetRxCmd(
 	SK_AC	*pAC,
 	SK_IOC	IoC,
@@ -1083,8 +1112,6 @@
 extern int	SkMacAutoNegDone();
 extern void	SkMacAutoNegLipaPhy();
 extern void SkMacSetRxTxEn();
-extern void	SkGePhyRead();
-extern void	SkGePhyWrite();
 extern void	SkXmInitMac();
 extern void	SkXmPhyRead();
 extern void	SkXmPhyWrite();
@@ -1106,6 +1133,8 @@
 extern int	SkGmCableDiagStatus();
 
 #ifdef SK_DIAG
+extern void	SkGePhyRead();
+extern void	SkGePhyWrite();
 extern void	SkMacSetRxCmd();
 extern void	SkMacCrcGener();
 extern void	SkMacTimeStamp();

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)