patch-2.4.21 linux-2.4.21/drivers/net/sk98lin/h/skgepnm2.h

Next file: linux-2.4.21/drivers/net/sk98lin/h/skgepnmi.h
Previous file: linux-2.4.21/drivers/net/sk98lin/h/skgeinit.h
Back to the patch index
Back to the overall index

diff -urN linux-2.4.20/drivers/net/sk98lin/h/skgepnm2.h linux-2.4.21/drivers/net/sk98lin/h/skgepnm2.h
@@ -2,8 +2,8 @@
  *
  * Name:	skgepnm2.h
  * Project:	GEnesis, PCI Gigabit Ethernet Adapter
- * Version:	$Revision: 1.30 $
- * Date:	$Date: 2001/02/06 10:03:41 $
+ * Version:	$Revision: 1.34 $
+ * Date:	$Date: 2002/12/16 09:05:18 $
  * Purpose:	Defines for Private Network Management Interface
  *
  ****************************************************************************/
@@ -26,6 +26,21 @@
  * History:
  *
  *	$Log: skgepnm2.h,v $
+ *	Revision 1.34  2002/12/16 09:05:18  tschilli
+ *	Code for VCT handling added.
+ *	
+ *	Revision 1.33  2002/09/10 09:00:03  rwahl
+ *	Adapted boolean definitions according sktypes.
+ *	
+ *	Revision 1.32  2002/08/09 09:47:01  rwahl
+ *	Added write-only flag to oid access defines.
+ *	Editorial changes.
+ *	
+ *	Revision 1.31  2002/07/17 19:23:18  rwahl
+ *	- Replaced MAC counter definitions by enumeration.
+ *	- Added definition SK_PNMI_MAC_TYPES.
+ *	- Added chipset defnition for Yukon.
+ *	
  *	Revision 1.30  2001/02/06 10:03:41  mkunz
  *	- Pnmi V4 dual net support added. Interface functions and macros extended
  *	- Vpd bug fixed
@@ -140,26 +155,19 @@
 #ifndef _SKGEPNM2_H_
 #define _SKGEPNM2_H_
 
-#ifndef FALSE
-#define FALSE			0
-#endif
-
-#ifndef TRUE
-#define	TRUE			!(FALSE)
-#endif
-
 /*
  * General definitions
  */
-#define SK_PNMI_CHIPSET		1	/* XMAC11800FP */
+#define SK_PNMI_CHIPSET_XMAC	1	/* XMAC11800FP */
+#define SK_PNMI_CHIPSET_YUKON	2	/* YUKON */
 
 #define	SK_PNMI_BUS_PCI		1	/* PCI bus*/
 
 /*
  * Actions
  */
-#define SK_PNMI_ACT_IDLE	1
-#define SK_PNMI_ACT_RESET	2
+#define SK_PNMI_ACT_IDLE		1
+#define SK_PNMI_ACT_RESET		2
 #define SK_PNMI_ACT_SELFTEST	3
 #define SK_PNMI_ACT_RESETCNT	4
 
@@ -170,13 +178,13 @@
 #define SK_PNMI_VPD_RW		1
 #define SK_PNMI_VPD_RO		2
 
-#define SK_PNMI_VPD_OK		0
+#define SK_PNMI_VPD_OK			0
 #define SK_PNMI_VPD_NOTFOUND	1
-#define SK_PNMI_VPD_CUT		2
-#define SK_PNMI_VPD_TIMEOUT	3
-#define SK_PNMI_VPD_FULL	4
-#define SK_PNMI_VPD_NOWRITE	5
-#define SK_PNMI_VPD_FATAL	6
+#define SK_PNMI_VPD_CUT			2
+#define SK_PNMI_VPD_TIMEOUT		3
+#define SK_PNMI_VPD_FULL		4
+#define SK_PNMI_VPD_NOWRITE		5
+#define SK_PNMI_VPD_FATAL		6
 
 #define SK_PNMI_VPD_IGNORE	0
 #define SK_PNMI_VPD_CREATE	1
@@ -188,124 +196,137 @@
  */
 #define SK_PNMI_DEF_RLMT_CHG_THRES	240	/* 4 changes per minute */
 
+
+/*
+ * VCT internal status values
+ */
+#define SK_PNMI_VCT_PENDING	32
+#define SK_PNMI_VCT_TEST_DONE	64
+#define SK_PNMI_VCT_LINK	128
+
 /*
  * Internal table definitions
  */
 #define SK_PNMI_GET		0
-#define SK_PNMI_PRESET		1
+#define SK_PNMI_PRESET	1
 #define SK_PNMI_SET		2
 
 #define SK_PNMI_RO		0
 #define SK_PNMI_RW		1
+#define SK_PNMI_WO		2
 
 typedef struct s_OidTabEntry {
-	SK_U32		Id;
-	SK_U32		InstanceNo;
+	SK_U32			Id;
+	SK_U32			InstanceNo;
 	unsigned int	StructSize;
 	unsigned int	Offset;
-	int		Access;
-	int		(* Func)(SK_AC *pAc, SK_IOC pIo, int action,
-				SK_U32 Id, char* pBuf, unsigned int* pLen,
-				SK_U32 Instance, unsigned int TableIndex,
-                                SK_U32 NetNumber);
-	SK_U16		Param;
+	int				Access;
+	int				(* Func)(SK_AC *pAc, SK_IOC pIo, int action,
+							 SK_U32 Id, char* pBuf, unsigned int* pLen,
+							 SK_U32 Instance, unsigned int TableIndex,
+							 SK_U32 NetNumber);
+	SK_U16			Param;
 } SK_PNMI_TAB_ENTRY;
 
 
 /*
  * Trap lengths
  */
-#define SK_PNMI_TRAP_SIMPLE_LEN		17
+#define SK_PNMI_TRAP_SIMPLE_LEN			17
 #define SK_PNMI_TRAP_SENSOR_LEN_BASE	46
 #define SK_PNMI_TRAP_RLMT_CHANGE_LEN	23
-#define SK_PNMI_TRAP_RLMT_PORT_LEN	23
-
+#define SK_PNMI_TRAP_RLMT_PORT_LEN		23
 
 /*
- * MAC statistic data structures
- * Only for the first 64 counters: the number relates to the bit in the
- * XMAC overflow status register
- */
-#define SK_PNMI_HTX			0
-#define SK_PNMI_HTX_OCTET		1
-#define SK_PNMI_HTX_OCTETHIGH		1
-#define SK_PNMI_HTX_OCTETLOW		2
-#define SK_PNMI_HTX_BROADCAST		3
-#define SK_PNMI_HTX_MULTICAST		4
-#define SK_PNMI_HTX_UNICAST		5
-#define SK_PNMI_HTX_LONGFRAMES		6
-#define SK_PNMI_HTX_BURST		7
-#define SK_PNMI_HTX_PMACC		8
-#define SK_PNMI_HTX_MACC		9
-#define SK_PNMI_HTX_SINGLE_COL		10
-#define SK_PNMI_HTX_MULTI_COL		11
-#define SK_PNMI_HTX_EXCESS_COL		12
-#define SK_PNMI_HTX_LATE_COL		13
-#define SK_PNMI_HTX_DEFFERAL		14
-#define SK_PNMI_HTX_EXCESS_DEF		15
-#define SK_PNMI_HTX_UNDERRUN		16
-#define SK_PNMI_HTX_CARRIER		17
-#define SK_PNMI_HTX_UTILUNDER		18
-#define SK_PNMI_HTX_UTILOVER		19
-#define SK_PNMI_HTX_64			20
-#define SK_PNMI_HTX_127			21
-#define SK_PNMI_HTX_255			22
-#define SK_PNMI_HTX_511			23
-#define SK_PNMI_HTX_1023		24
-#define SK_PNMI_HTX_MAX			25
-#define SK_PNMI_HTX_RESERVED26		26
-#define SK_PNMI_HTX_RESERVED27		27
-#define SK_PNMI_HTX_RESERVED28		28
-#define SK_PNMI_HTX_RESERVED29		29
-#define SK_PNMI_HTX_RESERVED30		30
-#define SK_PNMI_HTX_RESERVED31		31
-#define SK_PNMI_HRX			(32 + 0)
-#define SK_PNMI_HRX_OCTET		(32 + 1)
-#define SK_PNMI_HRX_OCTETHIGH		(32 + 1)
-#define SK_PNMI_HRX_OCTETLOW		(32 + 2)
-#define SK_PNMI_HRX_BROADCAST		(32 + 3)
-#define SK_PNMI_HRX_MULTICAST		(32 + 4)
-#define SK_PNMI_HRX_UNICAST		(32 + 5)
-#define SK_PNMI_HRX_PMACC		(32 + 6)
-#define SK_PNMI_HRX_MACC		(32 + 7)
-#define SK_PNMI_HRX_PMACC_ERR		(32 + 8)
-#define SK_PNMI_HRX_MACC_UNKWN		(32 + 9)
-#define SK_PNMI_HRX_BURST		(32 + 10)
-#define SK_PNMI_HRX_MISSED		(32 + 11)
-#define SK_PNMI_HRX_FRAMING		(32 + 12)
-#define SK_PNMI_HRX_OVERFLOW		(32 + 13)
-#define SK_PNMI_HRX_JABBER		(32 + 14)
-#define SK_PNMI_HRX_CARRIER		(32 + 15)
-#define SK_PNMI_HRX_IRLENGTH		(32 + 16)
-#define SK_PNMI_HRX_SYMBOL		(32 + 17)
-#define SK_PNMI_HRX_SHORTS		(32 + 18)
-#define SK_PNMI_HRX_RUNT		(32 + 19)
-#define SK_PNMI_HRX_TOO_LONG		(32 + 20)
-#define SK_PNMI_HRX_FCS			(32 + 21)
-#define SK_PNMI_HRX_RESERVED22		(32 + 22)
-#define SK_PNMI_HRX_CEXT		(32 + 23)
-#define SK_PNMI_HRX_UTILUNDER		(32 + 24)
-#define SK_PNMI_HRX_UTILOVER		(32 + 25)
-#define SK_PNMI_HRX_64			(32 + 26)
-#define SK_PNMI_HRX_127			(32 + 27)
-#define SK_PNMI_HRX_255			(32 + 28)
-#define SK_PNMI_HRX_511			(32 + 29)
-#define SK_PNMI_HRX_1023		(32 + 30)
-#define SK_PNMI_HRX_MAX			(32 + 31)
-
-#define SK_PNMI_HTX_SYNC		64
-#define SK_PNMI_HTX_SYNC_OCTET		65
-
-#define SK_PNMI_HRX_LONGFRAMES		66
+ * Number of MAC types supported
+ */
+#define SK_PNMI_MAC_TYPES	(SK_MAC_GMAC + 1)
 
-#define SK_PNMI_MAX_IDX			(SK_PNMI_CNT_NO)
+/*
+ * MAC statistic data list (overall set for MAC types used)
+ */
+enum SK_MACSTATS {
+	SK_PNMI_HTX				= 0,
+	SK_PNMI_HTX_OCTET,
+	SK_PNMI_HTX_OCTETHIGH 	= SK_PNMI_HTX_OCTET,
+	SK_PNMI_HTX_OCTETLOW,
+	SK_PNMI_HTX_BROADCAST,
+	SK_PNMI_HTX_MULTICAST,
+	SK_PNMI_HTX_UNICAST,
+	SK_PNMI_HTX_BURST,
+	SK_PNMI_HTX_PMACC,
+	SK_PNMI_HTX_MACC,
+	SK_PNMI_HTX_COL,
+	SK_PNMI_HTX_SINGLE_COL,
+	SK_PNMI_HTX_MULTI_COL,
+	SK_PNMI_HTX_EXCESS_COL,
+	SK_PNMI_HTX_LATE_COL,
+	SK_PNMI_HTX_DEFFERAL,
+	SK_PNMI_HTX_EXCESS_DEF,
+	SK_PNMI_HTX_UNDERRUN,
+	SK_PNMI_HTX_CARRIER,
+	SK_PNMI_HTX_UTILUNDER,
+	SK_PNMI_HTX_UTILOVER,
+	SK_PNMI_HTX_64,
+	SK_PNMI_HTX_127,
+	SK_PNMI_HTX_255,
+	SK_PNMI_HTX_511,
+	SK_PNMI_HTX_1023,
+	SK_PNMI_HTX_MAX,
+	SK_PNMI_HTX_LONGFRAMES,
+	SK_PNMI_HTX_SYNC,
+	SK_PNMI_HTX_SYNC_OCTET,
+	SK_PNMI_HTX_RESERVED,
+	
+	SK_PNMI_HRX,
+	SK_PNMI_HRX_OCTET,
+	SK_PNMI_HRX_OCTETHIGH	= SK_PNMI_HRX_OCTET,
+	SK_PNMI_HRX_OCTETLOW,
+	SK_PNMI_HRX_BADOCTET,
+	SK_PNMI_HRX_BADOCTETHIGH = SK_PNMI_HRX_BADOCTET,
+	SK_PNMI_HRX_BADOCTETLOW,
+	SK_PNMI_HRX_BROADCAST,
+	SK_PNMI_HRX_MULTICAST,
+	SK_PNMI_HRX_UNICAST,
+	SK_PNMI_HRX_PMACC,
+	SK_PNMI_HRX_MACC,
+	SK_PNMI_HRX_PMACC_ERR,
+	SK_PNMI_HRX_MACC_UNKWN,
+	SK_PNMI_HRX_BURST,
+	SK_PNMI_HRX_MISSED,
+	SK_PNMI_HRX_FRAMING,
+	SK_PNMI_HRX_UNDERSIZE,
+	SK_PNMI_HRX_OVERFLOW,
+	SK_PNMI_HRX_JABBER,
+	SK_PNMI_HRX_CARRIER,
+	SK_PNMI_HRX_IRLENGTH,
+	SK_PNMI_HRX_SYMBOL,
+	SK_PNMI_HRX_SHORTS,
+	SK_PNMI_HRX_RUNT,
+	SK_PNMI_HRX_TOO_LONG,
+	SK_PNMI_HRX_FCS,
+	SK_PNMI_HRX_CEXT,
+	SK_PNMI_HRX_UTILUNDER,
+	SK_PNMI_HRX_UTILOVER,
+	SK_PNMI_HRX_64,
+	SK_PNMI_HRX_127,
+	SK_PNMI_HRX_255,
+	SK_PNMI_HRX_511,
+	SK_PNMI_HRX_1023,
+	SK_PNMI_HRX_MAX,
+	SK_PNMI_HRX_LONGFRAMES,
+	
+	SK_PNMI_HRX_RESERVED,
+	
+	SK_PNMI_MAX_IDX		/* NOTE: Ensure SK_PNMI_CNT_NO is set to this value */
+};
 
 /*
  * MAC specific data
  */
 typedef struct s_PnmiStatAddr {
-	SK_BOOL		GetOffset;	/* TRUE: Call GetStatVal function */
-	SK_U16		Param;		/* XMAC register containing value */
+	SK_U16		Reg;		/* MAC register containing the value */
+	SK_BOOL		GetOffset;	/* TRUE: Offset managed by PNMI (call GetStatVal())*/
 } SK_PNMI_STATADDR;
 
 

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