summaryrefslogtreecommitdiff
path: root/drivers/sk98lin
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/sk98lin')
-rw-r--r--drivers/sk98lin/Makefile6
-rw-r--r--drivers/sk98lin/h/lm80.h10
-rw-r--r--drivers/sk98lin/h/skaddr.h52
-rw-r--r--drivers/sk98lin/h/skcsum.h18
-rw-r--r--drivers/sk98lin/h/skdebug.h24
-rw-r--r--drivers/sk98lin/h/skdrv1st.h37
-rw-r--r--drivers/sk98lin/h/skdrv2nd.h86
-rw-r--r--drivers/sk98lin/h/skerror.h12
-rw-r--r--drivers/sk98lin/h/skgedrv.h12
-rw-r--r--drivers/sk98lin/h/skgehw.h14
-rw-r--r--drivers/sk98lin/h/skgehwt.h16
-rw-r--r--drivers/sk98lin/h/skgei2c.h36
-rw-r--r--drivers/sk98lin/h/skgeinit.h124
-rw-r--r--drivers/sk98lin/h/skgepnm2.h72
-rw-r--r--drivers/sk98lin/h/skgepnmi.h106
-rw-r--r--drivers/sk98lin/h/skgesirq.h50
-rw-r--r--drivers/sk98lin/h/ski2c.h51
-rw-r--r--drivers/sk98lin/h/skqueue.h31
-rw-r--r--drivers/sk98lin/h/skrlmt.h118
-rw-r--r--drivers/sk98lin/h/sktimer.h18
-rw-r--r--drivers/sk98lin/h/sktypes.h12
-rw-r--r--drivers/sk98lin/h/skversion.h18
-rw-r--r--drivers/sk98lin/h/skvpd.h30
-rw-r--r--drivers/sk98lin/h/xmac_ii.h72
-rw-r--r--drivers/sk98lin/skaddr.c290
-rw-r--r--drivers/sk98lin/skcsum.c28
-rw-r--r--drivers/sk98lin/skge.c468
-rw-r--r--drivers/sk98lin/skgehwt.c28
-rw-r--r--drivers/sk98lin/skgeinit.c226
-rw-r--r--drivers/sk98lin/skgemib.c17
-rw-r--r--drivers/sk98lin/skgepnmi.c529
-rw-r--r--drivers/sk98lin/skgesirq.c280
-rw-r--r--drivers/sk98lin/ski2c.c162
-rw-r--r--drivers/sk98lin/sklm80.c40
-rw-r--r--drivers/sk98lin/skproc.c79
-rw-r--r--drivers/sk98lin/skqueue.c46
-rw-r--r--drivers/sk98lin/skrlmt.c206
-rw-r--r--drivers/sk98lin/sktimer.c28
-rw-r--r--drivers/sk98lin/skvpd.c107
-rw-r--r--drivers/sk98lin/skxmac2.c478
-rw-r--r--drivers/sk98lin/uboot_drv.c2
-rw-r--r--drivers/sk98lin/uboot_skb.c2
42 files changed, 2005 insertions, 2036 deletions
diff --git a/drivers/sk98lin/Makefile b/drivers/sk98lin/Makefile
index f48b37ed9e..8ee0e216cd 100644
--- a/drivers/sk98lin/Makefile
+++ b/drivers/sk98lin/Makefile
@@ -29,8 +29,8 @@ include $(TOPDIR)/config.mk
LIB := libsk98lin.a
OBJS := skge.o skaddr.o skgehwt.o skgeinit.o skgepnmi.o skgesirq.o \
- ski2c.o sklm80.o skqueue.o skrlmt.o sktimer.o skvpd.o \
- skxmac2.o skcsum.o #skproc.o
+ ski2c.o sklm80.o skqueue.o skrlmt.o sktimer.o skvpd.o \
+ skxmac2.o skcsum.o #skproc.o
OBJS += uboot_skb.o uboot_drv.o
@@ -99,5 +99,3 @@ $(LIB): $(OBJS)
sinclude .depend
#########################################################################
-
-
diff --git a/drivers/sk98lin/h/lm80.h b/drivers/sk98lin/h/lm80.h
index 71cf19148f..981a4cab02 100644
--- a/drivers/sk98lin/h/lm80.h
+++ b/drivers/sk98lin/h/lm80.h
@@ -1,6 +1,6 @@
/******************************************************************************
*
- * Name: lm80.h
+ * Name: lm80.h
* Project: GEnesis, PCI Gigabit Ethernet Adapter
* Version: $Revision: 1.4 $
* Date: $Date: 2002/04/25 11:04:10 $
@@ -28,16 +28,16 @@
* $Log: lm80.h,v $
* Revision 1.4 2002/04/25 11:04:10 rschmidt
* Editorial changes
- *
+ *
* Revision 1.3 1999/11/22 13:41:19 cgoos
* Changed license header to GPL.
- *
+ *
* Revision 1.2 1999/03/12 13:26:51 malthoff
* remove __STDC__.
- *
+ *
* Revision 1.1 1998/06/19 09:28:31 malthoff
* created.
- *
+ *
*
******************************************************************************/
diff --git a/drivers/sk98lin/h/skaddr.h b/drivers/sk98lin/h/skaddr.h
index 7f85ea7e79..711f873e7f 100644
--- a/drivers/sk98lin/h/skaddr.h
+++ b/drivers/sk98lin/h/skaddr.h
@@ -28,90 +28,90 @@
* $Log: skaddr.h,v $
* Revision 1.26 2002/11/15 07:24:42 tschilli
* SK_ADDR_EQUAL macro fixed.
- *
+ *
* Revision 1.25 2002/06/10 13:55:18 tschilli
* Changes for handling YUKON.
* All changes are internally and not visible to the programmer
* using this module.
- *
+ *
* Revision 1.24 2001/01/22 13:41:34 rassmann
* Supporting two nets on dual-port adapters.
- *
+ *
* Revision 1.23 2000/08/10 11:27:50 rassmann
* Editorial changes.
* Preserving 32-bit alignment in structs for the adapter context.
- *
+ *
* Revision 1.22 2000/08/07 11:10:40 rassmann
* Editorial changes.
- *
+ *
* Revision 1.21 2000/05/04 09:39:59 rassmann
* Editorial changes.
* Corrected multicast address hashing.
- *
+ *
* Revision 1.20 1999/11/22 13:46:14 cgoos
* Changed license header to GPL.
* Allowing overwrite for SK_ADDR_EQUAL.
- *
+ *
* Revision 1.19 1999/05/28 10:56:07 rassmann
* Editorial changes.
- *
+ *
* Revision 1.18 1999/04/06 17:22:04 rassmann
* Added private "ActivePort".
- *
+ *
* Revision 1.17 1999/01/14 16:18:19 rassmann
* Corrected multicast initialization.
- *
+ *
* Revision 1.16 1999/01/04 10:30:36 rassmann
* SkAddrOverride only possible after SK_INIT_IO phase.
- *
+ *
* Revision 1.15 1998/12/29 13:13:11 rassmann
* An address override is now preserved in the SK_INIT_IO phase.
* All functions return an int now.
* Extended parameter checking.
- *
+ *
* Revision 1.14 1998/11/24 12:39:45 rassmann
* Reserved multicast entry for BPDU address.
* 13 multicast entries left for protocol.
- *
+ *
* Revision 1.13 1998/11/13 17:24:32 rassmann
* Changed return value of SkAddrOverride to int.
- *
+ *
* Revision 1.12 1998/11/13 16:56:19 rassmann
* Added macro SK_ADDR_COMPARE.
* Changed return type of SkAddrOverride to SK_BOOL.
- *
+ *
* Revision 1.11 1998/10/28 18:16:35 rassmann
* Avoiding I/Os before SK_INIT_RUN level.
* Aligning InexactFilter.
- *
+ *
* Revision 1.10 1998/10/22 11:39:10 rassmann
* Corrected signed/unsigned mismatches.
- *
+ *
* Revision 1.9 1998/10/15 15:15:49 rassmann
* Changed Flags Parameters from SK_U8 to int.
* Checked with lint.
- *
+ *
* Revision 1.8 1998/09/24 19:15:12 rassmann
* Code cleanup.
- *
+ *
* Revision 1.7 1998/09/18 20:22:13 rassmann
* Added HW access.
- *
+ *
* Revision 1.6 1998/09/04 19:40:20 rassmann
* Interface enhancements.
- *
+ *
* Revision 1.5 1998/09/04 12:40:57 rassmann
* Interface cleanup.
- *
+ *
* Revision 1.4 1998/09/04 12:14:13 rassmann
* Interface cleanup.
- *
+ *
* Revision 1.3 1998/09/02 16:56:40 rassmann
* Updated interface.
- *
+ *
* Revision 1.2 1998/08/27 14:26:09 rassmann
* Updated interface.
- *
+ *
* Revision 1.1 1998/08/21 08:31:08 rassmann
* First public version.
*
@@ -401,7 +401,7 @@ extern int SkAddrGmacPromiscuousChange(
SK_AC *pAC,
SK_IOC IoC,
SK_U32 PortNumber,
- int NewPromMode);
+ int NewPromMode);
extern int SkAddrSwap(
SK_AC *pAC,
diff --git a/drivers/sk98lin/h/skcsum.h b/drivers/sk98lin/h/skcsum.h
index b7226f1069..2acae329e3 100644
--- a/drivers/sk98lin/h/skcsum.h
+++ b/drivers/sk98lin/h/skcsum.h
@@ -28,34 +28,34 @@
* $Log: skcsum.h,v $
* Revision 1.9 2001/02/06 11:21:39 rassmann
* Editorial changes.
- *
+ *
* Revision 1.8 2001/02/06 11:15:36 rassmann
* Supporting two nets on dual-port adapters.
- *
+ *
* Revision 1.7 2000/06/29 13:17:05 rassmann
* Corrected reception of a packet with UDP checksum == 0 (which means there
* is no UDP checksum).
- *
+ *
* Revision 1.6 2000/02/28 12:33:44 cgoos
* Changed C++ style comments to C style.
- *
+ *
* Revision 1.5 2000/02/21 12:10:05 cgoos
* Fixed license comment.
- *
+ *
* Revision 1.4 2000/02/21 11:08:37 cgoos
* Merged changes back into common source.
- *
+ *
* Revision 1.1 1999/07/26 14:47:49 mkarl
* changed from common source to windows specific source
* added return SKCS_STATUS_IP_CSUM_ERROR_UDP and
* SKCS_STATUS_IP_CSUM_ERROR_TCP to pass the NidsTester
* changes for Tx csum offload
- *
+ *
* Revision 1.2 1998/09/04 12:16:34 mhaveman
* Checked in for Stephan to allow compilation.
* -Added definition SK_CSUM_EVENT_CLEAR_PROTO_STATS to clear statistic
* -Added prototype for SkCsEvent()
- *
+ *
* Revision 1.1 1998/09/01 15:36:53 swolf
* initial revision
*
@@ -130,7 +130,7 @@
* SKCS_STATUS_UDP_CSUM_ERROR - UDP checksum error (IP checksum ok).
* SKCS_STATUS_TCP_CSUM_OK - IP and TCP checksum ok.
* SKCS_STATUS_UDP_CSUM_OK - IP and UDP checksum ok.
- * SKCS_STATUS_IP_CSUM_OK_NO_UDP - IP checksum OK and no UDP checksum.
+ * SKCS_STATUS_IP_CSUM_OK_NO_UDP - IP checksum OK and no UDP checksum.
*/
#ifndef SKCS_OVERWRITE_STATUS /* User overwrite? */
#define SKCS_STATUS int /* Define status type. */
diff --git a/drivers/sk98lin/h/skdebug.h b/drivers/sk98lin/h/skdebug.h
index cc14e1c525..cf5b5ad332 100644
--- a/drivers/sk98lin/h/skdebug.h
+++ b/drivers/sk98lin/h/skdebug.h
@@ -28,42 +28,42 @@
* Revision 1.12 2002/07/15 15:37:13 rschmidt
* Power Management support
* Editorial changes
- *
+ *
* Revision 1.11 2002/04/25 11:04:39 rschmidt
* Editorial changes
- *
+ *
* Revision 1.10 1999/11/22 13:47:40 cgoos
* Changed license header to GPL.
- *
+ *
* Revision 1.9 1999/09/14 14:02:43 rwahl
* Added SK_DBGMOD_PECP.
- *
+ *
* Revision 1.8 1998/11/25 08:31:54 gklug
* fix: no C++ comments allowed in common sources
- *
+ *
* Revision 1.7 1998/11/24 16:47:24 swolf
* Driver may now define its own SK_DBG_MSG() (eg. in "h/skdrv1st.h").
- *
+ *
* Revision 1.6 1998/10/28 10:23:55 rassmann
* ADDED SK_DBGMOD_ADDR.
- *
+ *
* Revision 1.5 1998/10/22 09:43:55 gklug
* add: CSUM module
- *
+ *
* Revision 1.4 1998/10/01 07:54:44 gklug
* add: PNMI debug module
- *
+ *
* Revision 1.3 1998/09/18 08:32:34 afischer
* Macros changed according ssr-spec.:
* SK_DBG_MODCHK -> SK_DBG_CHKMOD
* SK_DBG_CATCHK -> SK_DBG_CHKCAT
- *
+ *
* Revision 1.2 1998/07/03 14:38:25 malthoff
* Add category SK_DBGCAT_FATAL.
- *
+ *
* Revision 1.1 1998/06/19 13:39:01 malthoff
* created.
- *
+ *
*
******************************************************************************/
diff --git a/drivers/sk98lin/h/skdrv1st.h b/drivers/sk98lin/h/skdrv1st.h
index 2d49941758..af34d7b96f 100644
--- a/drivers/sk98lin/h/skdrv1st.h
+++ b/drivers/sk98lin/h/skdrv1st.h
@@ -28,50 +28,50 @@
* $Log: skdrv1st.h,v $
* Revision 1.11 2003/02/25 14:16:40 mlindner
* Fix: Copyright statement
- *
+ *
* Revision 1.10 2002/10/02 12:46:02 mlindner
* Add: Support for Yukon
- *
+ *
* Revision 1.9.2.2 2001/12/07 12:06:42 mlindner
* Fix: malloc -> slab changes
- *
+ *
* Revision 1.9.2.1 2001/03/12 16:50:59 mlindner
* chg: kernel 2.4 adaption
- *
+ *
* Revision 1.9 2001/01/22 14:16:04 mlindner
* added ProcFs functionality
* Dual Net functionality integrated
* Rlmt networks added
- *
+ *
* Revision 1.8 2000/02/21 12:19:18 cgoos
* Added default for SK_DEBUG_CHKMOD/_CHKCAT
- *
+ *
* Revision 1.7 1999/11/22 13:50:00 cgoos
* Changed license header to GPL.
* Added overwrite for several functions.
* Removed linux 2.0.x definitions.
* Removed PCI vendor ID definition (now in kernel).
- *
+ *
* Revision 1.6 1999/07/27 08:03:33 cgoos
* Changed SK_IN/OUT macros to readX/writeX instead of memory
* accesses (necessary for ALPHA).
- *
+ *
* Revision 1.5 1999/07/23 12:10:21 cgoos
* Removed SK_RLMT_SLOW_LOOKAHEAD define.
- *
+ *
* Revision 1.4 1999/07/14 12:31:13 cgoos
* Added SK_RLMT_SLOW_LOOKAHEAD define.
- *
+ *
* Revision 1.3 1999/04/07 10:12:54 cgoos
* Added check for KERNEL and OPTIMIZATION defines.
- *
+ *
* Revision 1.2 1999/03/01 08:51:47 cgoos
* Fixed pcibios_read/write definitions.
- *
+ *
* Revision 1.1 1999/02/16 07:40:49 cgoos
* First version.
- *
- *
+ *
+ *
*
******************************************************************************/
@@ -179,7 +179,7 @@ typedef struct s_AC SK_AC;
#define SK_MEM_MAPPED_IO
-// #define SK_RLMT_SLOW_LOOKAHEAD
+/* #define SK_RLMT_SLOW_LOOKAHEAD */
#define SK_MAX_MACS 2
#define SK_MAX_NETS 2
@@ -199,9 +199,9 @@ typedef struct s_DrvRlmtMbuf SK_MBUF;
#define SK_STRCMP(pStr1,pStr2) strcmp((char*)(pStr1),(char*)(pStr2))
/* macros to access the adapter */
-#define SK_OUT8(b,a,v) writeb((v), ((b)+(a)))
-#define SK_OUT16(b,a,v) writew((v), ((b)+(a)))
-#define SK_OUT32(b,a,v) writel((v), ((b)+(a)))
+#define SK_OUT8(b,a,v) writeb((v), ((b)+(a)))
+#define SK_OUT16(b,a,v) writew((v), ((b)+(a)))
+#define SK_OUT32(b,a,v) writel((v), ((b)+(a)))
#define SK_IN8(b,a,pv) (*(pv) = readb((b)+(a)))
#define SK_IN16(b,a,pv) (*(pv) = readw((b)+(a)))
#define SK_IN32(b,a,pv) (*(pv) = readl((b)+(a)))
@@ -262,4 +262,3 @@ extern void SkDbgPrintf(const char *format,...);
extern void SkErrorLog(SK_AC*, int, int, char*);
#endif
-
diff --git a/drivers/sk98lin/h/skdrv2nd.h b/drivers/sk98lin/h/skdrv2nd.h
index 6ac884b4a8..a311827aa7 100644
--- a/drivers/sk98lin/h/skdrv2nd.h
+++ b/drivers/sk98lin/h/skdrv2nd.h
@@ -28,19 +28,19 @@
* $Log: skdrv2nd.h,v $
* Revision 1.15 2003/02/25 14:16:40 mlindner
* Fix: Copyright statement
- *
+ *
* Revision 1.14 2003/02/25 13:26:26 mlindner
* Add: Support for various vendors
- *
+ *
* Revision 1.13 2002/10/02 12:46:02 mlindner
* Add: Support for Yukon
- *
+ *
* Revision 1.12.2.2 2001/09/05 12:14:50 mlindner
* add: New hardware revision int
- *
+ *
* Revision 1.12.2.1 2001/03/12 16:50:59 mlindner
* chg: kernel 2.4 adaption
- *
+ *
* Revision 1.12 2001/03/01 12:52:15 mlindner
* Fixed ring size
*
@@ -66,28 +66,28 @@
*
* Revision 1.7 1999/09/28 12:38:21 cgoos
* Added CheckQueue to SK_AC.
- *
+ *
* Revision 1.6 1999/07/27 08:04:05 cgoos
* Added checksumming variables to SK_AC.
- *
+ *
* Revision 1.5 1999/03/29 12:33:26 cgoos
* Rreversed to fine lock granularity.
- *
+ *
* Revision 1.4 1999/03/15 12:14:02 cgoos
* Added DriverLock to SK_AC.
* Removed other locks.
- *
+ *
* Revision 1.3 1999/03/01 08:52:27 cgoos
* Changed pAC->PciDev declaration.
- *
+ *
* Revision 1.2 1999/02/18 10:57:14 cgoos
* Removed SkDrvTimeStamp prototype.
* Fixed SkGeOsGetTime prototype.
- *
+ *
* Revision 1.1 1999/02/16 07:41:01 cgoos
* First version.
- *
- *
+ *
+ *
*
******************************************************************************/
@@ -126,40 +126,40 @@
result = SK_FALSE; /* default */ \
/* 3Com (0x10b7) */ \
if (pdev->vendor == 0x10b7) { \
- /* Gigabit Ethernet Adapter (0x1700) */ \
- if ((pdev->device == 0x1700)) { \
- result = SK_TRUE; \
- } \
+ /* Gigabit Ethernet Adapter (0x1700) */ \
+ if ((pdev->device == 0x1700)) { \
+ result = SK_TRUE; \
+ } \
/* SysKonnect (0x1148) */ \
} else if (pdev->vendor == 0x1148) { \
- /* SK-98xx Gigabit Ethernet Server Adapter (0x4300) */ \
- /* SK-98xx V2 Gigabit Ethernet Adapter (0x4320) */ \
- if ((pdev->device == 0x4300) || \
- (pdev->device == 0x4320)) { \
- result = SK_TRUE; \
- } \
+ /* SK-98xx Gigabit Ethernet Server Adapter (0x4300) */ \
+ /* SK-98xx V2 Gigabit Ethernet Adapter (0x4320) */ \
+ if ((pdev->device == 0x4300) || \
+ (pdev->device == 0x4320)) { \
+ result = SK_TRUE; \
+ } \
/* D-Link (0x1186) */ \
} else if (pdev->vendor == 0x1186) { \
- /* Gigabit Ethernet Adapter (0x4c00) */ \
- if ((pdev->device == 0x4c00)) { \
- result = SK_TRUE; \
- } \
+ /* Gigabit Ethernet Adapter (0x4c00) */ \
+ if ((pdev->device == 0x4c00)) { \
+ result = SK_TRUE; \
+ } \
/* CNet (0x1371) */ \
} else if (pdev->vendor == 0x1371) { \
- /* GigaCard Network Adapter (0x434e) */ \
- if ((pdev->device == 0x434e)) { \
- result = SK_TRUE; \
- } \
+ /* GigaCard Network Adapter (0x434e) */ \
+ if ((pdev->device == 0x434e)) { \
+ result = SK_TRUE; \
+ } \
/* Linksys (0x1737) */ \
} else if (pdev->vendor == 0x1737) { \
- /* Gigabit Network Adapter (0x1032) */ \
- /* Gigabit Network Adapter (0x1064) */ \
- if ((pdev->device == 0x1032) || \
- (pdev->device == 0x1064)) { \
- result = SK_TRUE; \
- } \
+ /* Gigabit Network Adapter (0x1032) */ \
+ /* Gigabit Network Adapter (0x1064) */ \
+ if ((pdev->device == 0x1032) || \
+ (pdev->device == 0x1064)) { \
+ result = SK_TRUE; \
+ } \
} else { \
- result = SK_FALSE; \
+ result = SK_FALSE; \
} \
}
@@ -188,7 +188,6 @@ struct s_DrvRlmtMbuf {
};
-
/*
* ioctl definitions
*/
@@ -309,7 +308,6 @@ struct s_TxD {
#define TX_CTRL_LEN_MASK UINT32_C(0x0000FFFF)
-
/* The offsets of registers in the TX and RX queue control io area ***********/
#define RX_Q_BUF_CTRL_CNT 0x00
@@ -441,7 +439,7 @@ struct s_DevNet {
int Mtu;
int Up;
SK_AC *pAC;
-};
+};
typedef struct s_TxPort TX_PORT;
@@ -504,7 +502,7 @@ struct s_AC {
SK_PNMI_STRUCT_DATA PnmiStruct; /* structure to get all Pnmi-Data */
int RlmtMode; /* link check mode to set */
int RlmtNets; /* Number of nets */
-
+
SK_IOC IoBase; /* register set of adapter */
int BoardLevel; /* level of active hw init (0-2) */
char DeviceStr[80]; /* adapter string from vpd */
@@ -520,7 +518,7 @@ struct s_AC {
struct SK_NET_DEVICE *Next; /* link all devices (for clearing) */
int RxBufSize; /* length of receive buffers */
#if 0
- struct net_device_stats stats; /* linux 'netstat -i' statistics */
+ struct net_device_stats stats; /* linux 'netstat -i' statistics */
#endif
int Index; /* internal board index number */
@@ -560,6 +558,4 @@ struct s_AC {
};
-
#endif /* __INC_SKDRV2ND_H */
-
diff --git a/drivers/sk98lin/h/skerror.h b/drivers/sk98lin/h/skerror.h
index 573c84f004..a454d9daa9 100644
--- a/drivers/sk98lin/h/skerror.h
+++ b/drivers/sk98lin/h/skerror.h
@@ -27,23 +27,23 @@
* $Log: skerror.h,v $
* Revision 1.5 2002/04/25 11:05:10 rschmidt
* Editorial changes
- *
+ *
* Revision 1.4 1999/11/22 13:51:59 cgoos
* Changed license header to GPL.
- *
+ *
* Revision 1.3 1999/09/14 14:04:42 rwahl
* Added error base SK_ERRBASE_PECP.
* Changed error base for driver.
- *
+ *
* Revision 1.2 1998/08/11 11:15:41 gklug
* chg: comments
- *
+ *
* Revision 1.1 1998/08/11 11:09:38 gklug
* add: error bases
* add: error Classes
* first version
- *
- *
+ *
+ *
*
******************************************************************************/
diff --git a/drivers/sk98lin/h/skgedrv.h b/drivers/sk98lin/h/skgedrv.h
index a6bac08421..72ba9ce198 100644
--- a/drivers/sk98lin/h/skgedrv.h
+++ b/drivers/sk98lin/h/skgedrv.h
@@ -29,22 +29,22 @@
* Revision 1.6 2002/07/15 15:38:01 rschmidt
* Power Management support
* Editorial changes
- *
+ *
* Revision 1.5 2002/04/25 11:05:47 rschmidt
* Editorial changes
- *
+ *
* Revision 1.4 1999/11/22 13:52:46 cgoos
* Changed license header to GPL.
- *
+ *
* Revision 1.3 1998/12/01 13:31:39 cgoos
* SWITCH INTERN Event added.
- *
+ *
* Revision 1.2 1998/11/25 08:28:38 gklug
* rmv: PORT SWITCH Event
- *
+ *
* Revision 1.1 1998/09/29 06:14:07 gklug
* add: driver events (initial version)
- *
+ *
*
******************************************************************************/
diff --git a/drivers/sk98lin/h/skgehw.h b/drivers/sk98lin/h/skgehw.h
index 4d2499f23a..2c98427675 100644
--- a/drivers/sk98lin/h/skgehw.h
+++ b/drivers/sk98lin/h/skgehw.h
@@ -1781,7 +1781,7 @@ extern "C" {
WOL_CTL_DIS_LINK_CHG_UNIT | \
WOL_CTL_DIS_PATTERN_UNIT | \
WOL_CTL_DIS_MAGIC_PKT_UNIT)
-
+
/* WOL_MATCH_CTL 8 bit WOL Match Control Reg */
#define WOL_CTL_PATT_ENA(x) (BIT_0 << (x))
@@ -1825,7 +1825,7 @@ typedef struct s_HwRxd {
SK_U32 RxAdrHi; /* Physical Rx Buffer Address upper dword */
SK_U32 RxStat; /* Receive Frame Status Word */
SK_U32 RxTiSt; /* Receive Time Stamp (from XMAC on GENESIS) */
-#ifndef SK_USE_REV_DESC
+#ifndef SK_USE_REV_DESC
SK_U16 RxTcpSum1; /* TCP Checksum 1 */
SK_U16 RxTcpSum2; /* TCP Checksum 2 */
SK_U16 RxTcpSp1; /* TCP Checksum Calculation Start Position 1 */
@@ -1906,7 +1906,7 @@ typedef struct s_HwRxd {
*
* Use this macro to access the Receive and Transmit Queue Registers.
*
- * para:
+ * para:
* Queue Queue to access.
* Values: Q_R1, Q_R2, Q_XS1, Q_XA1, Q_XS2, and Q_XA2
* Offs Queue register offset.
@@ -1921,7 +1921,7 @@ typedef struct s_HwRxd {
*
* Use this macro to access the RAM Buffer Registers.
*
- * para:
+ * para:
* Queue Queue to access.
* Values: Q_R1, Q_R2, Q_XS1, Q_XA1, Q_XS2, and Q_XA2
* Offs Queue register offset.
@@ -1943,7 +1943,7 @@ typedef struct s_HwRxd {
*
* Use this macro to access a MAC Related Registers inside the ASIC.
*
- * para:
+ * para:
* Mac MAC to access.
* Values: MAC_1, MAC_2
* Offs MAC register offset.
@@ -2200,7 +2200,7 @@ typedef struct s_HwRxd {
#define PHY_ADDR_BCOM (1<<8)
#define PHY_ADDR_LONE (3<<8)
#define PHY_ADDR_NAT (0<<8)
-
+
/* GPHY address (bits 15..11 of SMI control reg) */
#define PHY_ADDR_MARV 0
@@ -2210,7 +2210,7 @@ typedef struct s_HwRxd {
* PHY_READ() read a 16 bit value from the PHY
* PHY_WRITE() write a 16 bit value to the PHY
*
- * para:
+ * para:
* IoC I/O context needed for SK I/O macros
* pPort Pointer to port struct for PhyAddr
* Mac XMAC to access values: MAC_1 or MAC_2
diff --git a/drivers/sk98lin/h/skgehwt.h b/drivers/sk98lin/h/skgehwt.h
index bc20ac4892..8aa9edd71c 100644
--- a/drivers/sk98lin/h/skgehwt.h
+++ b/drivers/sk98lin/h/skgehwt.h
@@ -29,22 +29,22 @@
* $Log: skgehwt.h,v $
* Revision 1.5 1999/11/22 13:54:24 cgoos
* Changed license header to GPL.
- *
+ *
* Revision 1.4 1998/08/19 09:50:58 gklug
* fix: remove struct keyword from c-code (see CCC) add typedefs
- *
+ *
* Revision 1.3 1998/08/14 07:09:29 gklug
* fix: chg pAc -> pAC
- *
+ *
* Revision 1.2 1998/08/07 12:54:21 gklug
* fix: first compiled version
- *
+ *
* Revision 1.1 1998/08/07 09:32:58 gklug
* first version
- *
- *
- *
- *
+ *
+ *
+ *
+ *
*
******************************************************************************/
diff --git a/drivers/sk98lin/h/skgei2c.h b/drivers/sk98lin/h/skgei2c.h
index 4e843a1085..e639f733c6 100644
--- a/drivers/sk98lin/h/skgei2c.h
+++ b/drivers/sk98lin/h/skgei2c.h
@@ -29,69 +29,69 @@
* Revision 1.23 2002/12/19 14:34:27 rschmidt
* Added cast in macros SK_I2C_SET_BIT() and SK_I2C_CLR_BIT()
* Editorial changes (TWSI)
- *
+ *
* Revision 1.22 2002/10/14 16:45:56 rschmidt
* Editorial changes (TWSI)
- *
+ *
* Revision 1.21 2002/08/13 08:42:24 rschmidt
* Changed define for SK_MIN_SENSORS back to 5
* Merged defines for PHY PLL 3V3 voltage (A and B)
* Editorial changes
- *
+ *
* Revision 1.20 2002/08/06 09:43:56 jschmalz
* Extensions and changes for Yukon
- *
+ *
* Revision 1.19 2002/08/02 12:00:08 rschmidt
* Added defines for YUKON sensors
* Editorial changes
- *
+ *
* Revision 1.18 2001/08/16 12:44:33 afischer
* LM80 sensor init values corrected
- *
+ *
* Revision 1.17 1999/11/22 13:55:25 cgoos
* Changed license header to GPL.
- *
+ *
* Revision 1.16 1999/11/12 08:24:10 malthoff
* Change voltage warning and error limits
* (warning +-5%, error +-10%).
- *
+ *
* Revision 1.15 1999/09/14 14:14:43 malthoff
* The 1000BT Dual Link adapter has got only one Fan.
* The second Fan has been removed.
- *
+ *
* Revision 1.14 1999/05/27 13:40:50 malthoff
* Fan Divisor = 1. Assuming fan with 6500 rpm.
- *
+ *
* Revision 1.13 1999/05/20 14:56:55 malthoff
* Bug Fix: Missing brace in SK_LM80_FAN_FAKTOR.
- *
+ *
* Revision 1.12 1999/05/20 09:22:00 cgoos
* Changes for 1000Base-T (Fan sensors).
- *
+ *
* Revision 1.11 1998/10/14 05:57:22 cgoos
* Fixed compilation warnings.
- *
+ *
* Revision 1.10 1998/09/04 08:37:00 malthoff
* bugfix: correct the SK_I2C_GET_CTL() macro.
- *
+ *
* Revision 1.9 1998/08/25 06:10:03 gklug
* add: thresholds for all sensors
*
* Revision 1.8 1998/08/20 11:37:42 gklug
* chg: change Ioc to IoC
- *
+ *
* Revision 1.7 1998/08/20 08:53:11 gklug
* fix: compiler errors
* add: Threshold values
- *
+ *
* Revision 1.6 1998/08/17 11:37:09 malthoff
* Bugfix in SK_I2C_CTL macro. The parameter 'dev'
* has to be shifted 9 bits.
- *
+ *
* Revision 1.5 1998/08/17 06:52:21 malthoff
* Remove unrequired macros.
* Add macros for accessing TWSI SW register.
- *
+ *
* Revision 1.4 1998/08/13 08:30:18 gklug
* add: conversion factors for read values
* add: new state SEN_VALEXT to read extension value of temperature sensor
diff --git a/drivers/sk98lin/h/skgeinit.h b/drivers/sk98lin/h/skgeinit.h
index f9148d1604..cdddef92b3 100644
--- a/drivers/sk98lin/h/skgeinit.h
+++ b/drivers/sk98lin/h/skgeinit.h
@@ -29,71 +29,71 @@
* 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(),
@@ -101,19 +101,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
@@ -128,150 +128,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 Auto-negotiation
- *
+ *
* Revision 1.30 1998/12/07 12:17:04 gklug
* 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().
*
@@ -338,7 +338,7 @@ extern "C" {
/* 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)
@@ -549,7 +549,7 @@ extern "C" {
#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 Rx Error bit for big frames */
-#define SK_BIG_PK_OK_OFF (1<<7) /* 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 */
diff --git a/drivers/sk98lin/h/skgepnm2.h b/drivers/sk98lin/h/skgepnm2.h
index 2a003545cc..5c44f47719 100644
--- a/drivers/sk98lin/h/skgepnm2.h
+++ b/drivers/sk98lin/h/skgepnm2.h
@@ -28,81 +28,81 @@
* $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
* - OID_SKGE_MTU added
- *
+ *
* Revision 1.29 2001/01/22 13:41:37 rassmann
* Supporting two nets on dual-port adapters.
- *
+ *
* Revision 1.28 2000/08/03 15:12:48 rwahl
* - Additional comment for MAC statistic data structure.
- *
+ *
* Revision 1.27 2000/08/01 16:10:18 rwahl
* - Added mac statistic data structure for StatRxLongFrame counter.
- *
+ *
* Revision 1.26 2000/03/31 13:51:34 rwahl
* Added SK_UPTR cast to offset calculation for PNMI struct fields;
* missing cast caused compiler warnings by Win64 compiler.
- *
+ *
* Revision 1.25 1999/11/22 13:57:41 cgoos
* Changed license header to GPL.
* Allowing overwrite for SK_PNMI_STORE/_READ defines.
- *
+ *
* Revision 1.24 1999/04/13 15:11:11 mhaveman
* Changed copyright.
- *
+ *
* Revision 1.23 1999/01/28 15:07:12 mhaveman
* Changed default threshold for port switches per hour from 10
* to 240 which means 4 switches per minute. This fits better
* the granularity of 32 for the port switch estimate
* counter.
- *
+ *
* Revision 1.22 1999/01/05 12:52:30 mhaveman
* Removed macro SK_PNMI_MICRO_SEC.
- *
+ *
* Revision 1.21 1999/01/05 12:50:34 mhaveman
* Enlarged macro definition SK_PNMI_HUNDREDS_SEC() so that no 64-bit
* arithmetic is necessary if SK_TICKS_PER_SEC is 100.
- *
+ *
* Revision 1.20 1998/12/09 14:02:53 mhaveman
* Defined macro SK_PNMI_DEF_RLMT_CHG_THRES for default port switch
* threshold.
- *
+ *
* Revision 1.19 1998/12/03 11:28:41 mhaveman
* Removed SK_PNMI_CHECKPTR macro.
- *
+ *
* Revision 1.18 1998/12/03 11:21:00 mhaveman
* -Added pointer check macro SK_PNMI_CHECKPTR
* -Added macros SK_PNMI_VPD_ARR_SIZE and SK_PNMI_VPD_STR_SIZE for
* VPD key evaluation.
- *
+ *
* Revision 1.17 1998/11/20 13:20:33 mhaveman
* Fixed bug in SK_PNMI_SET_STAT macro. ErrorStatus was not correctly set.
- *
+ *
* Revision 1.16 1998/11/20 08:08:49 mhaveman
* Macro SK_PNMI_CHECKFLAGS has got a if clause.
- *
+ *
* Revision 1.15 1998/11/03 13:53:40 mhaveman
* Fixed alignment problem in macor SK_PNMI_SET_STAT macro.
- *
+ *
* Revision 1.14 1998/10/30 15:50:13 mhaveman
* Added macro SK_PNMI_MICRO_SEC()
- *
+ *
* Revision 1.13 1998/10/30 12:32:20 mhaveman
* Added forgotten cast in SK_PNMI_READ_U32 macro.
*
@@ -110,46 +110,46 @@
* -Changed SK_PNMI_TRAP_SENSOR_LEN because SensorDescr has now
* variable string length.
* -Defined SK_PNMI_CHECKFLAGS macro
- *
+ *
* Revision 1.11 1998/10/29 08:53:34 mhaveman
* Removed SK_PNMI_RLM_XXX table indexed because these counters need
* not been saved over XMAC resets.
- *
+ *
* Revision 1.10 1998/10/28 08:48:20 mhaveman
* -Added macros for storage according to alignment
* -Changed type of Instance to SK_U32 because of VPD
* -Removed trap structures. Not needed because of alignment problem
* -Changed type of Action form SK_U8 to int
- *
+ *
* Revision 1.9 1998/10/21 13:34:45 mhaveman
* Shit, mismatched calculation of SK_PNMI_HUNDREDS_SEC. Corrected.
- *
+ *
* Revision 1.8 1998/10/21 13:24:58 mhaveman
* Changed calculation of hundreds of seconds.
- *
+ *
* Revision 1.7 1998/10/20 07:31:41 mhaveman
* Made type changes to unsigned int where possible.
- *
+ *
* Revision 1.6 1998/09/04 17:04:05 mhaveman
* Added Sync counters to offset storage to provided settled values on
* port switch.
- *
+ *
* Revision 1.5 1998/09/04 12:45:35 mhaveman
* Removed dummies for SK_DRIVER_ macros. They should be added by driver
* writer in skdrv2nd.h.
- *
+ *
* Revision 1.4 1998/09/04 11:59:50 mhaveman
* Everything compiles now. Driver Macros for counting still missing.
- *
+ *
* Revision 1.3 1998/08/24 12:01:35 mhaveman
* Intermediate state.
- *
+ *
* Revision 1.2 1998/08/17 07:51:40 mhaveman
* Intermediate state.
- *
+ *
* Revision 1.1 1998/08/11 09:08:40 mhaveman
* Intermediate state.
- *
+ *
****************************************************************************/
#ifndef _SKGEPNM2_H_
@@ -277,7 +277,7 @@ enum SK_MACSTATS {
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,
@@ -315,9 +315,9 @@ enum SK_MACSTATS {
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 */
};
diff --git a/drivers/sk98lin/h/skgepnmi.h b/drivers/sk98lin/h/skgepnmi.h
index c1f847e006..7532313ba8 100644
--- a/drivers/sk98lin/h/skgepnmi.h
+++ b/drivers/sk98lin/h/skgepnmi.h
@@ -28,44 +28,44 @@
* $Log: skgepnmi.h,v $
* Revision 1.59 2002/12/16 14:03:50 tschilli
* New defines for VCT added.
- *
+ *
* Revision 1.58 2002/12/16 09:04:59 tschilli
* Code for VCT handling added.
- *
+ *
* Revision 1.57 2002/09/26 12:41:05 tschilli
* SK_PNMI_PORT BufPort entry in struct SK_PNMI added.
- *
+ *
* Revision 1.56 2002/08/16 11:10:41 rwahl
* - Replaced c++ comment.
- *
+ *
* Revision 1.55 2002/08/09 15:40:21 rwahl
* Editorial change (renamed ConfSpeedCap).
- *
+ *
* Revision 1.54 2002/08/09 11:06:07 rwahl
* Added OID_SKGE_SPEED_CAP.
- *
+ *
* Revision 1.53 2002/08/09 09:45:28 rwahl
* Added support for NDIS OID_PNP_xxx.
* Editorial changes.
- *
+ *
* Revision 1.52 2002/08/06 17:54:07 rwahl
* - Added speed cap to PNMI config struct.
- *
+ *
* Revision 1.51 2002/07/17 19:19:26 rwahl
* - Added OID_SKGE_SPEED_MODE and OID_SKGE_SPEED_STATUS.
* - Added SK_PNMI_CNT_RX_PMACC_ERR() & SK_PNMI_CNT_RX_LONGFRAMES().
* - Added speed mode & status to PNMI config struct.
* - Editorial changes.
- *
+ *
* Revision 1.50 2002/05/22 08:59:37 rwahl
* Added string definitions for error msgs.
- *
+ *
* Revision 1.49 2001/11/20 09:23:50 rwahl
* - pnmi struct: reordered and aligned to 32bit.
- *
+ *
* Revision 1.48 2001/02/23 14:34:24 mkunz
* Changed macro PHYS2INST. Added pAC to Interface
- *
+ *
* Revision 1.47 2001/02/07 08:28:23 mkunz
* - Added Oids: OID_SKGE_DIAG_ACTION
* OID_SKGE_DIAG_RESULT
@@ -73,161 +73,161 @@
* OID_SKGE_CURRENT_PACKET_FILTER
* OID_SKGE_INTERMEDIATE_SUPPORT
* - Changed value of OID_SKGE_MTU
- *
+ *
* Revision 1.46 2001/02/06 10:01:41 mkunz
* - Pnmi V4 dual net support added. Interface functions and macros extended
* - Vpd bug fixed
* - OID_SKGE_MTU added
- *
+ *
* Revision 1.45 2001/01/22 13:41:37 rassmann
* Supporting two nets on dual-port adapters.
- *
+ *
* Revision 1.44 2000/09/07 07:35:27 rwahl
* - removed NDIS counter specific data type.
* - fixed spelling for OID_SKGE_RLMT_PORT_PREFERRED.
- *
+ *
* Revision 1.43 2000/08/04 11:41:08 rwahl
* - Fixed compiler warning (port is always >= 0) for macros
* SK_PNMI_CNT_RX_LONGFRAMES & SK_PNMI_CNT_SYNC_OCTETS
- *
+ *
* Revision 1.42 2000/08/03 15:14:07 rwahl
* - Corrected error in driver macros addressing a physical port.
- *
+ *
* Revision 1.41 2000/08/01 16:22:29 rwahl
* - Changed MDB version to 3.1.
* - Added definitions for StatRxLongFrames counter.
* - Added macro to be used by driver to count long frames received.
* - Added directive to control width (default = 32bit) of NDIS statistic
* counters (SK_NDIS_64BIT_CTR).
- *
+ *
* Revision 1.40 2000/03/31 13:51:34 rwahl
* Added SK_UPTR cast to offset calculation for PNMI struct fields;
* missing cast caused compiler warnings by Win64 compiler.
*
* Revision 1.39 1999/12/06 10:09:47 rwahl
* Added new error log message.
- *
+ *
* Revision 1.38 1999/11/22 13:57:55 cgoos
* Changed license header to GPL.
*
* Revision 1.37 1999/09/14 14:25:32 rwahl
* Set MDB version for 1000Base-T (sensors, Master/Slave) changes.
- *
+ *
* Revision 1.36 1999/05/20 09:24:56 cgoos
* Changes for 1000Base-T (sensors, Master/Slave).
- *
+ *
* Revision 1.35 1999/04/13 15:10:51 mhaveman
* Replaced RLMT macros SK_RLMT_CHECK_xxx again by those of PNMI to
* grant unified interface. But PNMI macros will store the same
* value as RLMT macros.
- *
+ *
* Revision 1.34 1999/04/13 15:03:49 mhaveman
* -Changed copyright
* -Removed SK_PNMI_RLMT_MODE_CHK_xxx macros. Those of RLMT should be
* used.
- *
+ *
* Revision 1.33 1999/03/23 10:41:02 mhaveman
* Changed comments.
- *
+ *
* Revision 1.32 1999/01/25 15:01:33 mhaveman
* Added support for multiple simultaniously active ports.
- *
+ *
* Revision 1.31 1999/01/19 10:06:26 mhaveman
* Added new error log message.
- *
+ *
* Revision 1.30 1999/01/05 10:34:49 mhaveman
* Fixed little error in RlmtChangeEstimate calculation.
- *
+ *
* Revision 1.29 1999/01/05 09:59:41 mhaveman
* Redesigned port switch average calculation to avoid 64bit
* arithmetic.
- *
+ *
* Revision 1.28 1998/12/08 10:05:48 mhaveman
* Defined macro SK_PNMI_MIN_STRUCT_SIZE.
- *
+ *
* Revision 1.27 1998/12/03 14:39:35 mhaveman
* Fixed problem that LSTAT was enumerated wrong.
- *
+ *
* Revision 1.26 1998/12/03 11:19:51 mhaveman
* Changed contents of errlog message SK_PNMI_ERR016MSG
- *
+ *
* Revision 1.25 1998/12/01 10:40:04 mhaveman
* Changed size of SensorNumber, ChecksumNumber and RlmtPortNumber in
* SK_PNMI_STRUCT_DATA to be conform with OID definition.
- *
+ *
* Revision 1.24 1998/11/20 08:09:27 mhaveman
* Added macros to convert between logical, physical port indexes and
* instances.
- *
+ *
* Revision 1.23 1998/11/10 13:41:13 mhaveman
* Needed to change interface, because NT driver needs a return value
* of needed buffer space on TOO_SHORT errors. Therefore all
* SkPnmiGet/Preset/Set functions now have a pointer to the length
* parameter, where the needed space on error is returned.
- *
+ *
* Revision 1.22 1998/11/03 12:05:51 mhaveman
* Added pAC parameter to counter macors.
*
* Revision 1.21 1998/11/02 10:47:36 mhaveman
* Added syslog messages for internal errors.
- *
+ *
* Revision 1.20 1998/10/30 15:49:36 mhaveman
* -Removed unused SK_PNMI_UTILIZATION_BASE and EstOldCnt.
* -Redefined SK_PNMI_CHG_EST_BASE to hundreds of seconds.
- *
+ *
* Revision 1.19 1998/10/29 15:38:44 mhaveman
* Changed string lengths of PNMI_STRUCT_DATA structure because
* string OIDs are now encoded with leading length ocetet.
- *
+ *
* Revision 1.18 1998/10/29 08:52:27 mhaveman
* -Added byte to strings in PNMI_STRUCT_DATA structure.
* -Shortened SK_PNMI_RLMT structure to SK_MAX_MACS elements.
- *
+ *
* Revision 1.17 1998/10/28 08:49:50 mhaveman
* -Changed type of Instance back to SK_U32 because of VPD
* -Changed type from SK_U8 to char of PciBusSpeed, PciBusWidth, PMD,
* and Connector.
- *
+ *
* Revision 1.16 1998/10/22 10:42:31 mhaveman
* -Removed (SK_U32) casts for OIDs
* -excluded NDIS OIDs when they are already defined with ifndef _NDIS_
- *
+ *
* Revision 1.15 1998/10/20 13:56:28 mhaveman
* Headerfile includes now directly other header files to comile correctly.
- *
+ *
* Revision 1.14 1998/10/20 07:31:09 mhaveman
* Made type changes to unsigned int where possible.
- *
+ *
* Revision 1.13 1998/10/19 10:53:13 mhaveman
* -Casted OID definitions to SK_U32
* -Renamed RlmtMAC... to RlmtPort...
* -Changed wrong type of VpdEntriesList from SK_U32 to char *
- *
+ *
* Revision 1.12 1998/10/13 07:42:27 mhaveman
* -Added OIDs OID_SKGE_TRAP_NUMBER and OID_SKGE_ALL_DATA
* -Removed old cvs history entries
* -Renamed MacNumber to PortNumber
- *
+ *
* Revision 1.11 1998/10/07 10:55:24 mhaveman
* -Added OID_MDB_VERSION. Therefore was a renumbering of the VPD OIDs
* necessary.
* -Added OID_GEN_ Ids to support the windows driver.
- *
+ *
* Revision 1.10 1998/09/30 13:41:10 mhaveman
* Renamed some OIDs to reduce usage of 'MAC' which is replaced by 'PORT'.
- *
+ *
* Revision 1.9 1998/09/04 17:06:17 mhaveman
* -Added SyncCounter as macro.
* -Renamed OID_SKGE_.._NO_DESCR_CTS to OID_SKGE_.._NO_BUF_CTS.
* -Added macros for driver description and version strings.
- *
+ *
* Revision 1.8 1998/09/04 14:36:52 mhaveman
* Added OIDs and Structure to access value of macro counters which are
* counted by the driver.
- *
+ *
* Revision 1.7 1998/09/04 11:59:36 mhaveman
* Everything compiles now. Driver Macros for counting still missing.
- *
+ *
****************************************************************************/
#ifndef _SKGEPNMI_H_
@@ -355,7 +355,7 @@
/* #define OID_802_3_MULTICAST_LIST 0x01010103 */
/* #define OID_802_3_MAXIMUM_LIST_SIZE 0x01010104 */
/* #define OID_802_3_MAC_OPTIONS 0x01010105 */
-
+
#define OID_802_3_RCV_ERROR_ALIGNMENT 0x01020101
#define OID_802_3_XMIT_ONE_COLLISION 0x01020102
#define OID_802_3_XMIT_MORE_COLLISIONS 0x01020103
@@ -389,7 +389,7 @@
#define OID_SKGE_VPD_VALUE 0xFF010106
#define OID_SKGE_VPD_ACCESS 0xFF010107
#define OID_SKGE_VPD_ACTION 0xFF010108
-
+
#define OID_SKGE_PORT_NUMBER 0xFF010110
#define OID_SKGE_DEVICE_TYPE 0xFF010111
#define OID_SKGE_DRIVER_DESCR 0xFF010112
@@ -436,7 +436,7 @@
#define OID_SKGE_SPEED_MODE 0xFF010171
#define OID_SKGE_SPEED_STATUS 0xFF010172
-#define OID_SKGE_SENSOR_NUMBER 0xFF020100
+#define OID_SKGE_SENSOR_NUMBER 0xFF020100
#define OID_SKGE_SENSOR_INDEX 0xFF020101
#define OID_SKGE_SENSOR_DESCR 0xFF020102
#define OID_SKGE_SENSOR_TYPE 0xFF020103
diff --git a/drivers/sk98lin/h/skgesirq.h b/drivers/sk98lin/h/skgesirq.h
index 574ca2204a..fc001b2376 100644
--- a/drivers/sk98lin/h/skgesirq.h
+++ b/drivers/sk98lin/h/skgesirq.h
@@ -28,87 +28,87 @@
* Revision 1.26 2002/10/14 09:52:36 rschmidt
* Added SKERR_SIRQ_E023 and SKERR_SIRQ_E023 for GPHY (Yukon)
* Editorial changes
- *
+ *
* Revision 1.25 2002/07/15 18:15:52 rwahl
* Editorial changes.
- *
+ *
* Revision 1.24 2002/07/15 15:39:21 rschmidt
* Corrected define for SKERR_SIRQ_E022
* Editorial changes
- *
+ *
* Revision 1.23 2002/04/25 11:09:45 rschmidt
* Removed declarations for SkXmInitPhy(), SkXmRxTxEnable()
* Editorial changes
- *
+ *
* Revision 1.22 2000/11/09 11:30:10 rassmann
* WA: Waiting after releasing reset until BCom chip is accessible.
- *
+ *
* Revision 1.21 2000/10/18 12:22:40 cgoos
* Added workaround for half duplex hangup.
- *
+ *
* Revision 1.20 1999/12/06 10:00:44 cgoos
* Added SET event for role.
- *
+ *
* Revision 1.19 1999/11/22 13:58:26 cgoos
* Changed license header to GPL.
- *
+ *
* Revision 1.18 1999/05/19 07:32:59 cgoos
* Changes for 1000Base-T.
- *
+ *
* Revision 1.17 1999/03/12 13:29:31 malthoff
* Move Autonegotiation Error Codes to skgeinit.h.
- *
+ *
* Revision 1.16 1999/03/08 10:11:28 gklug
* add: AutoNegDone return codes
- *
+ *
* Revision 1.15 1998/11/18 13:20:53 gklug
* add: different timeouts for active and non-active links
- *
+ *
* Revision 1.14 1998/11/04 07:18:14 cgoos
* Added prototype for SkXmRxTxEnable.
- *
+ *
* Revision 1.13 1998/10/21 05:52:23 gklug
* add: parameter DoLoop to InitPhy function
- *
+ *
* Revision 1.12 1998/10/19 06:45:03 cgoos
* Added prototype for SkXmInitPhy.
- *
+ *
* Revision 1.11 1998/10/15 14:34:10 gklug
* add: WA_TIME is 500 msec
- *
+ *
* Revision 1.10 1998/10/14 14:49:41 malthoff
* Remove err log defines E021 and E022. They are
* defined in skgeinit.h now.
*
* Revision 1.9 1998/10/14 14:00:39 gklug
* add: error logs for init phys
- *
+ *
* Revision 1.8 1998/10/14 05:44:05 gklug
* add: E020
- *
+ *
* Revision 1.7 1998/10/02 06:24:58 gklug
* add: error messages
- *
+ *
* Revision 1.6 1998/10/01 07:54:45 gklug
* add: PNMI debug module
- *
+ *
* Revision 1.5 1998/09/28 13:36:31 malthoff
* Move the bit definitions for Autonegotiation
* and Flow Control to skgeinit.h.
- *
+ *
* Revision 1.4 1998/09/15 12:29:34 gklug
* add: error logs
- *
+ *
* Revision 1.3 1998/09/03 13:54:02 gklug
* add: function prototypes
- *
+ *
* Revision 1.2 1998/09/03 10:24:36 gklug
* add: Events send by PNMI
* add: parameter definition for Flow Control etc.
- *
+ *
* Revision 1.1 1998/08/27 11:50:27 gklug
* initial revision
- *
+ *
*
******************************************************************************/
diff --git a/drivers/sk98lin/h/ski2c.h b/drivers/sk98lin/h/ski2c.h
index 5316bbacba..5ffaf6ede1 100644
--- a/drivers/sk98lin/h/ski2c.h
+++ b/drivers/sk98lin/h/ski2c.h
@@ -28,88 +28,88 @@
* $Log: ski2c.h,v $
* Revision 1.34 2003/01/28 09:11:21 rschmidt
* Editorial changes
- *
+ *
* Revision 1.33 2002/10/14 16:40:50 rschmidt
* Editorial changes (TWSI)
- *
+ *
* Revision 1.32 2002/08/13 08:55:07 rschmidt
* Editorial changes
- *
+ *
* Revision 1.31 2002/08/06 09:44:22 jschmalz
* Extensions and changes for Yukon
- *
+ *
* Revision 1.30 2001/04/05 11:38:09 rassmann
* Set SenState to idle in SkI2cWaitIrq().
* Changed error message in SkI2cWaitIrq().
- *
+ *
* Revision 1.29 2000/08/03 14:28:17 rassmann
* - Added function to wait for I2C being ready before resetting the board.
* - Replaced one duplicate "out of range" message with correct one.
- *
+ *
* Revision 1.28 1999/11/22 13:55:46 cgoos
* Changed license header to GPL.
- *
+ *
* Revision 1.27 1999/05/20 09:23:10 cgoos
* Changes for 1000Base-T (Fan sensors).
- *
+ *
* Revision 1.26 1998/12/01 13:45:47 gklug
* add: InitLevel to I2c struct
- *
+ *
* Revision 1.25 1998/11/03 06:55:16 gklug
* add: Dummy Reads to I2c struct
- *
+ *
* Revision 1.24 1998/10/02 14:28:59 cgoos
* Added prototype for SkI2cIsr.
- *
+ *
* Revision 1.23 1998/09/08 12:20:11 gklug
* add: prototypes for init and read functions
- *
+ *
* Revision 1.22 1998/09/08 07:37:56 gklug
* add: log error if PCI_IO voltage sensor could not be initialized
- *
+ *
* Revision 1.21 1998/09/04 08:38:05 malthoff
* Change the values for I2C_READ and I2C_WRITE
- *
+ *
* Revision 1.20 1998/08/25 07:52:22 gklug
* chg: Timestamps (last) added for logging
*
* Revision 1.19 1998/08/25 06:09:00 gklug
* rmv: warning and error levels of the individual sensors.
* add: timing definitions for sending traps and logging errors
- *
+ *
* Revision 1.18 1998/08/20 11:41:15 gklug
* chg: omit STRCPY macro by using char * as Sensor Description
- *
+ *
* Revision 1.17 1998/08/20 11:37:43 gklug
* chg: change Ioc to IoC
- *
+ *
* Revision 1.16 1998/08/20 11:30:38 gklug
* fix: SenRead declaration
- *
+ *
* Revision 1.15 1998/08/20 11:27:53 gklug
* fix: Compile bugs with new awrning constants
- *
+ *
* Revision 1.14 1998/08/20 08:53:12 gklug
* fix: compiler errors
* add: Threshold values
- *
+ *
* Revision 1.13 1998/08/19 12:21:16 gklug
* fix: remove struct from C files (see CCC)
* add: typedefs for all structs
- *
+ *
* Revision 1.12 1998/08/19 10:57:41 gklug
* add: Warning levels
- *
+ *
* Revision 1.11 1998/08/18 08:37:02 malthoff
* Prototypes not required for SK_DIAG.
- *
+ *
* Revision 1.10 1998/08/17 13:54:00 gklug
* fix: declaration of event function
- *
+ *
* Revision 1.9 1998/08/17 06:48:39 malthoff
* Remove some unrequired macros.
* Fix the compiler errors.
- *
+ *
* Revision 1.8 1998/08/14 06:47:19 gklug
* fix: Values are intergers
*
@@ -290,4 +290,3 @@ extern void SkI2cIsr(SK_AC *pAC, SK_IOC IoC);
#endif
#endif /* n_SKI2C_H */
-
diff --git a/drivers/sk98lin/h/skqueue.h b/drivers/sk98lin/h/skqueue.h
index 2bafd6e3eb..bce20a75b6 100644
--- a/drivers/sk98lin/h/skqueue.h
+++ b/drivers/sk98lin/h/skqueue.h
@@ -29,50 +29,50 @@
* $Log: skqueue.h,v $
* Revision 1.14 2002/03/15 10:52:13 mkunz
* Added event classes for link aggregation
- *
+ *
* Revision 1.13 1999/11/22 13:59:05 cgoos
* Changed license header to GPL.
- *
+ *
* Revision 1.12 1998/09/08 08:48:01 gklug
* add: init level handling
- *
+ *
* Revision 1.11 1998/09/03 14:15:11 gklug
* add: CSUM and HWAC Eventclass and function.
* fix: pParaPtr according to CCC
- *
+ *
* Revision 1.10 1998/08/20 12:43:03 gklug
* add: typedef SK_QUEUE
- *
+ *
* Revision 1.9 1998/08/19 09:50:59 gklug
* fix: remove struct keyword from c-code (see CCC) add typedefs
- *
+ *
* Revision 1.8 1998/08/18 07:00:01 gklug
* fix: SK_PTR not defined use void * instead.
- *
+ *
* Revision 1.7 1998/08/17 13:43:19 gklug
* chg: Parameter will be union of 64bit para, 2 times SK_U32 or SK_PTR
- *
+ *
* Revision 1.6 1998/08/14 07:09:30 gklug
* fix: chg pAc -> pAC
- *
+ *
* Revision 1.5 1998/08/11 14:26:44 gklug
* chg: Event Dispatcher returns now int.
- *
+ *
* Revision 1.4 1998/08/11 12:15:21 gklug
* add: Error numbers of skqueue module
- *
+ *
* Revision 1.3 1998/08/07 12:54:23 gklug
* fix: first compiled version
- *
+ *
* Revision 1.2 1998/08/07 09:34:00 gklug
* adapt structure defs to CCC
* add: prototypes for functions
- *
+ *
* Revision 1.1 1998/07/30 14:52:12 gklug
* Initial version.
* Defines Event Classes, Event structs and queue management variables.
- *
- *
+ *
+ *
*
******************************************************************************/
@@ -145,4 +145,3 @@ extern int SkEventDispatcher(SK_AC *pAC,SK_IOC Ioc);
#define SKERR_Q_E002 (SKERR_Q_E001+1)
#define SKERR_Q_E002MSG "Undefined event class"
#endif /* _SKQUEUE_H_ */
-
diff --git a/drivers/sk98lin/h/skrlmt.h b/drivers/sk98lin/h/skrlmt.h
index 651bb3f8d1..04d025b009 100644
--- a/drivers/sk98lin/h/skrlmt.h
+++ b/drivers/sk98lin/h/skrlmt.h
@@ -28,122 +28,122 @@
* $Log: skrlmt.h,v $
* Revision 1.35 2003/01/31 14:12:41 mkunz
* single port adapter runs now with two identical MAC addresses
- *
+ *
* Revision 1.34 2002/09/23 15:13:41 rwahl
* Editorial changes.
- *
+ *
* Revision 1.33 2001/07/03 12:16:48 mkunz
* New Flag ChgBcPrio (Change priority of last broadcast received)
- *
+ *
* Revision 1.32 2001/02/14 14:06:31 rassmann
* Editorial changes.
- *
+ *
* Revision 1.31 2001/02/05 14:25:26 rassmann
* Prepared RLMT for transparent operation.
- *
+ *
* Revision 1.30 2001/01/22 13:41:39 rassmann
* Supporting two nets on dual-port adapters.
- *
+ *
* Revision 1.29 2000/11/17 08:58:00 rassmann
* Moved CheckSwitch from SK_RLMT_PACKET_RECEIVED to SK_RLMT_TIM event.
- *
+ *
* Revision 1.28 2000/11/09 12:24:34 rassmann
* Editorial changes.
- *
+ *
* Revision 1.27 1999/11/22 13:59:56 cgoos
* Changed license header to GPL.
- *
+ *
* Revision 1.26 1999/10/04 14:01:19 rassmann
* Corrected reaction to reception of BPDU frames (#10441).
- *
+ *
* Revision 1.25 1999/07/20 12:53:39 rassmann
* Fixed documentation errors for lookahead macros.
- *
+ *
* Revision 1.24 1999/05/28 11:15:56 rassmann
* Changed behaviour to reflect Design Spec v1.2.
* Controlling Link LED(s).
* Introduced RLMT Packet Version field in RLMT Packet.
* Newstyle lookahead macros (checking meta-information before looking at
* the packet).
- *
+ *
* Revision 1.23 1999/01/28 12:50:42 rassmann
* Not using broadcast time stamps in CheckLinkState mode.
- *
+ *
* Revision 1.22 1999/01/27 14:13:04 rassmann
* Monitoring broadcast traffic.
* Switching more reliably and not too early if switch is
* configured for spanning tree.
- *
+ *
* Revision 1.21 1998/12/08 13:11:25 rassmann
* Stopping SegTimer at RlmtStop.
- *
+ *
* Revision 1.20 1998/11/24 12:37:33 rassmann
* Implemented segmentation check.
- *
+ *
* Revision 1.19 1998/11/17 13:43:06 rassmann
* Handling (logical) tx failure.
* Sending packet on logical address after PORT_SWITCH.
- *
+ *
* Revision 1.18 1998/11/13 16:56:56 rassmann
* Added macro version of SkRlmtLookaheadPacket.
- *
+ *
* Revision 1.17 1998/11/06 18:06:05 rassmann
* Corrected timing when RLMT checks fail.
* Clearing tx counter earlier in periodical checks.
- *
+ *
* Revision 1.16 1998/11/03 13:53:50 rassmann
* RLMT should switch now (at least in mode 3).
- *
+ *
* Revision 1.15 1998/10/22 11:39:52 rassmann
* Corrected signed/unsigned mismatches.
* Corrected receive list handling and address recognition.
- *
+ *
* Revision 1.14 1998/10/15 15:16:36 rassmann
* Finished Spanning Tree checking.
* Checked with lint.
- *
+ *
* Revision 1.13 1998/09/24 19:16:08 rassmann
* Code cleanup.
* Introduced Timer for PORT_DOWN due to no RX.
- *
+ *
* Revision 1.12 1998/09/16 11:09:52 rassmann
* Syntax corrections.
- *
+ *
* Revision 1.11 1998/09/15 11:28:50 rassmann
* Syntax corrections.
- *
+ *
* Revision 1.10 1998/09/14 17:07:38 rassmann
* Added code for port checking via LAN.
* Changed Mbuf definition.
- *
+ *
* Revision 1.9 1998/09/07 11:14:15 rassmann
* Syntax corrections.
- *
+ *
* Revision 1.8 1998/09/07 09:06:08 rassmann
* Syntax corrections.
- *
+ *
* Revision 1.7 1998/09/04 19:41:34 rassmann
* Syntax corrections.
* Started entering code for checking local links.
- *
+ *
* Revision 1.6 1998/09/04 12:14:28 rassmann
* Interface cleanup.
- *
+ *
* Revision 1.5 1998/09/02 16:55:29 rassmann
* Updated to reflect new DRV/HWAC/RLMT interface.
- *
+ *
* Revision 1.4 1998/09/02 07:26:02 afischer
* typedef for SK_RLMT_PORT
*
* Revision 1.3 1998/08/27 14:29:03 rassmann
* Code cleanup.
- *
+ *
* Revision 1.2 1998/08/27 14:26:25 rassmann
* Updated interface.
- *
+ *
* Revision 1.1 1998/08/21 08:29:10 rassmann
* First public version.
- *
+ *
******************************************************************************/
/******************************************************************************
@@ -296,28 +296,28 @@ unsigned *pNumBytes /* #Bytes to present to SK_RLMT_LOOKAHEAD */
*(pNumBytes) = 0; \
} \
else {\
- if ((_pAC->Rlmt.Port[_PortNum].Net->RlmtMode & SK_RLMT_TRANSPARENT) != 0) { \
- *(pNumBytes) = 0; \
- } \
- else if (IsBc) { \
- if (_pAC->Rlmt.Port[_PortNum].Net->RlmtMode != SK_RLMT_MODE_CLS) { \
- *(pNumBytes) = 6; \
- *(pOffset) = 6; \
- } \
- else { \
- *(pNumBytes) = 0; \
- } \
- } \
- else { \
- if ((PktLen) > SK_RLMT_MAX_TX_BUF_SIZE) { \
- /* _pAC->Rlmt.Port[_PortNum].DataPacketsPerTimeSlot++; */ \
- *(pNumBytes) = 0; \
- } \
- else { \
- *(pNumBytes) = 6; \
- *(pOffset) = 0; \
- } \
- } \
+ if ((_pAC->Rlmt.Port[_PortNum].Net->RlmtMode & SK_RLMT_TRANSPARENT) != 0) { \
+ *(pNumBytes) = 0; \
+ } \
+ else if (IsBc) { \
+ if (_pAC->Rlmt.Port[_PortNum].Net->RlmtMode != SK_RLMT_MODE_CLS) { \
+ *(pNumBytes) = 6; \
+ *(pOffset) = 6; \
+ } \
+ else { \
+ *(pNumBytes) = 0; \
+ } \
+ } \
+ else { \
+ if ((PktLen) > SK_RLMT_MAX_TX_BUF_SIZE) { \
+ /* _pAC->Rlmt.Port[_PortNum].DataPacketsPerTimeSlot++; */ \
+ *(pNumBytes) = 0; \
+ } \
+ else { \
+ *(pNumBytes) = 6; \
+ *(pOffset) = 0; \
+ } \
+ } \
} \
}
@@ -516,9 +516,9 @@ typedef struct s_Rlmt {
/* ----- Private part ----- */
SK_BOOL CheckSwitch;
- SK_BOOL RlmtOff; /* set to zero if the Mac addresses
- are equal or the second one
- is zero */
+ SK_BOOL RlmtOff; /* set to zero if the Mac addresses
+ are equal or the second one
+ is zero */
SK_U16 Align01;
} SK_RLMT;
diff --git a/drivers/sk98lin/h/sktimer.h b/drivers/sk98lin/h/sktimer.h
index 3f5cb1b1ea..36f8ccb6af 100644
--- a/drivers/sk98lin/h/sktimer.h
+++ b/drivers/sk98lin/h/sktimer.h
@@ -29,32 +29,32 @@
* $Log: sktimer.h,v $
* Revision 1.9 1999/11/22 14:00:29 cgoos
* Changed license header to GPL.
- *
+ *
* Revision 1.8 1998/09/08 08:48:02 gklug
* add: init level handling
- *
+ *
* Revision 1.7 1998/08/20 12:31:29 gklug
* fix: SK_TIMCTRL needs to be defined
- *
+ *
* Revision 1.6 1998/08/19 09:51:00 gklug
* fix: remove struct keyword from c-code (see CCC) add typedefs
- *
+ *
* Revision 1.5 1998/08/17 13:43:21 gklug
* chg: Parameter will be union of 64bit para, 2 times SK_U32 or SK_PTR
- *
+ *
* Revision 1.4 1998/08/14 07:09:31 gklug
* fix: chg pAc -> pAC
- *
+ *
* Revision 1.3 1998/08/07 12:54:24 gklug
* fix: first compiled version
- *
+ *
* Revision 1.2 1998/08/07 09:35:29 gklug
* add: Timer control struct for Adapters context
* add: function prototypes
- *
+ *
* Revision 1.1 1998/08/05 11:27:01 gklug
* First version: adapted from SMT
- *
+ *
*
******************************************************************************/
diff --git a/drivers/sk98lin/h/sktypes.h b/drivers/sk98lin/h/sktypes.h
index 929eca88e2..e657016e5b 100644
--- a/drivers/sk98lin/h/sktypes.h
+++ b/drivers/sk98lin/h/sktypes.h
@@ -20,7 +20,7 @@
* The information in this file is provided "AS IS" without warranty.
*
******************************************************************************/
-
+
/*****************************************************************************
*
* History:
@@ -28,15 +28,15 @@
* $Log: sktypes.h,v $
* Revision 1.3 2003/02/25 14:16:40 mlindner
* Fix: Copyright statement
- *
+ *
* Revision 1.2 1999/11/22 14:01:58 cgoos
* Changed license header to GPL.
* Now using Linux' fixed size types instead of standard types.
- *
+ *
* Revision 1.1 1999/02/16 07:41:40 cgoos
* First version.
- *
- *
+ *
+ *
*
*****************************************************************************/
@@ -46,7 +46,7 @@
*
* In this file, all data types that are needed by the common modules
* are mapped to Linux data types.
- *
+ *
*
* Include File Hierarchy:
*
diff --git a/drivers/sk98lin/h/skversion.h b/drivers/sk98lin/h/skversion.h
index 74c86080bc..ef466857d1 100644
--- a/drivers/sk98lin/h/skversion.h
+++ b/drivers/sk98lin/h/skversion.h
@@ -27,28 +27,26 @@
* $Log: skversion.h,v $
* Revision 1.4 2003/02/25 14:16:40 mlindner
* Fix: Copyright statement
- *
+ *
* Revision 1.3 2003/02/25 13:30:18 mlindner
* Add: Support for various vendors
- *
+ *
* Revision 1.1.2.1 2001/09/05 13:38:30 mlindner
* Removed FILE description
- *
+ *
* Revision 1.1 2001/03/06 09:25:00 mlindner
* first version
- *
- *
+ *
+ *
*
******************************************************************************/
-
-
+
+
static const char SysKonnectFileId[] = "@(#) (C) SysKonnect GmbH.";
static const char SysKonnectBuildNumber[] =
- "@(#)SK-BUILD: 6.05 PL: 01";
+ "@(#)SK-BUILD: 6.05 PL: 01";
#define BOOT_STRING "sk98lin: Network Device Driver v6.05\n" \
"(C)Copyright 1999-2003 Marvell(R)."
#define VER_STRING "6.05"
-
-
diff --git a/drivers/sk98lin/h/skvpd.h b/drivers/sk98lin/h/skvpd.h
index 243373578f..1be34c5a97 100644
--- a/drivers/sk98lin/h/skvpd.h
+++ b/drivers/sk98lin/h/skvpd.h
@@ -29,59 +29,59 @@
* Revision 1.15 2003/01/13 10:39:38 rschmidt
* Replaced define for PCI device Id for YUKON with GENESIS
* Editorial changes
- *
+ *
* Revision 1.14 2002/11/14 15:18:10 gheinig
* Added const specifier to key and buf parameters for VpdPara,VpdRead
* and VpdWrite. This is necessary for the Diag 7 GUI API
- *
+ *
* Revision 1.13 2002/10/14 15:58:18 rschmidt
* Added entry in rom_size struct s_vpd
* Editorial changes
- *
+ *
* Revision 1.12 2002/09/09 14:43:51 mkarl
* added PCI Id of Yukon for reading VPD in diag before the adapter has
* been initialized
* editorial changes
- *
+ *
* Revision 1.11 2002/07/26 13:19:16 mkarl
* added support for Yukon
* added vpd_size to VPD struct
- *
+ *
* Revision 1.10 2000/08/10 11:29:07 rassmann
* Editorial changes.
* Preserving 32-bit alignment in structs for the adapter context.
* Removed unused function VpdWriteDword() (#if 0).
* Made VpdReadKeyword() available for SKDIAG only.
- *
+ *
* Revision 1.9 1999/11/22 14:02:27 cgoos
* Changed license header to GPL.
- *
+ *
* Revision 1.8 1999/03/11 14:26:40 malthoff
* Replace __STDC__ with SK_KR_PROTO.
- *
+ *
* Revision 1.7 1998/10/28 07:27:17 gklug
* rmv: SWAP macros
* add: VPD_IN/OUT8 macros
* chg: interface definition
- *
+ *
* Revision 1.6 1998/10/22 10:03:44 gklug
* fix: use SK_OUT16 instead of SK_OUTW
- *
+ *
* Revision 1.5 1998/10/14 07:05:31 cgoos
* Changed constants in SK_SWAP_32 to UL.
- *
+ *
* Revision 1.4 1998/08/19 08:14:09 gklug
* fix: remove struct keyword as much as possible from the C-code (see CCC)
- *
+ *
* Revision 1.3 1998/08/18 08:18:56 malthoff
* Modify VPD in and out macros for SK_DIAG
- *
+ *
* Revision 1.2 1998/07/03 14:49:08 malthoff
* Add VPD_INxx() and VPD_OUTxx() macros for the Diagnostics tool.
- *
+ *
* Revision 1.1 1998/06/19 14:08:03 malthoff
* Created.
- *
+ *
*
******************************************************************************/
diff --git a/drivers/sk98lin/h/xmac_ii.h b/drivers/sk98lin/h/xmac_ii.h
index ddddd2b9e0..2ef903a87d 100644
--- a/drivers/sk98lin/h/xmac_ii.h
+++ b/drivers/sk98lin/h/xmac_ii.h
@@ -30,103 +30,103 @@
* Added defines for copper MDI/MDIX configuration
* Added defines for LED Control Register
* Editorial changes
- *
+ *
* Revision 1.45 2002/12/10 14:35:13 rschmidt
* Corrected defines for Extended PHY Specific Control
* Added defines for Ext. PHY Specific Ctrl 2 Reg. (Fiber specific)
- *
+ *
* Revision 1.44 2002/12/09 14:58:41 rschmidt
* Added defines for Ext. PHY Specific Ctrl Reg. (downshift feature)
* Added 'GMR_FS_UN_SIZE'-Bit to Rx GMAC FIFO Flush Mask
- *
+ *
* Revision 1.43 2002/12/05 10:14:45 rschmidt
* Added define for GMAC's Half Duplex Burst Mode
* Added define for Rx GMAC FIFO Flush Mask (default)
- *
+ *
* Revision 1.42 2002/11/12 16:48:19 rschmidt
* Added defines for Cable Diagnostic Register (GPHY)
* Editorial changes
- *
+ *
* Revision 1.41 2002/10/21 11:20:22 rschmidt
* Added bit GMR_FS_GOOD_FC to GMR_FS_ANY_ERR
* Editorial changes
- *
+ *
* Revision 1.40 2002/10/14 14:54:14 rschmidt
* Added defines for GPHY Specific Status and GPHY Interrupt Status
* Added bits PHY_M_IS_AN_ERROR and PHY_M_IS_FIFO_ERROR to PHY_M_DEF_MSK
* Editorial changes
- *
+ *
* Revision 1.39 2002/10/10 15:53:44 mkarl
* added some bit definitions for link speed status and LED's
- *
+ *
* Revision 1.38 2002/08/21 16:23:46 rschmidt
* Added defines for PHY Specific Ctrl Reg
* Editorial changes
- *
+ *
* Revision 1.37 2002/08/16 14:50:33 rschmidt
* Added defines for Auto-Neg. Advertisement YUKON Fiber (88E1011S only)
* Changed define PHY_M_DEF_MSK for GPHY IRQ Mask
* Editorial changes
- *
+ *
* Revision 1.36 2002/08/12 13:21:10 rschmidt
* Added defines for different Broadcom PHY Ids
- *
+ *
* Revision 1.35 2002/08/08 15:58:01 rschmidt
* Added defines for Manual LED Override register (YUKON)
* Editorial changes
- *
+ *
* Revision 1.34 2002/07/31 17:23:36 rwahl
* Added define GMR_FS_ANY_ERR (analogous to XMR_FS_ANY_ERR).
- *
+ *
* Revision 1.33 2002/07/23 16:03:37 rschmidt
* Added defines for GPHY registers
* Editorial changes
- *
+ *
* Revision 1.32 2002/07/15 18:14:37 rwahl
* Added GMAC MIB counters definitions.
* Editorial changes.
- *
+ *
* Revision 1.31 2002/07/15 15:42:50 rschmidt
* Removed defines from PHY specific reg. which are
* common to all PHYs
* Added defines for GMAC MIB Counters
* Editorial changes
- *
+ *
* Revision 1.30 2002/06/05 08:22:12 rschmidt
* Changed defines for GMAC Rx Control Register and Rx Status
* Editorial changes
- *
+ *
* Revision 1.29 2002/04/25 11:43:56 rschmidt
* Added define PHY_B_AS_PAUSE_MSK for BCom Pause Res.
* Added new registers and defines for YUKON (GMAC, GPHY)
* Added Receive Frame Status Encoding for YUKON
* Editorial changes
- *
+ *
* Revision 1.28 2000/11/09 12:32:49 rassmann
* Renamed variables.
- *
+ *
* Revision 1.27 2000/05/17 11:00:46 malthoff
* Add bit for enable/disable power management in BCOM chip.
- *
+ *
* Revision 1.26 1999/11/22 14:03:00 cgoos
* Changed license header to GPL.
- *
+ *
* Revision 1.25 1999/08/12 19:19:38 malthoff
* Add PHY_B_AC_TX_TST bit according to BCOM A1 errata sheet.
- *
+ *
* Revision 1.24 1999/07/30 11:27:21 cgoos
* Fixed a missing end-of-comment.
- *
+ *
* Revision 1.23 1999/07/30 07:03:31 malthoff
* Cut some long comments.
* Correct the XMAC PHY ID definitions.
- *
+ *
* Revision 1.22 1999/05/19 07:33:18 cgoos
* Changes for 1000Base-T.
- *
+ *
* Revision 1.21 1999/03/25 07:46:11 malthoff
* Add XM_HW_CFG, XM_TS_READ, and XM_TS_LOAD registers.
- *
+ *
* Revision 1.20 1999/03/12 13:36:09 malthoff
* Remove __STDC__.
*
@@ -912,7 +912,7 @@ extern "C" {
/* PHY_AN_LP_NP (see XMAC) Bit 3: Link Partner can Next Page */
/* PHY_AN_LOC_NP (see XMAC) Bit 2: Local PHY can Next Page */
/* PHY_AN_RX_PG (see XMAC) Bit 1: Page Received */
-#define PHY_B_AN_LP_CAP (1<<0) /* Bit 0: Link Partner Auto-Neg. Cap. */
+#define PHY_B_AN_LP_CAP (1<<0) /* Bit 0: Link Partner Auto-Neg. Cap. */
/***** PHY_LONE_AUNE_EXP 16 bit r/o Auto-Negotiation Expansion Reg *****/
#define PHY_L_AN_BP (1<<5) /* Bit 5: Base Page Indication */
@@ -920,7 +920,7 @@ extern "C" {
/* PHY_AN_LP_NP (see XMAC) Bit 3: Link Partner can Next Page */
/* PHY_AN_LOC_NP (see XMAC) Bit 2: Local PHY can Next Page */
/* PHY_AN_RX_PG (see XMAC) Bit 1: Page Received */
-#define PHY_B_AN_LP_CAP (1<<0) /* Bit 0: Link Partner Auto-Neg. Cap. */
+#define PHY_B_AN_LP_CAP (1<<0) /* Bit 0: Link Partner Auto-Neg. Cap. */
/***** PHY_XMAC_NEPG 16 bit r/w Next Page Register *****/
@@ -1315,7 +1315,7 @@ extern "C" {
#define PHY_M_PC_POL_R_DIS (1<<1) /* Bit 1: Polarity Reversal Disabled */
#define PHY_M_PC_DIS_JABBER (1<<0) /* Bit 0: Disable Jabber */
-#define PHY_M_PC_MDI_XMODE(x) SHIFT5(x)
+#define PHY_M_PC_MDI_XMODE(x) SHIFT5(x)
#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 */
@@ -1614,7 +1614,7 @@ extern "C" {
#define GM_GPSR_FC_RX_DIS (1<<2) /* Bit 2: Rx Flow Control Mode Disabled */
#define GM_GPSR_PROM_EN (1<<1) /* Bit 1: Promiscuous Mode Enabled */
/* Bit 0: reserved */
-
+
/* GM_GP_CTRL 16 bit r/w General Purpose Control Register */
/* Bit 15: reserved */
#define GM_GPCR_PROM_ENA (1<<14) /* Bit 14: Enable Promiscuous Mode */
@@ -1636,20 +1636,20 @@ extern "C" {
#define GM_GPCR_SPEED_1000 (GM_GPCR_GIGS_ENA | GM_GPCR_SPEED_100)
#define GM_GPCR_AU_ALL_DIS (GM_GPCR_AU_DUP_DIS | GM_GPCR_AU_FCT_DIS |\
GM_GPCR_AU_SPD_DIS)
-
+
/* GM_TX_CTRL 16 bit r/w Transmit Control Register */
#define GM_TXCR_FORCE_JAM (1<<15) /* Bit 15: Force Jam / Flow-Control */
#define GM_TXCR_CRC_DIS (1<<14) /* Bit 14: Disable insertion of CRC */
#define GM_TXCR_PAD_DIS (1<<13) /* Bit 13: Disable padding of packets */
#define GM_TXCR_COL_THR (4<<10) /* Bit 12..10: Collision Threshold */
-
+
/* GM_RX_CTRL 16 bit r/w Receive Control Register */
#define GM_RXCR_UCF_ENA (1<<15) /* Bit 15: Enable Unicast filtering */
#define GM_RXCR_MCF_ENA (1<<14) /* Bit 14: Enable Multicast filtering */
#define GM_RXCR_CRC_DIS (1<<13) /* Bit 13: Remove 4-byte CRC */
#define GM_RXCR_PASS_FC (1<<12) /* Bit 12: Pass FC packets to FIFO */
-
+
/* GM_TX_PARAM 16 bit r/w Transmit Parameter Register */
#define GM_TXPA_JAMLEN_MSK (0x03<<14) /* Bit 15..14: Jam Length */
#define GM_TXPA_JAMIPG_MSK (0x1f<<9) /* Bit 13..9: Jam IPG */
@@ -1666,7 +1666,7 @@ extern "C" {
#define GM_SMOD_JUMBO_ENA (1<<8) /* Bit 8: Enable Jumbo (Max. Frame Length) */
/* Bit 7..5: reserved */
#define GM_SMOD_IPG_MSK 0x1f /* Bit 4..0: Inter-Packet Gap (IPG) */
-
+
#define DATA_BLIND_VAL(x) SHIFT11(x)
#define DATA_BLIND_FAST_ETH 0x1c
#define DATA_BLIND_GIGABIT 4
@@ -1682,13 +1682,13 @@ extern "C" {
#define GM_SMI_CT_RD_VAL (1<<4) /* Bit 4: Read Valid (Read completed) */
#define GM_SMI_CT_BUSY (1<<3) /* Bit 3: Busy (Operation in progress) */
/* Bit 2..0: reserved */
-
+
/* GM_PHY_ADDR 16 bit r/w GPHY Address Register */
/* Bit 15..6: reserved */
#define GM_PAR_MIB_CLR (1<<5) /* Bit 5: Set MIB Clear Counter Mode */
#define GM_PAR_MIB_TST (1<<4) /* Bit 4: MIB Load Counter (Test Mode) */
/* Bit 3..0: reserved */
-
+
/* Receive Frame Status Encoding */
#define GMR_FS_LEN (0xffffUL<<16) /* Bit 31..16: Rx Frame Length */
/* Bit 15..14: reserved */
diff --git a/drivers/sk98lin/skaddr.c b/drivers/sk98lin/skaddr.c
index f2486032ee..ed79c049bb 100644
--- a/drivers/sk98lin/skaddr.c
+++ b/drivers/sk98lin/skaddr.c
@@ -29,170 +29,170 @@
* Revision 1.48 2003/02/12 17:09:37 tschilli
* Fix in SkAddrOverride() to set both (physical and logical) MAC addresses
* in case that both addresses are identical.
- *
+ *
* Revision 1.47 2002/09/17 06:31:10 tschilli
* Handling of SK_PROM_MODE_ALL_MC flag in SkAddrGmacMcUpdate()
* and SkAddrGmacPromiscuousChange() fixed.
* Editorial changes.
- *
+ *
* Revision 1.46 2002/08/22 07:55:41 tschilli
* New function SkGmacMcHash() for GMAC multicast hashing algorithm added.
* Editorial changes.
- *
+ *
* Revision 1.45 2002/08/15 12:29:35 tschilli
* SkAddrGmacMcUpdate() and SkAddrGmacPromiscuousChange() changed.
- *
+ *
* Revision 1.44 2002/08/14 12:18:03 rschmidt
* Replaced direct handling of MAC Hashing (XMAC and GMAC)
* with routine SkMacHashing().
* Replaced wrong 3rd para 'i' with 'PortNumber' in SkMacPromiscMode().
- *
+ *
* Revision 1.43 2002/08/13 09:37:43 rschmidt
* Corrected some SK_DBG_MSG outputs.
* Replaced wrong 2nd para pAC with IoC in SkMacPromiscMode().
* Editorial changes.
- *
+ *
* Revision 1.42 2002/08/12 11:24:36 rschmidt
* Remove setting of logical MAC address GM_SRC_ADDR_2 in SkAddrInit().
* Replaced direct handling of MAC Promiscuous Mode (XMAC and GMAC)
* with routine SkMacPromiscMode().
* Editorial changes.
- *
+ *
* Revision 1.41 2002/06/10 13:52:18 tschilli
* Changes for handling YUKON.
* All changes are internally and not visible to the programmer
* using this module.
- *
+ *
* Revision 1.40 2001/02/14 14:04:59 rassmann
* Editorial changes.
- *
+ *
* Revision 1.39 2001/01/30 10:30:04 rassmann
* Editorial changes.
- *
+ *
* Revision 1.38 2001/01/25 16:26:52 rassmann
* Ensured that logical address overrides are done on net's active port.
- *
+ *
* Revision 1.37 2001/01/22 13:41:34 rassmann
* Supporting two nets on dual-port adapters.
- *
+ *
* Revision 1.36 2000/08/07 11:10:39 rassmann
* Editorial changes.
- *
+ *
* Revision 1.35 2000/05/04 09:38:41 rassmann
* Editorial changes.
* Corrected multicast address hashing.
- *
+ *
* Revision 1.34 1999/11/22 13:23:44 cgoos
* Changed license header to GPL.
- *
+ *
* Revision 1.33 1999/05/28 10:56:06 rassmann
* Editorial changes.
- *
+ *
* Revision 1.32 1999/03/31 10:59:20 rassmann
* Returning Success instead of DupAddr if address shall be overridden
* with same value.
- *
+ *
* Revision 1.31 1999/01/14 16:18:17 rassmann
* Corrected multicast initialization.
- *
+ *
* Revision 1.30 1999/01/04 10:30:35 rassmann
* SkAddrOverride only possible after SK_INIT_IO phase.
- *
+ *
* Revision 1.29 1998/12/29 13:13:10 rassmann
* An address override is now preserved in the SK_INIT_IO phase.
* All functions return an int now.
* Extended parameter checking.
- *
+ *
* Revision 1.28 1998/12/01 11:45:53 rassmann
* Code cleanup.
- *
+ *
* Revision 1.27 1998/12/01 09:22:49 rassmann
* SkAddrMcAdd and SkAddrMcUpdate returned SK_MC_FILTERING_INEXACT
* too often.
- *
+ *
* Revision 1.26 1998/11/24 12:39:44 rassmann
* Reserved multicast entry for BPDU address.
* 13 multicast entries left for protocol.
- *
+ *
* Revision 1.25 1998/11/17 16:54:23 rassmann
* Using exact match for up to 14 multicast addresses.
* Still receiving all multicasts if more addresses are added.
- *
+ *
* Revision 1.24 1998/11/13 17:24:31 rassmann
* Changed return value of SkAddrOverride to int.
- *
+ *
* Revision 1.23 1998/11/13 16:56:18 rassmann
* Added macro SK_ADDR_COMPARE.
* Changed return type of SkAddrOverride to SK_BOOL.
- *
+ *
* Revision 1.22 1998/11/04 17:06:17 rassmann
* Corrected McUpdate and PromiscuousChange functions.
- *
+ *
* Revision 1.21 1998/10/29 14:34:04 rassmann
* Clearing SK_ADDR struct at startup.
- *
+ *
* Revision 1.20 1998/10/28 18:16:34 rassmann
* Avoiding I/Os before SK_INIT_RUN level.
* Aligning InexactFilter.
- *
+ *
* Revision 1.19 1998/10/28 11:29:28 rassmann
* Programming physical address in SkAddrMcUpdate.
* Corrected programming of exact match entries.
- *
+ *
* Revision 1.18 1998/10/28 10:34:48 rassmann
* Corrected reading of physical addresses.
- *
+ *
* Revision 1.17 1998/10/28 10:26:13 rassmann
* Getting ports' current MAC addresses from EPROM now.
* Added debug output.
- *
+ *
* Revision 1.16 1998/10/27 16:20:12 rassmann
* Reading MAC address byte by byte.
- *
+ *
* Revision 1.15 1998/10/22 11:39:09 rassmann
* Corrected signed/unsigned mismatches.
- *
+ *
* Revision 1.14 1998/10/19 17:12:35 rassmann
* Syntax corrections.
- *
+ *
* Revision 1.13 1998/10/19 17:02:19 rassmann
* Now reading permanent MAC addresses from CRF.
- *
+ *
* Revision 1.12 1998/10/15 15:15:48 rassmann
* Changed Flags Parameters from SK_U8 to int.
* Checked with lint.
- *
+ *
* Revision 1.11 1998/09/24 19:15:12 rassmann
* Code cleanup.
- *
+ *
* Revision 1.10 1998/09/18 20:18:54 rassmann
* Added HW access.
* Implemented swapping.
- *
+ *
* Revision 1.9 1998/09/16 11:32:00 rassmann
* Including skdrv1st.h again. :(
- *
+ *
* Revision 1.8 1998/09/16 11:09:34 rassmann
* Syntax corrections.
- *
+ *
* Revision 1.7 1998/09/14 17:06:34 rassmann
* Minor changes.
- *
+ *
* Revision 1.6 1998/09/07 08:45:41 rassmann
* Syntax corrections.
- *
+ *
* Revision 1.5 1998/09/04 19:40:19 rassmann
* Interface enhancements.
- *
+ *
* Revision 1.4 1998/09/04 12:14:12 rassmann
* Interface cleanup.
- *
+ *
* Revision 1.3 1998/09/02 16:56:40 rassmann
* Updated interface.
- *
+ *
* Revision 1.2 1998/08/27 14:26:09 rassmann
* Updated interface.
- *
+ *
* Revision 1.1 1998/08/21 08:30:22 rassmann
* First public version.
*
@@ -322,7 +322,7 @@ int Level) /* initialization level */
for (i = 0; i < SK_MAX_MACS; i++) {
pAPort = &pAC->Addr.Port[i];
pAPort->PromMode = SK_PROM_MODE_NONE;
-
+
pAPort->FirstExactMatchRlmt = SK_ADDR_FIRST_MATCH_RLMT;
pAPort->FirstExactMatchDrv = SK_ADDR_FIRST_MATCH_DRV;
pAPort->NextExactMatchRlmt = SK_ADDR_FIRST_MATCH_RLMT;
@@ -351,7 +351,7 @@ int Level) /* initialization level */
}
}
#endif /* DEBUG */
-
+
/* Read permanent logical MAC address from Control Register File. */
for (j = 0; j < SK_MAC_ADDR_LEN; j++) {
InAddr = (SK_U8 *) &pAC->Addr.Net[0].PermanentMacAddress.a[j];
@@ -392,7 +392,7 @@ int Level) /* initialization level */
pAC->Addr.Net[i].PermanentMacAddress.a[3],
pAC->Addr.Net[i].PermanentMacAddress.a[4],
pAC->Addr.Net[i].PermanentMacAddress.a[5]))
-
+
SK_DBG_MSG(pAC, SK_DBGMOD_ADDR, SK_DBGCAT_INIT,
("Logical MAC Address (Net%d): %02X %02X %02X %02X %02X %02X\n",
i,
@@ -426,7 +426,7 @@ int Level) /* initialization level */
/* Set port's current physical MAC address. */
OutAddr = (SK_U16 *) &pAPort->CurrentMacAddress.a[0];
-
+
if (pAC->GIni.GIChipId == CHIP_ID_GENESIS) {
XM_OUTADDR(IoC, i, XM_SA, OutAddr);
}
@@ -442,7 +442,7 @@ int Level) /* initialization level */
pAPort->PermanentMacAddress.a[3],
pAPort->PermanentMacAddress.a[4],
pAPort->PermanentMacAddress.a[5]))
-
+
SK_DBG_MSG(pAC, SK_DBGMOD_ADDR, SK_DBGCAT_INIT,
("SkAddrInit: Physical MAC Address: %02X %02X %02X %02X %02X %02X\n",
pAPort->CurrentMacAddress.a[0],
@@ -474,7 +474,7 @@ int Level) /* initialization level */
}
return (SK_ADDR_SUCCESS);
-
+
} /* SkAddrInit */
@@ -507,11 +507,11 @@ SK_U32 PortNumber, /* Index of affected port */
int Flags) /* permanent/non-perm, sw-only */
{
int ReturnCode;
-
+
if (PortNumber >= (SK_U32) pAC->GIni.GIMacsFound) {
return (SK_ADDR_ILLEGAL_PORT);
}
-
+
if (pAC->GIni.GIChipId == CHIP_ID_GENESIS) {
ReturnCode = SkAddrXmacMcClear(pAC, IoC, PortNumber, Flags);
}
@@ -573,7 +573,7 @@ int Flags) /* permanent/non-perm, sw-only */
}
return (SK_ADDR_SUCCESS);
-
+
} /* SkAddrXmacMcClear */
@@ -622,31 +622,31 @@ int Flags) /* permanent/non-perm, sw-only */
for (i = 0; i < 8; i++) {
pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i] = 0;
}
-
+
if (Flags & SK_ADDR_PERMANENT) { /* permanent => RLMT */
-
+
/* Copy DRV bits to InexactFilter. */
for (i = 0; i < 8; i++) {
pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i] |=
pAC->Addr.Port[PortNumber].InexactDrvFilter.Bytes[i];
-
+
/* Clear InexactRlmtFilter. */
pAC->Addr.Port[PortNumber].InexactRlmtFilter.Bytes[i] = 0;
- }
+ }
}
else { /* not permanent => DRV */
-
+
/* Copy RLMT bits to InexactFilter. */
for (i = 0; i < 8; i++) {
pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i] |=
pAC->Addr.Port[PortNumber].InexactRlmtFilter.Bytes[i];
-
+
/* Clear InexactDrvFilter. */
pAC->Addr.Port[PortNumber].InexactDrvFilter.Bytes[i] = 0;
}
}
-
+
#ifdef DEBUG
SK_DBG_MSG(pAC, SK_DBGMOD_ADDR, SK_DBGCAT_CTRL,
("GMAC InexactFilter (cleared): %02X %02X %02X %02X %02X %02X %02X %02X\n",
@@ -659,11 +659,11 @@ int Flags) /* permanent/non-perm, sw-only */
pAC->Addr.Port[PortNumber].InexactFilter.Bytes[6],
pAC->Addr.Port[PortNumber].InexactFilter.Bytes[7]))
#endif /* DEBUG */
-
+
if (!(Flags & SK_MC_SW_ONLY)) {
(void) SkAddrGmacMcUpdate(pAC, IoC, PortNumber);
}
-
+
return (SK_ADDR_SUCCESS);
} /* SkAddrGmacMcClear */
@@ -738,7 +738,7 @@ unsigned char *pMc) /* Multicast address */
for (Byte = 0; Byte < 6; Byte++) {
/* Get next byte. */
Data = (SK_U32) pMc[Byte];
-
+
/* Change bit order in byte. */
TmpData = Data;
for (Bit = 0; Bit < 8; Bit++) {
@@ -750,7 +750,7 @@ unsigned char *pMc) /* Multicast address */
}
TmpData >>= 1;
}
-
+
Crc ^= (Data << 24);
for (Bit = 0; Bit < 8; Bit++) {
if (Crc & 0x80000000) {
@@ -761,7 +761,7 @@ unsigned char *pMc) /* Multicast address */
}
}
}
-
+
return (Crc & ((1 << HASH_BITS) - 1));
} /* SkGmacMcHash */
@@ -800,11 +800,11 @@ SK_MAC_ADDR *pMc, /* multicast address to be added */
int Flags) /* permanent/non-permanent */
{
int ReturnCode;
-
+
if (PortNumber >= (SK_U32) pAC->GIni.GIMacsFound) {
return (SK_ADDR_ILLEGAL_PORT);
}
-
+
if (pAC->GIni.GIChipId == CHIP_ID_GENESIS) {
ReturnCode = SkAddrXmacMcAdd(pAC, IoC, PortNumber, pMc, Flags);
}
@@ -861,7 +861,7 @@ int Flags) /* permanent/non-permanent */
return (SK_MC_RLMT_OVERFLOW);
}
#endif /* DEBUG */
-
+
if (pAC->Addr.Port[PortNumber].NextExactMatchRlmt >
SK_ADDR_LAST_MATCH_RLMT) {
return (SK_MC_RLMT_OVERFLOW);
@@ -882,7 +882,7 @@ int Flags) /* permanent/non-permanent */
return (SK_MC_RLMT_OVERFLOW);
}
#endif /* DEBUG */
-
+
if (pAC->Addr.Port[PortNumber].NextExactMatchDrv <= SK_ADDR_LAST_MATCH_DRV) {
/* Set exact match entry. */
@@ -957,23 +957,23 @@ int Flags) /* permanent/non-permanent */
#ifndef SK_ADDR_CHEAT
SK_U32 HashBit;
#endif /* !defined(SK_ADDR_CHEAT) */
-
+
if (!(pMc->a[0] & SK_MC_BIT)) {
/* Hashing only possible with multicast addresses. */
return (SK_MC_ILLEGAL_ADDRESS);
}
-
+
#ifndef SK_ADDR_CHEAT
-
+
/* Compute hash value of address. */
HashBit = SkGmacMcHash(&pMc->a[0]);
-
+
if (Flags & SK_ADDR_PERMANENT) { /* permanent => RLMT */
-
+
/* Add bit to InexactRlmtFilter. */
pAC->Addr.Port[PortNumber].InexactRlmtFilter.Bytes[HashBit / 8] |=
1 << (HashBit % 8);
-
+
/* Copy bit to InexactFilter. */
for (i = 0; i < 8; i++) {
pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i] |=
@@ -993,11 +993,11 @@ int Flags) /* permanent/non-permanent */
#endif /* DEBUG */
}
else { /* not permanent => DRV */
-
+
/* Add bit to InexactDrvFilter. */
pAC->Addr.Port[PortNumber].InexactDrvFilter.Bytes[HashBit / 8] |=
1 << (HashBit % 8);
-
+
/* Copy bit to InexactFilter. */
for (i = 0; i < 8; i++) {
pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i] |=
@@ -1016,17 +1016,17 @@ int Flags) /* permanent/non-permanent */
pAC->Addr.Port[PortNumber].InexactDrvFilter.Bytes[7]))
#endif /* DEBUG */
}
-
+
#else /* SK_ADDR_CHEAT */
-
+
/* Set all bits in InexactFilter. */
for (i = 0; i < 8; i++) {
pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i] = 0xFF;
}
#endif /* SK_ADDR_CHEAT */
-
+
return (SK_MC_FILTERING_INEXACT);
-
+
} /* SkAddrGmacMcAdd */
@@ -1060,18 +1060,18 @@ SK_IOC IoC, /* I/O context */
SK_U32 PortNumber) /* Port Number */
{
int ReturnCode;
-
+
if (PortNumber >= (SK_U32) pAC->GIni.GIMacsFound) {
return (SK_ADDR_ILLEGAL_PORT);
}
-
+
if (pAC->GIni.GIChipId == CHIP_ID_GENESIS) {
ReturnCode = SkAddrXmacMcUpdate(pAC, IoC, PortNumber);
}
else {
ReturnCode = SkAddrGmacMcUpdate(pAC, IoC, PortNumber);
}
-
+
return (ReturnCode);
} /* SkAddrMcUpdate */
@@ -1110,7 +1110,7 @@ SK_U32 PortNumber) /* Port Number */
SK_DBG_MSG(pAC,SK_DBGMOD_ADDR, SK_DBGCAT_CTRL,
("SkAddrXmacMcUpdate on Port %u.\n", PortNumber))
-
+
pAPort = &pAC->Addr.Port[PortNumber];
#ifdef DEBUG
@@ -1127,7 +1127,7 @@ SK_U32 PortNumber) /* Port Number */
/* Clear other permanent exact match addresses on XMAC */
if (pAPort->NextExactMatchRlmt <= SK_ADDR_LAST_MATCH_RLMT) {
-
+
SkXmClrExactAddr(pAC, IoC, PortNumber, pAPort->NextExactMatchRlmt,
SK_ADDR_LAST_MATCH_RLMT);
}
@@ -1139,7 +1139,7 @@ SK_U32 PortNumber) /* Port Number */
/* Clear other non-permanent exact match addresses on XMAC */
if (pAPort->NextExactMatchDrv <= SK_ADDR_LAST_MATCH_DRV) {
-
+
SkXmClrExactAddr(pAC, IoC, PortNumber, pAPort->NextExactMatchDrv,
SK_ADDR_LAST_MATCH_DRV);
}
@@ -1149,18 +1149,18 @@ SK_U32 PortNumber) /* Port Number */
}
if (pAPort->PromMode & SK_PROM_MODE_ALL_MC) {
-
+
/* Set all bits in 64-bit hash register. */
XM_OUTHASH(IoC, PortNumber, XM_HSM, &OnesHash);
-
+
/* Enable Hashing */
SkMacHashing(pAC, IoC, PortNumber, SK_TRUE);
}
else if (Inexact != 0) {
-
+
/* Set 64-bit hash register to InexactFilter. */
XM_OUTHASH(IoC, PortNumber, XM_HSM, &pAPort->InexactFilter.Bytes[0]);
-
+
/* Enable Hashing */
SkMacHashing(pAC, IoC, PortNumber, SK_TRUE);
}
@@ -1175,7 +1175,7 @@ SK_U32 PortNumber) /* Port Number */
/* Set port's current physical MAC address. */
OutAddr = (SK_U16 *) &pAPort->CurrentMacAddress.a[0];
-
+
XM_OUTADDR(IoC, PortNumber, XM_SA, OutAddr);
#ifdef xDEBUG
@@ -1185,9 +1185,9 @@ SK_U32 PortNumber) /* Port Number */
/* Get exact match address i from port PortNumber. */
InAddr = (SK_U16 *) &InAddr8[0];
-
+
XM_INADDR(IoC, PortNumber, XM_EXM(i), InAddr);
-
+
SK_DBG_MSG(pAC,SK_DBGMOD_ADDR, SK_DBGCAT_CTRL,
("SkAddrXmacMcUpdate: MC address %d on Port %u: ",
"%02x %02x %02x %02x %02x %02x -- %02x %02x %02x %02x %02x %02x\n",
@@ -1206,7 +1206,7 @@ SK_U32 PortNumber) /* Port Number */
pAPort->Exact[i].a[4],
pAPort->Exact[i].a[5]))
}
-#endif /* DEBUG */
+#endif /* DEBUG */
/* Determine return value. */
if (Inexact == 0 && pAPort->PromMode == 0) {
@@ -1215,7 +1215,7 @@ SK_U32 PortNumber) /* Port Number */
else {
return (SK_MC_FILTERING_INEXACT);
}
-
+
} /* SkAddrXmacMcUpdate */
@@ -1252,47 +1252,47 @@ SK_U32 PortNumber) /* Port Number */
SK_DBG_MSG(pAC,SK_DBGMOD_ADDR, SK_DBGCAT_CTRL,
("SkAddrGmacMcUpdate on Port %u.\n", PortNumber))
-
+
pAPort = &pAC->Addr.Port[PortNumber];
#ifdef DEBUG
SK_DBG_MSG(pAC,SK_DBGMOD_ADDR, SK_DBGCAT_CTRL,
("Next0 on Port %d: %d\n", PortNumber, Next0[PortNumber]))
#endif /* DEBUG */
-
+
for (Inexact = 0, i = 0; i < 8; i++) {
Inexact |= pAPort->InexactFilter.Bytes[i];
}
-
+
/* Set 64-bit hash register to InexactFilter. */
GM_OUTHASH(IoC, PortNumber, GM_MC_ADDR_H1,
&pAPort->InexactFilter.Bytes[0]);
-
- if (pAPort->PromMode & SK_PROM_MODE_ALL_MC) {
-
+
+ if (pAPort->PromMode & SK_PROM_MODE_ALL_MC) {
+
/* Set all bits in 64-bit hash register. */
GM_OUTHASH(IoC, PortNumber, GM_MC_ADDR_H1, &OnesHash);
-
+
/* Enable Hashing */
SkMacHashing(pAC, IoC, PortNumber, SK_TRUE);
}
- else {
+ else {
/* Enable Hashing. */
SkMacHashing(pAC, IoC, PortNumber, SK_TRUE);
}
-
+
if (pAPort->PromMode != SK_PROM_MODE_NONE) {
(void) SkAddrGmacPromiscuousChange(pAC, IoC, PortNumber, pAPort->PromMode);
}
-
+
/* Set port's current physical MAC address. */
OutAddr = (SK_U16 *) &pAPort->CurrentMacAddress.a[0];
GM_OUTADDR(IoC, PortNumber, GM_SRC_ADDR_1L, OutAddr);
-
+
/* Set port's current logical MAC address. */
OutAddr = (SK_U16 *) &pAPort->Exact[0].a[0];
GM_OUTADDR(IoC, PortNumber, GM_SRC_ADDR_2L, OutAddr);
-
+
#ifdef DEBUG
SK_DBG_MSG(pAC, SK_DBGMOD_ADDR, SK_DBGCAT_CTRL,
("SkAddrGmacMcUpdate: Permanent Physical MAC Address: %02X %02X %02X %02X %02X %02X\n",
@@ -1302,7 +1302,7 @@ SK_U32 PortNumber) /* Port Number */
pAPort->Exact[0].a[3],
pAPort->Exact[0].a[4],
pAPort->Exact[0].a[5]))
-
+
SK_DBG_MSG(pAC, SK_DBGMOD_ADDR, SK_DBGCAT_CTRL,
("SkAddrGmacMcUpdate: Physical MAC Address: %02X %02X %02X %02X %02X %02X\n",
pAPort->CurrentMacAddress.a[0],
@@ -1312,7 +1312,7 @@ SK_U32 PortNumber) /* Port Number */
pAPort->CurrentMacAddress.a[4],
pAPort->CurrentMacAddress.a[5]))
#endif /* DEBUG */
-
+
/* Determine return value. */
if (Inexact == 0 && pAPort->PromMode == 0) {
return (SK_MC_FILTERING_EXACT);
@@ -1320,7 +1320,7 @@ SK_U32 PortNumber) /* Port Number */
else {
return (SK_MC_FILTERING_INEXACT);
}
-
+
} /* SkAddrGmacMcUpdate */
@@ -1433,7 +1433,7 @@ int Flags) /* logical/physical MAC address */
/* Change port's physical MAC address. */
OutAddr = (SK_U16 *) pNewAddr;
-
+
if (pAC->GIni.GIChipId == CHIP_ID_GENESIS) {
XM_OUTADDR(IoC, PortNumber, XM_SA, OutAddr);
}
@@ -1451,7 +1451,7 @@ int Flags) /* logical/physical MAC address */
pAC->Addr.Net[NetNumber].CurrentMacAddress.a)) {
return (SK_ADDR_SUCCESS);
}
-
+
for (i = 0; i < (SK_U32) pAC->GIni.GIMacsFound; i++) {
if (!pAC->Addr.Port[i].CurrentMacAddressSet) {
return (SK_ADDR_TOO_EARLY);
@@ -1462,7 +1462,7 @@ int Flags) /* logical/physical MAC address */
return (SK_ADDR_DUPLICATE_ADDRESS);
}
}
-
+
/*
* In case that the physical and the logical MAC addresses are equal
* we must also change the physical MAC address here.
@@ -1471,17 +1471,17 @@ int Flags) /* logical/physical MAC address */
*/
if (SK_ADDR_EQUAL(pAC->Addr.Port[PortNumber].CurrentMacAddress.a,
pAC->Addr.Port[PortNumber].Exact[0].a)) {
-
+
pAC->Addr.Port[PortNumber].PreviousMacAddress =
pAC->Addr.Port[PortNumber].CurrentMacAddress;
pAC->Addr.Port[PortNumber].CurrentMacAddress = *pNewAddr;
-
+
/* Report address change to RLMT. */
Para.Para32[0] = PortNumber;
Para.Para32[0] = -1;
SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_PORT_ADDR, Para);
}
-
+
/* Set PortNumber to number of net's active port. */
PortNumber = pAC->Rlmt.Net[NetNumber].
Port[pAC->Addr.Net[NetNumber].ActivePort]->PortNumber;
@@ -1497,7 +1497,7 @@ int Flags) /* logical/physical MAC address */
pAC->Addr.Net[NetNumber].PermanentMacAddress.a[3],
pAC->Addr.Net[NetNumber].PermanentMacAddress.a[4],
pAC->Addr.Net[NetNumber].PermanentMacAddress.a[5]))
-
+
SK_DBG_MSG(pAC,SK_DBGMOD_ADDR, SK_DBGCAT_CTRL,
("SkAddrOverride: New logical MAC Address: %02X %02X %02X %02X %02X %02X\n",
pAC->Addr.Net[NetNumber].CurrentMacAddress.a[0],
@@ -1508,12 +1508,12 @@ int Flags) /* logical/physical MAC address */
pAC->Addr.Net[NetNumber].CurrentMacAddress.a[5]))
#endif /* DEBUG */
- /* Write address to first exact match entry of active port. */
+ /* Write address to first exact match entry of active port. */
(void) SkAddrMcUpdate(pAC, IoC, PortNumber);
}
return (SK_ADDR_SUCCESS);
-
+
} /* SkAddrOverride */
@@ -1546,11 +1546,11 @@ SK_U32 PortNumber, /* port whose promiscuous mode changes */
int NewPromMode) /* new promiscuous mode */
{
int ReturnCode;
-
+
if (PortNumber >= (SK_U32) pAC->GIni.GIMacsFound) {
return (SK_ADDR_ILLEGAL_PORT);
}
-
+
if (pAC->GIni.GIChipId == CHIP_ID_GENESIS) {
ReturnCode = SkAddrXmacPromiscuousChange(pAC, IoC, PortNumber, NewPromMode);
}
@@ -1602,7 +1602,7 @@ int NewPromMode) /* new promiscuous mode */
/* Promiscuous mode! */
CurPromMode |= SK_PROM_MODE_LLC;
}
-
+
for (Inexact = 0xFF, i = 0; i < 8; i++) {
Inexact &= pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i];
}
@@ -1612,7 +1612,7 @@ int NewPromMode) /* new promiscuous mode */
else {
/* Get InexactModeBit (bit XM_MD_ENA_HASH in mode register) */
XM_IN16(IoC, PortNumber, XM_MODE, &LoMode);
-
+
InexactModeBit = (LoMode & XM_MD_ENA_HASH) != 0;
/* Read 64-bit hash register from XMAC */
@@ -1635,7 +1635,7 @@ int NewPromMode) /* new promiscuous mode */
if ((NewPromMode & SK_PROM_MODE_ALL_MC) &&
!(CurPromMode & SK_PROM_MODE_ALL_MC)) { /* All MC. */
-
+
/* Set all bits in 64-bit hash register. */
XM_OUTHASH(IoC, PortNumber, XM_HSM, &OnesHash);
@@ -1671,9 +1671,9 @@ int NewPromMode) /* new promiscuous mode */
/* Clear Promiscuous Mode */
SkMacPromiscMode(pAC, IoC, PortNumber, SK_FALSE);
}
-
+
return (SK_ADDR_SUCCESS);
-
+
} /* SkAddrXmacPromiscuousChange */
@@ -1722,17 +1722,17 @@ int NewPromMode) /* new promiscuous mode */
if (NewPromMode == CurPromMode) {
return (SK_ADDR_SUCCESS);
}
-
+
if ((NewPromMode & SK_PROM_MODE_ALL_MC) &&
!(CurPromMode & SK_PROM_MODE_ALL_MC)) { /* All MC */
-
+
/* Set all bits in 64-bit hash register. */
GM_OUTHASH(IoC, PortNumber, GM_MC_ADDR_H1, &OnesHash);
-
+
/* Enable Hashing */
SkMacHashing(pAC, IoC, PortNumber, SK_TRUE);
}
-
+
if ((CurPromMode & SK_PROM_MODE_ALL_MC) &&
!(NewPromMode & SK_PROM_MODE_ALL_MC)) { /* Norm. MC */
@@ -1746,19 +1746,19 @@ int NewPromMode) /* new promiscuous mode */
if ((NewPromMode & SK_PROM_MODE_LLC) &&
!(CurPromMode & SK_PROM_MODE_LLC)) { /* Prom. LLC */
-
+
/* Set the MAC to Promiscuous Mode. */
SkMacPromiscMode(pAC, IoC, PortNumber, SK_TRUE);
}
else if ((CurPromMode & SK_PROM_MODE_LLC) &&
!(NewPromMode & SK_PROM_MODE_LLC)) { /* Norm. LLC */
-
+
/* Clear Promiscuous Mode. */
SkMacPromiscMode(pAC, IoC, PortNumber, SK_FALSE);
}
return (SK_ADDR_SUCCESS);
-
+
} /* SkAddrGmacPromiscuousChange */
@@ -1827,33 +1827,33 @@ SK_U32 ToPortNumber) /* Port2 Index */
pAC->Addr.Port[ToPortNumber].InexactFilter.Bytes[i];
pAC->Addr.Port[ToPortNumber].InexactFilter.Bytes[i] = Byte;
}
-
+
i = pAC->Addr.Port[FromPortNumber].PromMode;
pAC->Addr.Port[FromPortNumber].PromMode = pAC->Addr.Port[ToPortNumber].PromMode;
pAC->Addr.Port[ToPortNumber].PromMode = i;
-
+
if (pAC->GIni.GIChipId == CHIP_ID_GENESIS) {
DWord = pAC->Addr.Port[FromPortNumber].FirstExactMatchRlmt;
pAC->Addr.Port[FromPortNumber].FirstExactMatchRlmt =
pAC->Addr.Port[ToPortNumber].FirstExactMatchRlmt;
pAC->Addr.Port[ToPortNumber].FirstExactMatchRlmt = DWord;
-
+
DWord = pAC->Addr.Port[FromPortNumber].NextExactMatchRlmt;
pAC->Addr.Port[FromPortNumber].NextExactMatchRlmt =
pAC->Addr.Port[ToPortNumber].NextExactMatchRlmt;
pAC->Addr.Port[ToPortNumber].NextExactMatchRlmt = DWord;
-
+
DWord = pAC->Addr.Port[FromPortNumber].FirstExactMatchDrv;
pAC->Addr.Port[FromPortNumber].FirstExactMatchDrv =
pAC->Addr.Port[ToPortNumber].FirstExactMatchDrv;
pAC->Addr.Port[ToPortNumber].FirstExactMatchDrv = DWord;
-
+
DWord = pAC->Addr.Port[FromPortNumber].NextExactMatchDrv;
pAC->Addr.Port[FromPortNumber].NextExactMatchDrv =
pAC->Addr.Port[ToPortNumber].NextExactMatchDrv;
pAC->Addr.Port[ToPortNumber].NextExactMatchDrv = DWord;
}
-
+
/* CAUTION: Solution works if only ports of one adapter are in use. */
for (i = 0; (SK_U32) i < pAC->Rlmt.Net[pAC->Rlmt.Port[ToPortNumber].
Net->NetNumber].NumPorts; i++) {
@@ -1864,12 +1864,12 @@ SK_U32 ToPortNumber) /* Port2 Index */
/* 20001207 RA: Was "ToPortNumber;". */
}
}
-
+
(void) SkAddrMcUpdate(pAC, IoC, FromPortNumber);
(void) SkAddrMcUpdate(pAC, IoC, ToPortNumber);
return (SK_ADDR_SUCCESS);
-
+
} /* SkAddrSwap */
#ifdef __cplusplus
diff --git a/drivers/sk98lin/skcsum.c b/drivers/sk98lin/skcsum.c
index 0fd70301b6..a5dc572587 100644
--- a/drivers/sk98lin/skcsum.c
+++ b/drivers/sk98lin/skcsum.c
@@ -30,39 +30,39 @@
* Fix in SkCsGetSendInfo():
* - function did not return ProtocolFlags in every case.
* - pseudo header csum calculated wrong for big endian.
- *
+ *
* Revision 1.9 2001/06/13 07:42:08 gklug
* fix: NetNumber was wrong in CLEAR_STAT event
* add: check for good NetNumber in Clear STAT
- *
+ *
* Revision 1.8 2001/02/06 11:15:36 rassmann
* Supporting two nets on dual-port adapters.
- *
+ *
* Revision 1.7 2000/06/29 13:17:05 rassmann
* Corrected reception of a packet with UDP checksum == 0 (which means there
* is no UDP checksum).
- *
+ *
* Revision 1.6 2000/02/21 12:35:10 cgoos
* Fixed license header comment.
- *
+ *
* Revision 1.5 2000/02/21 11:05:19 cgoos
* Merged changes back to common source.
* Fixed rx path for BIG ENDIAN architecture.
- *
+ *
* Revision 1.1 1999/07/26 15:28:12 mkarl
* added return SKCS_STATUS_IP_CSUM_ERROR_UDP and
* SKCS_STATUS_IP_CSUM_ERROR_TCP to pass the NidsTester
* changed from common source to windows specific source
* therefore restarting with v1.0
- *
+ *
* Revision 1.3 1999/05/10 08:39:33 mkarl
* prevent overflows in SKCS_HTON16
* fixed a bug in pseudo header checksum calculation
* added some comments
- *
+ *
* Revision 1.2 1998/10/22 11:53:28 swolf
* Now using SK_DBG_MSG.
- *
+ *
* Revision 1.1 1998/09/01 15:35:41 swolf
* initial revision
*
@@ -427,7 +427,7 @@ int NetNumber) /* Net number */
SKCS_OFS_IP_DESTINATION_ADDRESS + 2) +
(unsigned long) SKCS_HTON16(NextLevelProtocol) +
(unsigned long) SKCS_HTON16(IpDataLength);
-
+
/* Add-in any carries. */
SKCS_OC_ADD(PseudoHeaderChecksum, PseudoHeaderChecksum, 0);
@@ -602,9 +602,9 @@ int NetNumber) /* Net number */
* us to check upper-layer checksums, because we cannot do any further
* processing of the packet without a valid IP checksum.
*/
-
+
/* Get the next level protocol identifier. */
-
+
NextLevelProtocol = *(SK_U8 *)
SKCS_IDX(pIpHeader, SKCS_OFS_IP_NEXT_LEVEL_PROTOCOL);
@@ -680,7 +680,7 @@ int NetNumber) /* Net number */
*(SK_U16*)SKCS_IDX(pIpHeader, IpHeaderLength + 6) == 0x0000) {
NextLevelProtoStats->RxOkCts++;
-
+
return (SKCS_STATUS_IP_CSUM_OK_NO_UDP);
}
@@ -735,7 +735,7 @@ int NetNumber) /* Net number */
return (NextLevelProtocol == SKCS_PROTO_ID_TCP ?
SKCS_STATUS_TCP_CSUM_OK : SKCS_STATUS_UDP_CSUM_OK);
}
-
+
/* TCP/UDP checksum error. */
NextLevelProtoStats->RxErrCts++;
diff --git a/drivers/sk98lin/skge.c b/drivers/sk98lin/skge.c
index 01a72e13cb..ff7e2af779 100644
--- a/drivers/sk98lin/skge.c
+++ b/drivers/sk98lin/skge.c
@@ -7,7 +7,7 @@
* Purpose: The main driver source module
*
******************************************************************************/
-
+
/******************************************************************************
*
* (C)Copyright 1998-2003 SysKonnect GmbH.
@@ -31,7 +31,7 @@
* SK-9843 (single link 1000Base-SX V2)
* SK-9821 (single link 1000Base-T V2)
*
- * Created 10-Feb-1999, based on Linux' acenic.c, 3c59x.c and
+ * Created 10-Feb-1999, based on Linux' acenic.c, 3c59x.c and
* SysKonnects GEnesis Solaris driver
* Author: Christoph Goos (cgoos@syskonnect.de)
* Mirko Lindner (mlindner@syskonnect.de)
@@ -41,7 +41,7 @@
* The technical manual for the adapters is available from SysKonnect's
* web pages: www.syskonnect.com
* Goto "Support" and search Knowledge Base for "manual".
- *
+ *
* 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
* the Free Software Foundation; either version 2 of the License, or
@@ -58,25 +58,25 @@
* $Log: skge.c,v $
* Revision 1.46 2003/02/25 14:16:36 mlindner
* Fix: Copyright statement
- *
+ *
* Revision 1.45 2003/02/25 13:25:55 mlindner
* Add: Performance improvements
* Add: Support for various vendors
* Fix: Init function
- *
+ *
* Revision 1.44 2003/01/09 09:25:26 mlindner
* Fix: Remove useless init_module/cleanup_module forward declarations
- *
+ *
* Revision 1.43 2002/11/29 08:42:41 mlindner
* Fix: Boot message
- *
+ *
* Revision 1.42 2002/11/28 13:30:23 mlindner
* Add: New frame check
- *
+ *
* Revision 1.41 2002/11/27 13:55:18 mlindner
* Fix: Drop wrong csum packets
* Fix: Initialize proc_entry after hw check
- *
+ *
* Revision 1.40 2002/10/31 07:50:37 tschilli
* Function SkGeInitAssignRamToQueues() from common module inserted.
* Autonegotiation is set to ON for all adapters.
@@ -84,7 +84,7 @@
* Role parameter will show up for 1000 Mbps links only.
* GetConfiguration() inserted after init level 1 in SkGeChangeMtu().
* All return values of SkGeInit() and SkGeInitPort() are checked.
- *
+ *
* Revision 1.39 2002/10/02 12:56:05 mlindner
* Add: Support for Yukon
* Add: Support for ZEROCOPY, scatter-gather and hw checksum
@@ -96,64 +96,64 @@
* Add: Frame length check
* Fix: Transmit complete interrupt
* Fix: Interrupt moderation
- *
+ *
* Revision 1.29.2.13 2002/01/14 12:44:52 mlindner
* Fix: Rlmt modes
- *
+ *
* Revision 1.29.2.12 2001/12/07 12:06:18 mlindner
* Fix: malloc -> slab changes
- *
+ *
* Revision 1.29.2.11 2001/12/06 15:19:20 mlindner
* Add: DMA attributes
* Fix: Module initialisation
* Fix: pci_map_single and pci_unmap_single replaced
- *
+ *
* Revision 1.29.2.10 2001/12/06 09:56:50 mlindner
* Corrected some printk's
- *
+ *
* Revision 1.29.2.9 2001/09/05 12:15:34 mlindner
* Add: LBFO Changes
* Fix: Counter Errors (Jumbo == to long errors)
* Fix: Changed pAC->PciDev declaration
* Fix: too short counters
- *
+ *
* Revision 1.29.2.8 2001/06/25 12:10:44 mlindner
* fix: ReceiveIrq() changed.
- *
+ *
* Revision 1.29.2.7 2001/06/25 08:07:05 mlindner
* fix: RLMT locking in ReceiveIrq() changed.
- *
+ *
* Revision 1.29.2.6 2001/05/21 07:59:29 mlindner
* fix: MTU init problems
- *
+ *
* Revision 1.29.2.5 2001/05/08 11:25:08 mlindner
* fix: removed VLAN error message
- *
+ *
* Revision 1.29.2.4 2001/05/04 13:31:43 gklug
* fix: do not handle eth_copy on bad fragments received.
- *
+ *
* Revision 1.29.2.3 2001/04/23 08:06:43 mlindner
* Fix: error handling
- *
+ *
* Revision 1.29.2.2 2001/03/15 12:04:54 mlindner
* Fixed memory problem
- *
+ *
* Revision 1.29.2.1 2001/03/12 16:41:44 mlindner
* add: procfs function
* add: dual-net function
* add: RLMT networks
* add: extended PNMI features
- *
+ *
* Kernel 2.4.x specific:
* Revision 1.xx 2000/09/12 13:31:56 cgoos
* Fixed missign "dev=NULL in skge_probe.
* Added counting for jumbo frames (corrects error statistic).
* Removed VLAN tag check (enables VLAN support).
- *
+ *
* Kernel 2.2.x specific:
* Revision 1.29 2000/02/21 13:31:56 cgoos
* Fixed "unused" warning for UltraSPARC change.
- *
+ *
* Partially kernel 2.2.x specific:
* Revision 1.28 2000/02/21 10:32:36 cgoos
* Added fixes for UltraSPARC.
@@ -161,40 +161,40 @@
* Changed XmitFrame return value.
* Fixed rx checksum calculation for BIG ENDIAN systems.
* Fixed rx jumbo frames counted as ierrors.
- *
- *
+ *
+ *
* Revision 1.27 1999/11/25 09:06:28 cgoos
* Changed base_addr to unsigned long.
- *
+ *
* Revision 1.26 1999/11/22 13:29:16 cgoos
* Changed license header to GPL.
* Changes for inclusion in linux kernel (2.2.13).
* Removed 2.0.x defines.
* Changed SkGeProbe to skge_probe.
* Added checks in SkGeIoctl.
- *
+ *
* Revision 1.25 1999/10/07 14:47:52 cgoos
* Changed 984x to 98xx.
- *
+ *
* Revision 1.24 1999/09/30 07:21:01 cgoos
* Removed SK_RLMT_SLOW_LOOKAHEAD option.
* Giving spanning tree packets also to OS now.
- *
+ *
* Revision 1.23 1999/09/29 07:36:50 cgoos
* Changed assignment for IsBc/IsMc.
- *
+ *
* Revision 1.22 1999/09/28 12:57:09 cgoos
* Added CheckQueue also to Single-Port-ISR.
- *
+ *
* Revision 1.21 1999/09/28 12:42:41 cgoos
* Changed parameter strings for RlmtMode.
- *
+ *
* Revision 1.20 1999/09/28 12:37:57 cgoos
* Added CheckQueue for fast delivery of RLMT frames.
- *
+ *
* Revision 1.19 1999/09/16 07:57:25 cgoos
* Copperfield changes.
- *
+ *
* Revision 1.18 1999/09/03 13:06:30 cgoos
* Fixed RlmtMode=CheckSeg bug: wrong DEV_KFREE_SKB in RLMT_SEND caused
* double allocated skb's.
@@ -202,69 +202,69 @@
* Queue size for async. standby Tx queue was zero.
* FillRxLimit of 0 could cause problems with ReQueue, changed to 1.
* Removed debug output of checksum statistic.
- *
+ *
* Revision 1.17 1999/08/11 13:55:27 cgoos
* Transmit descriptor polling was not reenabled after SkGePortInit.
- *
+ *
* Revision 1.16 1999/07/27 15:17:29 cgoos
* Added some "\n" in output strings (removed while debuging...).
- *
+ *
* Revision 1.15 1999/07/23 12:09:30 cgoos
* Performance optimization, rx checksumming, large frame support.
- *
+ *
* Revision 1.14 1999/07/14 11:26:27 cgoos
* Removed Link LED settings (now in RLMT).
* Added status output at NET UP.
* Fixed SMP problems with Tx and SWITCH running in parallel.
* Fixed return code problem at RLMT_SEND event.
- *
+ *
* Revision 1.13 1999/04/07 10:11:42 cgoos
* Fixed Single Port problems.
* Fixed Multi-Adapter problems.
* Always display startup string.
- *
+ *
* Revision 1.12 1999/03/29 12:26:37 cgoos
* Reversed locking to fine granularity.
* Fixed skb double alloc problem (caused by incorrect xmit return code).
* Enhanced function descriptions.
- *
+ *
* Revision 1.11 1999/03/15 13:10:51 cgoos
* Changed device identifier in output string to ethX.
- *
+ *
* Revision 1.10 1999/03/15 12:12:34 cgoos
* Changed copyright notice.
- *
+ *
* Revision 1.9 1999/03/15 12:10:17 cgoos
* Changed locking to one driver lock.
* Added check of SK_AC-size (for consistency with library).
- *
+ *
* Revision 1.8 1999/03/08 11:44:02 cgoos
* Fixed missing dev->tbusy in SkGeXmit.
* Changed large frame (jumbo) buffer number.
* Added copying of short frames.
- *
+ *
* Revision 1.7 1999/03/04 13:26:57 cgoos
* Fixed spinlock calls for SMP.
- *
+ *
* Revision 1.6 1999/03/02 09:53:51 cgoos
* Added descriptor revertion for big endian machines.
- *
+ *
* Revision 1.5 1999/03/01 08:50:59 cgoos
* Fixed SkGeChangeMtu.
* Fixed pci config space accesses.
- *
+ *
* Revision 1.4 1999/02/18 15:48:44 cgoos
* Corrected some printk's.
- *
+ *
* Revision 1.3 1999/02/18 12:45:55 cgoos
* Changed SK_MAX_CARD_PARAM to default 16
- *
+ *
* Revision 1.2 1999/02/18 10:55:32 cgoos
* Removed SkGeDrvTimeStamp function.
* Printing "ethX:" before adapter type at adapter init.
- *
*
- * 10-Feb-1999 cg Created, based on Linux' acenic.c, 3c59x.c and
+ *
+ * 10-Feb-1999 cg Created, based on Linux' acenic.c, 3c59x.c and
* SysKonnects GEnesis Solaris driver
*
******************************************************************************/
@@ -273,17 +273,17 @@
*
* Possible compiler options (#define xxx / -Dxxx):
*
- * debugging can be enable by changing SK_DEBUG_CHKMOD and
+ * debugging can be enable by changing SK_DEBUG_CHKMOD and
* SK_DEBUG_CHKCAT in makefile (described there).
*
******************************************************************************/
-
+
/******************************************************************************
*
* Description:
*
* This is the main module of the Linux GE driver.
- *
+ *
* All source files except skge.c, skdrv1st.h, skdrv2nd.h and sktypes.h
* are part of SysKonnect's COMMON MODULES for the SK-98xx adapters.
* Those are used for drivers on multiple OS', so some thing may seem
@@ -381,21 +381,21 @@
/*
- * use those defines for a compile-in version of the driver instead
+ * use those defines for a compile-in version of the driver instead
* of command line parameters
*/
-// #define LINK_SPEED_A {"Auto", }
-// #define LINK_SPEED_B {"Auto", }
-// #define AUTO_NEG_A {"Sense", }
-// #define AUTO_NEG_B {"Sense", }
-// #define DUP_CAP_A {"Both", }
-// #define DUP_CAP_B {"Both", }
-// #define FLOW_CTRL_A {"SymOrRem", }
-// #define FLOW_CTRL_B {"SymOrRem", }
-// #define ROLE_A {"Auto", }
-// #define ROLE_B {"Auto", }
-// #define PREF_PORT {"A", }
-// #define RLMT_MODE {"CheckLinkState", }
+/* #define LINK_SPEED_A {"Auto", } */
+/* #define LINK_SPEED_B {"Auto", } */
+/* #define AUTO_NEG_A {"Sense", } */
+/* #define AUTO_NEG_B {"Sense", } */
+/* #define DUP_CAP_A {"Both", } */
+/* #define DUP_CAP_B {"Both", } */
+/* #define FLOW_CTRL_A {"SymOrRem", } */
+/* #define FLOW_CTRL_B {"SymOrRem", } */
+/* #define ROLE_A {"Auto", } */
+/* #define ROLE_B {"Auto", } */
+/* #define PREF_PORT {"A", } */
+/* #define RLMT_MODE {"CheckLinkState", } */
#define DEV_KFREE_SKB(skb) dev_kfree_skb(skb)
#define DEV_KFREE_SKB_IRQ(skb) dev_kfree_skb_irq(skb)
@@ -567,8 +567,8 @@ int skge_probe (struct eth_device ** ret_dev)
continue;
#endif
-/* if ((pdev->vendor != PCI_VENDOR_ID_SYSKONNECT) &&
- ((pdev->device != PCI_DEVICE_ID_SYSKONNECT_GE) ||
+/* if ((pdev->vendor != PCI_VENDOR_ID_SYSKONNECT) &&
+ ((pdev->device != PCI_DEVICE_ID_SYSKONNECT_GE) ||
(pdev->device != PCI_DEVICE_ID_SYSKONNECT_YU))){
continue;
}
@@ -668,10 +668,10 @@ int skge_probe (struct eth_device ** ret_dev)
base_address = pci_resource_start (pdev, 0);
#else
pci_write_config_dword(devno,
- PCI_COMMAND,
- PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
+ PCI_COMMAND,
+ PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
pci_read_config_dword (devno, PCI_BASE_ADDRESS_0,
- &base_address);
+ &base_address);
#endif
#ifdef SK_BIG_ENDIAN
@@ -737,13 +737,12 @@ int skge_probe (struct eth_device ** ret_dev)
}
-
/* Create proc file */
pProcFile = create_proc_entry(dev->name,
S_IFREG | S_IXUSR | S_IWGRP | S_IROTH,
pSkRootDir);
-
+
pProcFile->read_proc = proc_read;
pProcFile->write_proc = NULL;
pProcFile->nlink = 1;
@@ -809,7 +808,7 @@ int skge_probe (struct eth_device ** ret_dev)
S_IFREG | S_IXUSR | S_IWGRP | S_IROTH,
pSkRootDir);
-
+
pProcFile->read_proc = proc_read;
pProcFile->write_proc = NULL;
pProcFile->nlink = 1;
@@ -824,7 +823,7 @@ int skge_probe (struct eth_device ** ret_dev)
memcpy((caddr_t) &dev->enetaddr,
(caddr_t) &pAC->Addr.Net[1].CurrentMacAddress, 6);
#endif
-
+
printk("%s: %s\n", dev->name, pAC->DeviceStr);
printk(" PrefPort:B RlmtMode:Dual Check Link State\n");
@@ -865,7 +864,7 @@ int skge_probe (struct eth_device ** ret_dev)
* frees the desriptor ring.
*
* Returns: N/A
- *
+ *
*/
static void FreeResources(struct SK_NET_DEVICE *dev)
{
@@ -889,7 +888,7 @@ SK_AC *pAC;
BoardFreeMem(pAC);
}
}
-
+
} /* FreeResources */
#if 0
@@ -1006,7 +1005,7 @@ static int __init skge_init_module(void)
{
int cards;
SkGeRootDev = NULL;
-
+
/* just to avoid warnings ... */
debug = 0;
options[0] = 0;
@@ -1057,7 +1056,7 @@ SK_EVPARA EvPara;
SkEventDispatcher(pAC, pAC->IoBase);
/* disable interrupts */
SK_OUT32(pAC->IoBase, B0_IMSK, 0);
- SkGeDeInit(pAC, pAC->IoBase);
+ SkGeDeInit(pAC, pAC->IoBase);
spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
pAC->BoardLevel = 0;
/* We do NOT check here, if IRQ was pending, of course*/
@@ -1065,7 +1064,7 @@ SK_EVPARA EvPara;
if(pAC->BoardLevel == 1) {
/* board is still alive */
- SkGeDeInit(pAC, pAC->IoBase);
+ SkGeDeInit(pAC, pAC->IoBase);
pAC->BoardLevel = 0;
}
@@ -1077,7 +1076,7 @@ SK_EVPARA EvPara;
FreeResources(SkGeRootDev);
SkGeRootDev->get_stats = NULL;
- /*
+ /*
* otherwise unregister_netdev calls get_stats with
* invalid IO ... :-(
*/
@@ -1138,7 +1137,7 @@ SK_BOOL DualNet;
spin_lock_init(&pAC->SlowPathLock);
/* level 0 init common modules here */
-
+
spin_lock_irqsave(&pAC->SlowPathLock, Flags);
/* Does a RESET on board ...*/
if (SkGeInit(pAC, pAC->IoBase, 0) != 0) {
@@ -1152,7 +1151,7 @@ SK_BOOL DualNet;
SkAddrInit( pAC, pAC->IoBase, 0);
SkRlmtInit( pAC, pAC->IoBase, 0);
SkTimerInit(pAC, pAC->IoBase, 0);
-
+
pAC->BoardLevel = 0;
pAC->RxBufSize = ETH_BUF_SIZE;
@@ -1206,7 +1205,7 @@ SK_BOOL DualNet;
/* Alloc memory for this board (Mem for RxD/TxD) : */
if(!BoardAllocMem(pAC)) {
printk("No memory for descriptor rings.\n");
- return(-EAGAIN);
+ return(-EAGAIN);
}
SkCsSetReceiveFlags(pAC,
@@ -1223,7 +1222,7 @@ SK_BOOL DualNet;
if (pAC->RlmtNets == 2) {
DualNet = SK_TRUE;
}
-
+
if (SkGeInitAssignRamToQueues(
pAC,
pAC->ActivePort,
@@ -1243,9 +1242,9 @@ SK_BOOL DualNet;
printk(" PrefPort:%c RlmtMode:%s\n",
'A' + pAC->Rlmt.Net[0].Port[pAC->Rlmt.Net[0].PrefPort]->PortNumber,
(pAC->RlmtMode==0) ? "Check Link State" :
- ((pAC->RlmtMode==1) ? "Check Link State" :
- ((pAC->RlmtMode==3) ? "Check Local Port" :
- ((pAC->RlmtMode==7) ? "Check Segmentation" :
+ ((pAC->RlmtMode==1) ? "Check Link State" :
+ ((pAC->RlmtMode==3) ? "Check Local Port" :
+ ((pAC->RlmtMode==7) ? "Check Segmentation" :
((pAC->RlmtMode==17) ? "Dual Check Link State" :"Error")))));
#endif
@@ -1283,7 +1282,7 @@ size_t AllocLength; /* length of complete descriptor area */
int i; /* loop counter */
unsigned long BusAddr;
-
+
/* rings plus one for alignment (do not cross 4 GB boundary) */
/* RX_RING_SIZE is assumed bigger than TX_RING_SIZE */
#if (BITS_PER_LONG == 32)
@@ -1314,7 +1313,7 @@ unsigned long BusAddr;
pAC->TxPort[i][0].VTxDescrRing = BusAddr;
pDescrMem += TX_RING_SIZE;
BusAddr += TX_RING_SIZE;
-
+
SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_TX_PROGRESS,
("RX%d: pDescrMem: %lX, PhysDescrMem: %lX\n",
i, (unsigned long) pDescrMem,
@@ -1324,7 +1323,7 @@ unsigned long BusAddr;
pDescrMem += RX_RING_SIZE;
BusAddr += RX_RING_SIZE;
} /* for */
-
+
return (SK_TRUE);
} /* BoardAllocMem */
@@ -1383,7 +1382,7 @@ int TxDescrSize; /* the size of a tx descriptor rounded up to alignment*/
pAC->RxDescrPerRing = RX_RING_SIZE / RxDescrSize;
TxDescrSize = (((sizeof(TXD) - 1) / DESCR_ALIGN) + 1) * DESCR_ALIGN;
pAC->TxDescrPerRing = TX_RING_SIZE / RxDescrSize;
-
+
for (i=0; i<pAC->GIni.GIMacsFound; i++) {
SetupRing(
pAC,
@@ -1445,11 +1444,11 @@ uintptr_t VNextDescr; /* the virtual bus address of the next descriptor */
DESCR_ALIGN;
DescrNum = RX_RING_SIZE / DescrSize;
}
-
+
SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_TX_PROGRESS,
("Descriptor size: %d Descriptor Number: %d\n",
DescrSize,DescrNum));
-
+
pDescr = (RXD*) pMemArea;
pPrevDescr = NULL;
pNextDescr = (RXD*) (((char*)pDescr) + DescrSize);
@@ -1541,11 +1540,11 @@ void SkGeIsr(int irq, void *dev_id, struct pt_regs *ptregs)
struct SK_NET_DEVICE *dev = (struct SK_NET_DEVICE *)dev_id;
DEV_NET *pNet;
SK_AC *pAC;
-SK_U32 IntSrc; /* interrupts source register contents */
+SK_U32 IntSrc; /* interrupts source register contents */
pNet = (DEV_NET*) dev->priv;
pAC = pNet->pAC;
-
+
/*
* Check and process if its our interrupt
*/
@@ -1645,7 +1644,7 @@ SK_U32 IntSrc; /* interrupts source register contents */
spin_unlock(&pAC->SlowPathLock);
}
/*
- * do it all again is case we cleared an interrupt that
+ * do it all again is case we cleared an interrupt that
* came in after handling the ring (OUTs may be delayed
* in hardware buffers, but are through after IN)
*/
@@ -1690,11 +1689,11 @@ void SkGeIsrOnePort(int irq, void *dev_id, struct pt_regs *ptregs)
struct SK_NET_DEVICE *dev = (struct SK_NET_DEVICE *)dev_id;
DEV_NET *pNet;
SK_AC *pAC;
-SK_U32 IntSrc; /* interrupts source register contents */
+SK_U32 IntSrc; /* interrupts source register contents */
pNet = (DEV_NET*) dev->priv;
pAC = pNet->pAC;
-
+
/*
* Check and process if its our interrupt
*/
@@ -1702,7 +1701,7 @@ SK_U32 IntSrc; /* interrupts source register contents */
if (IntSrc == 0) {
return;
}
-
+
while (((IntSrc & IRQ_MASK) & ~SPECIAL_IRQS) != 0) {
#if 0 /* software irq currently not used */
if (IntSrc & IRQ_SW) {
@@ -1751,7 +1750,7 @@ SK_U32 IntSrc; /* interrupts source register contents */
#endif
SK_IN32(pAC->IoBase, B0_ISRC, &IntSrc);
} /* while (IntSrc & IRQ_MASK != 0) */
-
+
if ((IntSrc & SPECIAL_IRQS) || pAC->CheckQueue) {
SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_INT_SRC,
("SPECIAL IRQ SP-Cards => %x\n", IntSrc));
@@ -1764,7 +1763,7 @@ SK_U32 IntSrc; /* interrupts source register contents */
spin_unlock(&pAC->SlowPathLock);
}
/*
- * do it all again is case we cleared an interrupt that
+ * do it all again is case we cleared an interrupt that
* came in after handling the ring (OUTs may be delayed
* in hardware buffers, but are through after IN)
*/
@@ -1808,7 +1807,7 @@ struct SK_NET_DEVICE *dev)
pNet = (DEV_NET*) dev->priv;
pAC = pNet->pAC;
-
+
SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
("SkGeOpen: pAC=0x%lX:\n", (unsigned long)pAC));
@@ -1934,7 +1933,7 @@ struct SK_NET_DEVICE *dev)
SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
("SkGeClose: pAC=0x%lX ", (unsigned long)pAC));
- /*
+ /*
* Clear multicast table, promiscuous mode ....
*/
SkAddrMcClear(pAC, pAC->IoBase, PortIdx, 0);
@@ -1962,11 +1961,11 @@ struct SK_NET_DEVICE *dev)
SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara);
SkEventDispatcher(pAC, pAC->IoBase);
spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
-
+
/* Stop port */
spin_lock_irqsave(&pAC->TxPort[pNet->PortNr]
[TX_PRIO_LOW].TxDesRingLock, Flags);
- SkGeStopPort(pAC, pAC->IoBase, pNet->PortNr,
+ SkGeStopPort(pAC, pAC->IoBase, pNet->PortNr,
SK_STOP_ALL, SK_HARD_RST);
spin_unlock_irqrestore(&pAC->TxPort[pNet->PortNr]
[TX_PRIO_LOW].TxDesRingLock, Flags);
@@ -1992,7 +1991,7 @@ struct SK_NET_DEVICE *dev)
pAC->MaxPorts--;
pNet->Up = 0;
MOD_DEC_USE_COUNT;
-
+
return (0);
} /* SkGeClose */
@@ -2026,7 +2025,7 @@ int Rc; /* return code of XmitFrame */
pAC = pNet->pAC;
#if 0
- if ((!skb_shinfo(skb)->nr_frags) ||
+ if ((!skb_shinfo(skb)->nr_frags) ||
#else
if (1 ||
#endif
@@ -2136,8 +2135,8 @@ int BytesSend;
pTxPort->pTxdRingHead = pTxd->pNextTxd;
pTxPort->TxdRingFree--;
/* the needed descriptor is reserved now */
-
- /*
+
+ /*
* everything allocated ok, so add buffer to descriptor
*/
@@ -2166,15 +2165,15 @@ int BytesSend;
#else
TX_CTRL_EOF | pMessage->len;
#endif
-
+
if ((pTxPort->pTxdRingPrev->TBControl & TX_CTRL_OWN_BMU) == 0) {
/* previous descriptor already done, so give tx start cmd */
/* StartTx(pAC, pTxPort->HwAddr); */
SK_OUT8(pTxPort->HwAddr, TX_Q_CTRL, TX_Q_CTRL_START);
}
pTxPort->pTxdRingPrev = pTxd;
-
-
+
+
BytesSend = pMessage->len;
spin_unlock_irqrestore(&pTxPort->TxDesRingLock, Flags);
/* after releasing the lock, the skb may be immidiately freed */
@@ -2270,9 +2269,9 @@ struct sk_buff *pMessage) /* pointer to send-message */
pTxd->TcpSumOfs = 0; /* PH-Checksum already claculated */
pTxd->TcpSumSt = 14+hlength+16;
pTxd->TcpSumWr = 14+hlength;
-
+
} else {
- pTxd->TBControl = TX_CTRL_CHECK_DEFAULT |
+ pTxd->TBControl = TX_CTRL_CHECK_DEFAULT |
TX_CTRL_SOFTWARE |
TX_CTRL_STF |
skb_headlen(pMessage);
@@ -2286,7 +2285,7 @@ struct sk_buff *pMessage) /* pointer to send-message */
/* Map SG fragments */
for (i = 0; i < skb_shinfo(pMessage)->nr_frags; i++) {
sk_frag = &skb_shinfo(pMessage)->frags[i];
-
+
/* we already have the proper value in entry */
PhysAddr = (SK_U64) pci_map_page(pAC->PciDev,
sk_frag->page,
@@ -2297,11 +2296,11 @@ struct sk_buff *pMessage) /* pointer to send-message */
pTxd->VDataLow = (SK_U32) (PhysAddr & 0xffffffff);
pTxd->VDataHigh = (SK_U32) (PhysAddr >> 32);
pTxd->pMBuf = pMessage;
-
+
/* HW checksum */
if (pMessage->ip_summed == CHECKSUM_HW) {
- pTxd->TBControl = TX_CTRL_OWN_BMU |
- TX_CTRL_SOFTWARE |
+ pTxd->TBControl = TX_CTRL_OWN_BMU |
+ TX_CTRL_SOFTWARE |
TX_CTRL_ST_FWD;
/* We have to use the opcode for tcp here because the opcode for
@@ -2328,7 +2327,7 @@ struct sk_buff *pMessage) /* pointer to send-message */
sk_frag->size;
#endif
pTxdFst->TBControl |= TX_CTRL_OWN_BMU |
- TX_CTRL_SOFTWARE;
+ TX_CTRL_SOFTWARE;
} else {
pTxd->TBControl |= sk_frag->size;
@@ -2360,15 +2359,15 @@ struct sk_buff *pMessage) /* pointer to send-message */
void dump_frag( SK_U8 *data, int length)
{
- int i;
+ int i;
- printk("Length: %d\n", length);
- for( i=0; i < length; i++ ) {
- printk(" %02x", (SK_U8)*(data + i) );
- if( !((i+1) % 20) )
- printk("\n");
- }
- printk("\n\n");
+ printk("Length: %d\n", length);
+ for( i=0; i < length; i++ ) {
+ printk(" %02x", (SK_U8)*(data + i) );
+ if( !((i+1) % 20) )
+ printk("\n");
+ }
+ printk("\n\n");
}
@@ -2402,17 +2401,17 @@ SK_U64 PhysAddr; /* address of DMA mapping */
pNewTail = pTxPort->pTxdRingTail;
pTxd = pNewTail;
- /*
+ /*
* loop forever; exits if TX_CTRL_SOFTWARE bit not set in start frame
* or TX_CTRL_OWN_BMU bit set in any frame
*/
while (1) {
Control = pTxd->TBControl;
if ((Control & TX_CTRL_SOFTWARE) == 0) {
- /*
+ /*
* software controllable bit is set in first
* fragment when given to BMU. Not set means that
- * this fragment was never sent or is already
+ * this fragment was never sent or is already
* freed ( -> ring completely free now).
*/
pTxPort->pTxdRingTail = pTxd;
@@ -2426,7 +2425,7 @@ SK_U64 PhysAddr; /* address of DMA mapping */
}
return;
}
-
+
/* release the DMA mapping */
PhysAddr = ((SK_U64) pTxd->VDataHigh) << (SK_U64) 32;
PhysAddr |= (SK_U64) pTxd->VDataLow;
@@ -2456,7 +2455,7 @@ SK_U64 PhysAddr; /* address of DMA mapping */
* Description of rx ring structure:
* head - points to the descriptor which will be used next by the BMU
* tail - points to the next descriptor to give to the BMU
- *
+ *
* Returns: N/A
*/
static void FillRxRing(
@@ -2591,7 +2590,7 @@ struct sk_buff *pMsg; /* pointer to message holding frame */
struct sk_buff *pNewMsg; /* pointer to a new message for copying frame */
int FrameLength; /* total length of received frame */
SK_MBUF *pRlmtMbuf; /* ptr to a buffer for giving a frame to rlmt */
-SK_EVPARA EvPara; /* an event parameter union */
+SK_EVPARA EvPara; /* an event parameter union */
unsigned long Flags; /* for spin lock */
int PortIndex = pRxPort->PortIndex;
unsigned int Offset;
@@ -2610,7 +2609,7 @@ int Result;
#endif
SK_U64 PhysAddr;
-rx_start:
+rx_start:
/* do forever; exit if RX_CTRL_OWN_BMU found */
for ( pRxd = pRxPort->pRxdRingHead ;
pRxPort->RxdRingFree < pAC->RxDescrPerRing ;
@@ -2619,8 +2618,8 @@ rx_start:
pRxPort->RxdRingFree ++) {
/*
- * For a better understanding of this loop
- * Go through every descriptor beginning at the head
+ * For a better understanding of this loop
+ * Go through every descriptor beginning at the head
* Please note: the ring might be completely received so the OWN bit
* set is not a good crirteria to leave that loop.
* Therefore the RingFree counter is used.
@@ -2629,7 +2628,7 @@ rx_start:
*/
Control = pRxd->RBControl;
-
+
/* check if this descriptor is ready */
if ((Control & RX_CTRL_OWN_BMU) != 0) {
/* this descriptor is not yet ready */
@@ -2684,7 +2683,7 @@ rx_start:
if (pAC->GIni.GIChipId == CHIP_ID_GENESIS) {
IsBc = (FrameStat & XMR_FS_BC) != 0;
IsMc = (FrameStat & XMR_FS_MC) != 0;
- IsBadFrame = (FrameStat &
+ IsBadFrame = (FrameStat &
(XMR_FS_ANY_ERR | XMR_FS_2L_VLAN)) != 0;
} else {
IsBc = (FrameStat & GMR_FS_BC) != 0;
@@ -2777,7 +2776,7 @@ rx_start:
(pAC->GIni.GIChipId == CHIP_ID_GENESIS)) ||
(pAC->GIni.GIChipId == CHIP_ID_YUKON)) {
Result = SkCsGetReceiveInfo(pAC,
- &pMsg->data[14],
+ &pMsg->data[14],
Csum1, Csum2, pRxPort->PortIndex);
if (Result ==
SKCS_STATUS_IP_FRAGMENT ||
@@ -2799,7 +2798,7 @@ rx_start:
#endif
} /* IP frame */
} /* frame > SK_COPY_TRESHOLD */
-
+
SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 1,("V"));
ForRlmt = SK_RLMT_RX_PROTOCOL;
#if 0
@@ -2811,7 +2810,7 @@ rx_start:
#if 0
IsMc = (FrameStat & XMR_FS_MC)==XMR_FS_MC;
#endif
- SK_RLMT_LOOKAHEAD(pAC, PortIndex,
+ SK_RLMT_LOOKAHEAD(pAC, PortIndex,
&pMsg->data[Offset],
IsBc, IsMc, &ForRlmt);
}
@@ -2841,16 +2840,16 @@ rx_start:
}
else {
/* drop frame */
- SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
+ SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
SK_DBGCAT_DRV_RX_PROGRESS,
("D"));
DEV_KFREE_SKB(pMsg);
}
-
+
} /* if not for rlmt */
else {
/* packet for rlmt */
- SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
+ SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
SK_DBGCAT_DRV_RX_PROGRESS, ("R"));
pRlmtMbuf = SkDrvAllocRlmtMbuf(pAC,
pAC->IoBase, FrameLength);
@@ -2878,15 +2877,15 @@ rx_start:
pAC->CheckQueue = SK_TRUE;
}
- SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
+ SK_DBG_MSG(NULL, SK_DBGMOD_DRV,
SK_DBGCAT_DRV_RX_PROGRESS,
("Q"));
}
#if 0
- if ((pAC->dev[pRxPort->PortIndex]->flags &
+ if ((pAC->dev[pRxPort->PortIndex]->flags &
(IFF_PROMISC | IFF_ALLMULTI)) != 0 ||
- (ForRlmt & SK_RLMT_RX_PROTOCOL) ==
- SK_RLMT_RX_PROTOCOL) {
+ (ForRlmt & SK_RLMT_RX_PROTOCOL) ==
+ SK_RLMT_RX_PROTOCOL) {
pMsg->dev = pAC->dev[pRxPort->PortIndex];
pMsg->protocol = eth_type_trans(pMsg,
pAC->dev[pRxPort->PortIndex]);
@@ -3078,7 +3077,7 @@ int i; /* loop counter */
if (pAC->RlmtNets == 1) {
StandbyRam = SK_RLMT_STANDBY_QRXSIZE + SK_RLMT_STANDBY_QXASIZE +
SK_RLMT_STANDBY_QXSSIZE;
- RemainingRam = pAC->GIni.GIRamSize -
+ RemainingRam = pAC->GIni.GIRamSize -
(pAC->GIni.GIMacsFound-1) * StandbyRam;
for (i=0; i<pAC->GIni.GIMacsFound; i++) {
pAC->GIni.GP[i].PRxQSize = SK_RLMT_STANDBY_QRXSIZE;
@@ -3104,7 +3103,7 @@ if (pAC->RlmtNets == 1) {
pAC->GIni.GP[i].PXSQSize = 0;
pAC->GIni.GP[i].PXAQSize = (RemainingRam - RxRam) & ~7;
}
-
+
pAC->RxQueueSize = RxRam;
pAC->TxSQueueSize = 0;
pAC->TxAQueueSize = (RemainingRam - RxRam) & ~7;
@@ -3163,14 +3162,14 @@ SK_AC *pAC = pNet->pAC;
struct sockaddr *addr = p;
unsigned long Flags;
-
+
SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
("SkGeSetMacAddr starts now...\n"));
if(netif_running(dev))
return -EBUSY;
memcpy(dev->dev_addr, addr->sa_data,dev->addr_len);
-
+
spin_lock_irqsave(&pAC->SlowPathLock, Flags);
if (pAC->RlmtNets == 2)
@@ -3180,8 +3179,7 @@ unsigned long Flags;
SkAddrOverride(pAC, pAC->IoBase, pAC->ActivePort,
(SK_MAC_ADDR*)dev->dev_addr, SK_ADDR_VIRTUAL_ADDRESS);
-
-
+
spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
return 0;
} /* SkGeSetMacAddr */
@@ -3242,7 +3240,7 @@ unsigned long Flags;
SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
("Number of MC entries: %d ", dev->mc_count));
-
+
pMcList = dev->mc_list;
for (i=0; i<dev->mc_count; i++, pMcList = pMcList->next) {
SkAddrMcAdd(pAC, pAC->IoBase, PortIdx,
@@ -3259,7 +3257,7 @@ unsigned long Flags;
SkAddrMcUpdate(pAC, pAC->IoBase, PortIdx);
}
spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
-
+
return;
} /* SkGeSetRxMode */
@@ -3322,7 +3320,7 @@ SK_EVPARA EvPara;
spin_lock_irqsave(&pAC->SlowPathLock, Flags);
/* Found more than one port */
- if ((pAC->GIni.GIMacsFound == 2 ) &&
+ if ((pAC->GIni.GIMacsFound == 2 ) &&
(pAC->RlmtNets == 2)) {
/* Stop both ports */
EvPara.Para32[0] = 0;
@@ -3342,16 +3340,16 @@ SK_EVPARA EvPara;
}
- /*
+ /*
* adjust number of rx buffers allocated
*/
if (NewMtu > 1500) {
/* use less rx buffers */
for (i=0; i<pAC->GIni.GIMacsFound; i++) {
/* Found more than one port */
- if ((pAC->GIni.GIMacsFound == 2 ) &&
+ if ((pAC->GIni.GIMacsFound == 2 ) &&
(pAC->RlmtNets == 2)) {
- pAC->RxPort[i].RxFillLimit =
+ pAC->RxPort[i].RxFillLimit =
pAC->RxDescrPerRing - 100;
} else {
if (i == pAC->ActivePort)
@@ -3367,7 +3365,7 @@ SK_EVPARA EvPara;
/* use normal amount of rx buffers */
for (i=0; i<pAC->GIni.GIMacsFound; i++) {
/* Found more than one port */
- if ((pAC->GIni.GIMacsFound == 2 ) &&
+ if ((pAC->GIni.GIMacsFound == 2 ) &&
(pAC->RlmtNets == 2)) {
pAC->RxPort[i].RxFillLimit = 1;
} else {
@@ -3379,18 +3377,18 @@ SK_EVPARA EvPara;
}
}
}
-
- SkGeDeInit(pAC, pAC->IoBase);
- /*
+ SkGeDeInit(pAC, pAC->IoBase);
+
+ /*
* enable/disable hardware support for long frames
*/
if (NewMtu > 1500) {
-// pAC->JumboActivated = SK_TRUE; /* is never set back !!! */
+/* pAC->JumboActivated = SK_TRUE; /#* is never set back !!! */
pAC->GIni.GIPortUsage = SK_JUMBO_LINK;
}
else {
- if ((pAC->GIni.GIMacsFound == 2 ) &&
+ if ((pAC->GIni.GIMacsFound == 2 ) &&
(pAC->RlmtNets == 2)) {
pAC->GIni.GIPortUsage = SK_MUL_LINK;
} else {
@@ -3405,13 +3403,13 @@ SK_EVPARA EvPara;
SkAddrInit( pAC, pAC->IoBase, 1);
SkRlmtInit( pAC, pAC->IoBase, 1);
SkTimerInit(pAC, pAC->IoBase, 1);
-
+
/*
* tschilling:
* Speed and others are set back to default in level 1 init!
*/
GetConfiguration(pAC);
-
+
SkGeInit( pAC, pAC->IoBase, 2);
SkI2cInit( pAC, pAC->IoBase, 2);
SkEventInit(pAC, pAC->IoBase, 2);
@@ -3420,7 +3418,7 @@ SK_EVPARA EvPara;
SkRlmtInit( pAC, pAC->IoBase, 2);
SkTimerInit(pAC, pAC->IoBase, 2);
- /*
+ /*
* clear and reinit the rx rings here
*/
for (i=0; i<pAC->GIni.GIMacsFound; i++) {
@@ -3458,22 +3456,22 @@ SK_EVPARA EvPara;
SkEventDispatcher(pAC, pAC->IoBase);
/* Found more than one port */
- if ((pAC->GIni.GIMacsFound == 2 ) &&
+ if ((pAC->GIni.GIMacsFound == 2 ) &&
(pAC->RlmtNets == 2)) {
/* Start both ports */
EvPara.Para32[0] = pAC->RlmtNets;
EvPara.Para32[1] = -1;
SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_SET_NETS,
EvPara);
-
-
+
+
EvPara.Para32[1] = -1;
EvPara.Para32[0] = pNet->PortNr;
SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_START, EvPara);
-
+
if (pOtherNet->Up) {
EvPara.Para32[0] = pOtherNet->PortNr;
- SkEventQueue(pAC, SKGE_RLMT,
+ SkEventQueue(pAC, SKGE_RLMT,
SK_RLMT_START, EvPara);
}
} else {
@@ -3482,7 +3480,7 @@ SK_EVPARA EvPara;
SkEventDispatcher(pAC, pAC->IoBase);
spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
-
+
return 0;
} /* SkGeChangeMtu */
@@ -3511,24 +3509,24 @@ unsigned long Flags; /* for spin lock */
SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
("SkGeStats starts now...\n"));
pPnmiStruct = &pAC->PnmiStruct;
- memset(pPnmiStruct, 0, sizeof(SK_PNMI_STRUCT_DATA));
- spin_lock_irqsave(&pAC->SlowPathLock, Flags);
- Size = SK_PNMI_STRUCT_SIZE;
+ memset(pPnmiStruct, 0, sizeof(SK_PNMI_STRUCT_DATA));
+ spin_lock_irqsave(&pAC->SlowPathLock, Flags);
+ Size = SK_PNMI_STRUCT_SIZE;
SkPnmiGetStruct(pAC, pAC->IoBase, pPnmiStruct, &Size, pNet->NetNr);
- spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
- pPnmiStat = &pPnmiStruct->Stat[0];
- pPnmiConf = &pPnmiStruct->Conf[0];
+ spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
+ pPnmiStat = &pPnmiStruct->Stat[0];
+ pPnmiConf = &pPnmiStruct->Conf[0];
pAC->stats.rx_packets = (SK_U32) pPnmiStruct->RxDeliveredCts & 0xFFFFFFFF;
pAC->stats.tx_packets = (SK_U32) pPnmiStat->StatTxOkCts & 0xFFFFFFFF;
pAC->stats.rx_bytes = (SK_U32) pPnmiStruct->RxOctetsDeliveredCts;
pAC->stats.tx_bytes = (SK_U32) pPnmiStat->StatTxOctetsOkCts;
-
- if (pNet->Mtu <= 1500) {
- pAC->stats.rx_errors = (SK_U32) pPnmiStruct->InErrorsCts & 0xFFFFFFFF;
- } else {
- pAC->stats.rx_errors = (SK_U32) ((pPnmiStruct->InErrorsCts -
- pPnmiStat->StatRxTooLongCts) & 0xFFFFFFFF);
+
+ if (pNet->Mtu <= 1500) {
+ pAC->stats.rx_errors = (SK_U32) pPnmiStruct->InErrorsCts & 0xFFFFFFFF;
+ } else {
+ pAC->stats.rx_errors = (SK_U32) ((pPnmiStruct->InErrorsCts -
+ pPnmiStat->StatRxTooLongCts) & 0xFFFFFFFF);
}
@@ -3587,7 +3585,7 @@ int Size;
pNet = (DEV_NET*) dev->priv;
pAC = pNet->pAC;
-
+
if(copy_from_user(&Ioctl, rq->ifr_data, sizeof(SK_GE_IOCTL))) {
return -EFAULT;
}
@@ -3596,8 +3594,8 @@ int Size;
case SK_IOCTL_SETMIB:
case SK_IOCTL_PRESETMIB:
if (!capable(CAP_NET_ADMIN)) return -EPERM;
- case SK_IOCTL_GETMIB:
- if(copy_from_user(&pAC->PnmiStruct, Ioctl.pData,
+ case SK_IOCTL_GETMIB:
+ if(copy_from_user(&pAC->PnmiStruct, Ioctl.pData,
Ioctl.Len<sizeof(pAC->PnmiStruct)?
Ioctl.Len : sizeof(pAC->PnmiStruct))) {
return -EFAULT;
@@ -3706,8 +3704,8 @@ SK_BOOL DupSet;
* -----------------------------------------------------------------
* Sense | AutoSense | AutoSense | AutoSense |
*/
-int Capabilities[3][3] =
- { { -1, SK_LMODE_FULL, SK_LMODE_HALF},
+int Capabilities[3][3] =
+ { { -1, SK_LMODE_FULL, SK_LMODE_HALF},
{SK_LMODE_AUTOBOTH, SK_LMODE_AUTOFULL, SK_LMODE_AUTOHALF},
{SK_LMODE_AUTOSENSE, SK_LMODE_AUTOSENSE, SK_LMODE_AUTOSENSE} };
#define DC_BOTH 0
@@ -3745,7 +3743,7 @@ int Capabilities[3][3] =
/* Only copper type adapter and GE V2 cards */
if (((pAC->GIni.GIChipId != CHIP_ID_YUKON) ||
(pAC->GIni.GICopperType != SK_TRUE)) &&
- ((LinkSpeed != SK_LSPEED_AUTO) &&
+ ((LinkSpeed != SK_LSPEED_AUTO) &&
(LinkSpeed != SK_LSPEED_1000MBPS))) {
printk("%s: Illegal value for Speed_A. "
"Not a copper card or GE V2 card\n Using "
@@ -3796,7 +3794,7 @@ int Capabilities[3][3] =
else printk("%s: Illegal value for DupCap_A\n",
pAC->dev[0]->name);
}
-
+
/* check for illegal combinations */
if (AutoSet && AutoNeg==AN_SENS && DupSet) {
printk("%s, Port A: DuplexCapabilities"
@@ -3812,7 +3810,7 @@ int Capabilities[3][3] =
if (AutoSet && AutoNeg==AN_OFF && !DupSet) {
DuplexCap = DC_FULL;
}
-
+
if (!AutoSet && DupSet) {
printk("%s, Port A: Duplex setting not"
" possible in\n default AutoNegotiation mode"
@@ -3820,11 +3818,11 @@ int Capabilities[3][3] =
pAC->dev[0]->name);
AutoNeg = AN_ON;
}
-
+
/* set the desired mode */
pAC->GIni.GP[0].PLinkModeConf =
Capabilities[AutoNeg][DuplexCap];
-
+
pAC->GIni.GP[0].PFlowCtrlMode = SK_FLOW_MODE_SYM_OR_REM;
if (FlowCtrl_A != NULL && pAC->Index<SK_MAX_CARD_PARAM &&
FlowCtrl_A[pAC->Index] != NULL) {
@@ -3874,8 +3872,8 @@ int Capabilities[3][3] =
pAC->dev[0]->name);
}
pAC->GIni.GP[0].PMSMode = MSMode;
-
-
+
+
/* settings for port B */
/* settings link speed */
LinkSpeed = SK_LSPEED_AUTO; /* default: do auto select */
@@ -3904,7 +3902,7 @@ int Capabilities[3][3] =
/* Only copper type adapter and GE V2 cards */
if (((pAC->GIni.GIChipId != CHIP_ID_YUKON) ||
(pAC->GIni.GICopperType != SK_TRUE)) &&
- ((LinkSpeed != SK_LSPEED_AUTO) &&
+ ((LinkSpeed != SK_LSPEED_AUTO) &&
(LinkSpeed != SK_LSPEED_1000MBPS))) {
printk("%s: Illegal value for Speed_B. "
"Not a copper card or GE V2 card\n Using "
@@ -3953,7 +3951,7 @@ int Capabilities[3][3] =
}
else printk("Illegal value for DupCap_B\n");
}
-
+
/* check for illegal combinations */
if (AutoSet && AutoNeg==AN_SENS && DupSet) {
printk("%s, Port B: DuplexCapabilities"
@@ -3969,7 +3967,7 @@ int Capabilities[3][3] =
if (AutoSet && AutoNeg==AN_OFF && !DupSet) {
DuplexCap = DC_FULL;
}
-
+
if (!AutoSet && DupSet) {
printk("%s, Port B: Duplex setting not"
" possible in\n default AutoNegotiation mode"
@@ -4031,8 +4029,8 @@ int Capabilities[3][3] =
pAC->dev[1]->name);
}
pAC->GIni.GP[1].PMSMode = MSMode;
-
-
+
+
/* settings for both ports */
pAC->ActivePort = 0;
if (PrefPort != NULL && pAC->Index<SK_MAX_CARD_PARAM &&
@@ -4080,7 +4078,7 @@ int Capabilities[3][3] =
}
else if (strcmp(RlmtMode[pAC->Index], "CheckSeg") == 0) {
pAC->RlmtMode = SK_RLMT_CHECK_LINK |
- SK_RLMT_CHECK_LOC_LINK |
+ SK_RLMT_CHECK_LOC_LINK |
SK_RLMT_CHECK_SEG;
}
else if ((strcmp(RlmtMode[pAC->Index], "DualNet") == 0) &&
@@ -4132,8 +4130,6 @@ unsigned long Flags;
} /* ProductStr */
-
-
/****************************************************************************/
/* functions for common modules *********************************************/
/****************************************************************************/
@@ -4191,8 +4187,8 @@ struct sk_buff *pMsgBlock; /* pointer to a new message block */
* Nothing
*/
void SkDrvFreeRlmtMbuf(
-SK_AC *pAC, /* pointer to adapter context */
-SK_IOC IoC, /* the IO-context */
+SK_AC *pAC, /* pointer to adapter context */
+SK_IOC IoC, /* the IO-context */
SK_MBUF *pMbuf) /* size of the requested buffer */
{
SK_MBUF *pFreeMbuf;
@@ -4376,7 +4372,7 @@ SK_U8 Val) /* pointer to store the read value */
* Returns:
* 0 if everything ok
* < 0 on error
- *
+ *
*/
int SkDrvEvent(
SK_AC *pAC, /* pointer to adapter context */
@@ -4432,15 +4428,15 @@ SK_BOOL DualNet;
spin_unlock_irqrestore(
&pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
Flags);
-
+
/* clear rx ring from received frames */
ReceiveIrq(pAC, &pAC->RxPort[FromPort], SK_FALSE);
-
+
ClearTxRing(pAC, &pAC->TxPort[FromPort][TX_PRIO_LOW]);
spin_lock_irqsave(
&pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
Flags);
-
+
/* tschilling: Handling of return value inserted. */
if (SkGeInitPort(pAC, IoC, FromPort)) {
if (FromPort == 0) {
@@ -4506,7 +4502,7 @@ SK_BOOL DualNet;
else {
printk(" flowctrl: none\n");
}
-
+
/* tschilling: Check against CopperType now. */
if ((pAC->GIni.GICopperType == SK_TRUE) &&
(pAC->GIni.GP[FromPort].PLinkSpeedUsed ==
@@ -4533,8 +4529,8 @@ SK_BOOL DualNet;
printk(" scatter-gather: disabled\n");
#endif
#endif /* SK98_INFO */
-
- if ((Param.Para32[0] != pAC->ActivePort) &&
+
+ if ((Param.Para32[0] != pAC->ActivePort) &&
(pAC->RlmtNets == 1)) {
NewPara.Para32[0] = pAC->ActivePort;
NewPara.Para32[1] = Param.Para32[0];
@@ -4591,11 +4587,11 @@ SK_BOOL DualNet;
ReceiveIrq(pAC, &pAC->RxPort[FromPort], SK_FALSE); /* clears rx ring */
ReceiveIrq(pAC, &pAC->RxPort[ToPort], SK_FALSE); /* clears rx ring */
-
+
ClearTxRing(pAC, &pAC->TxPort[FromPort][TX_PRIO_LOW]);
ClearTxRing(pAC, &pAC->TxPort[ToPort][TX_PRIO_LOW]);
spin_lock_irqsave(
- &pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
+ &pAC->TxPort[FromPort][TX_PRIO_LOW].TxDesRingLock,
Flags);
spin_lock_irqsave(
&pAC->TxPort[ToPort][TX_PRIO_LOW].TxDesRingLock, Flags);
@@ -4608,7 +4604,7 @@ SK_BOOL DualNet;
if (pAC->RlmtNets == 2) {
DualNet = SK_TRUE;
}
-
+
if (SkGeInitAssignRamToQueues(
pAC,
pAC->ActivePort,
@@ -4662,7 +4658,7 @@ SK_BOOL DualNet;
}
SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT,
("END EVENT "));
-
+
return (0);
} /* SkDrvEvent */
@@ -4677,7 +4673,7 @@ SK_BOOL DualNet;
* Returns:
* 0 if everything ok
* < 0 on error
- *
+ *
*/
void SkErrorLog(
SK_AC *pAC,
@@ -4730,7 +4726,7 @@ char ClassStr[80];
* This function prints frames to the system logfile/to the console.
*
* Returns: N/A
- *
+ *
*/
static void DumpMsg(struct sk_buff *skb, char *str)
{
@@ -4758,17 +4754,16 @@ static void DumpMsg(struct sk_buff *skb, char *str)
} /* DumpMsg */
-
/*****************************************************************************
*
* DumpData - print a data area
*
* Description:
- * This function prints a area of data to the system logfile/to the
+ * This function prints a area of data to the system logfile/to the
* console.
*
* Returns: N/A
- *
+ *
*/
static void DumpData(char *p, int size)
{
@@ -4812,11 +4807,11 @@ char HEXCHAR[] = "0123456789ABCDEF";
* DumpLong - print a data area as long values
*
* Description:
- * This function prints a area of data to the system logfile/to the
+ * This function prints a area of data to the system logfile/to the
* console.
*
* Returns: N/A
- *
+ *
*/
static void DumpLong(char *pc, int size)
{
@@ -4867,10 +4862,3 @@ int l;
#endif
#endif /* CONFIG_SK98 */
-
-/*
- * Local variables:
- * compile-command: "make"
- * End:
- */
-
diff --git a/drivers/sk98lin/skgehwt.c b/drivers/sk98lin/skgehwt.c
index 10c366d01e..f8681a8b0f 100644
--- a/drivers/sk98lin/skgehwt.c
+++ b/drivers/sk98lin/skgehwt.c
@@ -29,46 +29,46 @@
* $Log: skgehwt.c,v $
* Revision 1.13 1999/11/22 13:31:12 cgoos
* Changed license header to GPL.
- *
+ *
* Revision 1.12 1998/10/15 15:11:34 gklug
* fix: ID_sccs to SysKonnectFileId
- *
+ *
* Revision 1.11 1998/10/08 15:27:51 gklug
* chg: correction factor is host clock dependent
- *
+ *
* Revision 1.10 1998/09/15 14:18:31 cgoos
* Changed more BOOLEANs to SK_xxx
*
* Revision 1.9 1998/09/15 14:16:06 cgoos
* Changed line 107: FALSE to SK_FALSE
- *
+ *
* Revision 1.8 1998/08/24 13:04:44 gklug
* fix: typo
- *
+ *
* Revision 1.7 1998/08/19 09:50:49 gklug
* fix: remove struct keyword from c-code (see CCC) add typedefs
- *
+ *
* Revision 1.6 1998/08/17 09:59:02 gklug
* fix: typos
- *
+ *
* Revision 1.5 1998/08/14 07:09:10 gklug
* fix: chg pAc -> pAC
- *
+ *
* Revision 1.4 1998/08/10 14:14:52 gklug
* rmv: unneccessary SK_ADDR macro
- *
+ *
* Revision 1.3 1998/08/07 12:53:44 gklug
* fix: first compiled version
- *
+ *
* Revision 1.2 1998/08/07 09:19:29 gklug
* adapt functions to the C coding conventions
* rmv unneccessary functions.
- *
+ *
* Revision 1.1 1998/08/05 11:28:36 gklug
* first version: adapted from SMT/FDDI
- *
- *
- *
+ *
+ *
+ *
*
******************************************************************************/
diff --git a/drivers/sk98lin/skgeinit.c b/drivers/sk98lin/skgeinit.c
index cb6e20f022..a18dc0a488 100644
--- a/drivers/sk98lin/skgeinit.c
+++ b/drivers/sk98lin/skgeinit.c
@@ -30,100 +30,100 @@
* Corrected setting of GIHstClkFact (Host Clock Factor) and
* GIPollTimerVal (Descr. Poll Timer Init Value) for YUKON.
* Editorial changes.
- *
+ *
* Revision 1.84 2003/01/28 09:57:25 rschmidt
* Added detection of YUKON-Lite Rev. A0 (stored in GIYukonLite).
* Disabled Rx GMAC FIFO Flush for YUKON-Lite Rev. A0.
* Added support for CLK_RUN (YUKON-Lite).
* Added additional check of PME from D3cold for setting GIVauxAvail.
* Editorial changes.
- *
+ *
* Revision 1.83 2002/12/17 16:15:41 rschmidt
* Added default setting of PhyType (Copper) for YUKON.
* Added define around check for HW self test results.
* Editorial changes.
- *
+ *
* Revision 1.82 2002/12/05 13:40:21 rschmidt
* Added setting of Rx GMAC FIFO Flush Mask register.
* Corrected PhyType with new define SK_PHY_MARV_FIBER when
* YUKON Fiber board was found.
* Editorial changes.
- *
+ *
* Revision 1.81 2002/11/15 12:48:35 rschmidt
* Replaced message SKERR_HWI_E018 with SKERR_HWI_E024 for Rx queue error
* in SkGeStopPort().
* Added init for pAC->GIni.GIGenesis with SK_FALSE in YUKON-branch.
* Editorial changes.
- *
+ *
* Revision 1.80 2002/11/12 17:28:30 rschmidt
* Initialized GIPciSlot64 and GIPciClock66 in SkGeInit1().
* Reduced PCI FIFO watermarks for 32bit/33MHz bus in SkGeInitBmu().
* Editorial changes.
- *
+ *
* Revision 1.79 2002/10/21 09:31:02 mkarl
* Changed SkGeInitAssignRamToQueues(), removed call to
* SkGeInitAssignRamToQueues in SkGeInit1 and fixed compiler warning in
* SkGeInit1.
- *
+ *
* Revision 1.78 2002/10/16 15:55:07 mkarl
* Fixed a bug in SkGeInitAssignRamToQueues.
- *
+ *
* Revision 1.77 2002/10/14 15:07:22 rschmidt
* Corrected timeout handling for Rx queue in SkGeStopPort() (#10748)
* Editorial changes.
- *
+ *
* Revision 1.76 2002/10/11 09:24:38 mkarl
* Added check for HW self test results.
- *
+ *
* Revision 1.75 2002/10/09 16:56:44 mkarl
* Now call SkGeInitAssignRamToQueues() in Init Level 1 in order to assign
* the adapter memory to the queues. This default assignment is not suitable
* for dual net mode.
- *
+ *
* Revision 1.74 2002/09/12 08:45:06 rwahl
* Set defaults for PMSCap, PLinkSpeed & PLinkSpeedCap dependent on PHY.
- *
+ *
* Revision 1.73 2002/08/16 15:19:45 rschmidt
* Corrected check for Tx queues in SkGeCheckQSize().
* Added init for new entry GIGenesis and GICopperType
* Replaced all if(GIChipId == CHIP_ID_GENESIS) with new entry GIGenesis.
* Replaced wrong 1st para pAC with IoC in SK_IN/OUT macros.
- *
+ *
* Revision 1.72 2002/08/12 13:38:55 rschmidt
* Added check if VAUX is available (stored in GIVauxAvail)
* Initialized PLinkSpeedCap in Port struct with SK_LSPEED_CAP_1000MBPS
* Editorial changes.
- *
+ *
* Revision 1.71 2002/08/08 16:32:58 rschmidt
* Added check for Tx queues in SkGeCheckQSize().
* Added start of Time Stamp Timer (YUKON) in SkGeInit2().
* Editorial changes.
- *
+ *
* Revision 1.70 2002/07/23 16:04:26 rschmidt
* Added init for GIWolOffs (HW-Bug in YUKON 1st rev.)
* Minor changes
- *
+ *
* Revision 1.69 2002/07/17 17:07:08 rwahl
* - SkGeInit1(): fixed PHY type debug output; corrected init of GIFunc
* table & GIMacType.
* - Editorial changes.
- *
+ *
* Revision 1.68 2002/07/15 18:38:31 rwahl
* Added initialization for MAC type dependent function table.
- *
+ *
* Revision 1.67 2002/07/15 15:45:39 rschmidt
* Added Tx Store & Forward for YUKON (GMAC Tx FIFO is only 1 kB)
* Replaced SK_PHY_MARV by SK_PHY_MARV_COPPER
* Editorial changes
- *
+ *
* Revision 1.66 2002/06/10 09:35:08 rschmidt
* Replaced C++ comments (//)
* Editorial changes
- *
+ *
* Revision 1.65 2002/06/05 08:33:37 rschmidt
* Changed GIRamSize and Reset sequence for YUKON.
* SkMacInit() replaced by SkXmInitMac() resp. SkGmInitMac()
- *
+ *
* Revision 1.64 2002/04/25 13:03:20 rschmidt
* Changes for handling YUKON.
* Removed reference to xmac_ii.h (not necessary).
@@ -144,71 +144,71 @@
* Use of SkGeXmitLED() only for GENESIS.
* Changes for V-CPU support.
* Editorial changes.
- *
+ *
* Revision 1.63 2001/04/05 11:02:09 rassmann
* Stop Port check of the STOP bit did not take 2/18 sec as wanted.
- *
+ *
* Revision 1.62 2001/02/07 07:54:21 rassmann
* Corrected copyright.
- *
+ *
* Revision 1.61 2001/01/31 15:31:40 gklug
* fix: problem with autosensing an SR8800 switch
- *
+ *
* Revision 1.60 2000/10/18 12:22:21 cgoos
* Added workaround for half duplex hangup.
- *
+ *
* Revision 1.59 2000/10/10 11:22:06 gklug
* add: in manual half duplex mode ignore carrier extension errors
- *
+ *
* Revision 1.58 2000/10/02 14:10:27 rassmann
* Reading BCOM PHY after releasing reset until it returns a valid value.
- *
+ *
* Revision 1.57 2000/08/03 14:55:28 rassmann
* Waiting for I2C to be ready before de-initializing adapter
* (prevents sensors from hanging up).
- *
+ *
* Revision 1.56 2000/07/27 12:16:48 gklug
* fix: Stop Port check of the STOP bit does now take 2/18 sec as wanted
- *
+ *
* Revision 1.55 1999/11/22 13:32:26 cgoos
* Changed license header to GPL.
- *
+ *
* Revision 1.54 1999/10/26 07:32:54 malthoff
* Initialize PHWLinkUp with SK_FALSE. Required for Diagnostics.
- *
+ *
* Revision 1.53 1999/08/12 19:13:50 malthoff
* Fix for 1000BT. Do not owerwrite XM_MMU_CMD when
* disabling receiver and transmitter. Other bits
* may be lost.
- *
+ *
* Revision 1.52 1999/07/01 09:29:54 gklug
* fix: DoInitRamQueue needs pAC
- *
+ *
* Revision 1.51 1999/07/01 08:42:21 gklug
* chg: use Store & forward for RAM buffer when Jumbos are used
- *
+ *
* Revision 1.50 1999/05/27 13:19:38 cgoos
* Added Tx PCI watermark initialization.
* Removed Tx RAM queue Store & Forward setting.
- *
+ *
* Revision 1.49 1999/05/20 14:32:45 malthoff
* SkGeLinkLED() is completly removed now.
- *
+ *
* Revision 1.48 1999/05/19 07:28:24 cgoos
* SkGeLinkLED no more available for drivers.
* Changes for 1000Base-T.
- *
+ *
* Revision 1.47 1999/04/08 13:57:45 gklug
* add: Init of new port struct fiels PLinkResCt
* chg: StopPort Timer check
- *
+ *
* Revision 1.46 1999/03/25 07:42:15 malthoff
* SkGeStopPort(): Add workaround for cache incoherency.
* Create error log entry, disable port, and
* exit loop if it does not terminate.
* Add XM_RX_LENERR_OK to the default value for the
* XMAC receive command register.
- *
+ *
* Revision 1.45 1999/03/12 16:24:47 malthoff
* Remove PPollRxD and PPollTxD.
* Add check for GIPollTimerVal.
@@ -474,7 +474,7 @@ SK_BOOL PollTxD) /* SK_TRUE (enable pol.), SK_FALSE (disable pol.) */
if (pPrt->PXSQSize != 0) {
SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff, Q_CSR), DWord);
}
-
+
if (pPrt->PXAQSize != 0) {
SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff, Q_CSR), DWord);
}
@@ -556,7 +556,7 @@ int Mode) /* Mode may be SK_LED_DIS, SK_LED_ENA, SK_LED_TST */
SK_OUT8(IoC, Led + XMIT_LED_TST, LED_T_OFF);
break;
}
-
+
/*
* 1000BT: The Transmit LED is driven by the PHY.
* But the default LED configuration is used for
@@ -672,7 +672,7 @@ SK_BOOL DualNet) /* adapter context */
for (i = 0; i < pAC->GIni.GIMacsFound; i++) {
pGePort = &pAC->GIni.GP[i];
-
+
/* take away the minimum memory for active queues */
ActivePortKilobytes -= (SK_MIN_RXQ_SIZE + SK_MIN_TXQ_SIZE);
@@ -691,7 +691,7 @@ SK_BOOL DualNet) /* adapter context */
SK_MIN_TXQ_SIZE);
}
}
- else {
+ else {
/* Rlmt Mode or single link adapter */
/* Set standby queue size defaults for all standby ports */
@@ -790,22 +790,22 @@ int Port) /* port index */
SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E011, SKERR_HWI_E011MSG);
return(1);
}
-
+
/*
* the size of at least one Tx queue (synch. or asynch.) has to be > 0.
* if Jumbo Frames are used, this size has to be >= 16 kB.
*/
if ((i == Port && pPrt->PXSQSize == 0 && pPrt->PXAQSize == 0) ||
(pAC->GIni.GIPortUsage == SK_JUMBO_LINK &&
- ((pPrt->PXSQSize > 0 && pPrt->PXSQSize < SK_MIN_TXQ_SIZE) ||
+ ((pPrt->PXSQSize > 0 && pPrt->PXSQSize < SK_MIN_TXQ_SIZE) ||
(pPrt->PXAQSize > 0 && pPrt->PXAQSize < SK_MIN_TXQ_SIZE)))) {
SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E023, SKERR_HWI_E023MSG);
return(1);
}
-
+
UsedMem += pPrt->PRxQSize + pPrt->PXSQSize + pPrt->PXAQSize;
}
-
+
if (UsedMem > pAC->GIni.GIRamSize) {
SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E012, SKERR_HWI_E012MSG);
return(1);
@@ -948,20 +948,20 @@ int Port) /* Port Index (MAC_1 + n) */
* - setup defaults for the control register
* - enable the FIFO
*/
-
+
Word = GMF_RX_CTRL_DEF;
-
+
if (pAC->GIni.GIGenesis) {
/* Configure Rx MAC FIFO */
SK_OUT8(IoC, MR_ADDR(Port, RX_MFF_CTRL2), MFF_RST_CLR);
SK_OUT16(IoC, MR_ADDR(Port, RX_MFF_CTRL1), MFF_RX_CTRL_DEF);
SK_OUT8(IoC, MR_ADDR(Port, RX_MFF_CTRL2), MFF_ENA_OP_MD);
-
+
/* Configure Tx MAC FIFO */
SK_OUT8(IoC, MR_ADDR(Port, TX_MFF_CTRL2), MFF_RST_CLR);
SK_OUT16(IoC, MR_ADDR(Port, TX_MFF_CTRL1), MFF_TX_CTRL_DEF);
SK_OUT8(IoC, MR_ADDR(Port, TX_MFF_CTRL2), MFF_ENA_OP_MD);
-
+
/* Enable frame flushing if jumbo frames used */
if (pAC->GIni.GIPortUsage == SK_JUMBO_LINK) {
SK_OUT16(IoC, MR_ADDR(Port, RX_MFF_CTRL1), MFF_ENA_FLUSH);
@@ -970,28 +970,28 @@ int Port) /* Port Index (MAC_1 + n) */
else {
/* set Rx GMAC FIFO Flush Mask */
SK_OUT16(IoC, MR_ADDR(Port, RX_GMF_FL_MSK), (SK_U16)RX_FF_FL_DEF_MSK);
-
+
if (pAC->GIni.GIYukonLite && pAC->GIni.GIChipId == CHIP_ID_YUKON) {
Word &= ~GMF_RX_F_FL_ON;
}
-
+
/* Configure Rx MAC FIFO */
SK_OUT8(IoC, MR_ADDR(Port, RX_GMF_CTRL_T), (SK_U8)GMF_RST_CLR);
SK_OUT16(IoC, MR_ADDR(Port, RX_GMF_CTRL_T), Word);
-
+
/* set Rx GMAC FIFO Flush Threshold (default: 0x0a -> 56 bytes) */
SK_OUT16(IoC, MR_ADDR(Port, RX_GMF_FL_THR), RX_GMF_FL_THR_DEF);
-
+
/* Configure Tx MAC FIFO */
SK_OUT8(IoC, MR_ADDR(Port, TX_GMF_CTRL_T), (SK_U8)GMF_RST_CLR);
SK_OUT16(IoC, MR_ADDR(Port, TX_GMF_CTRL_T), (SK_U16)GMF_TX_CTRL_DEF);
-
+
#ifdef VCPU
SK_IN32(IoC, MR_ADDR(Port, RX_GMF_AF_THR), &DWord);
SK_IN32(IoC, MR_ADDR(Port, TX_GMF_AE_THR), &DWord);
#endif /* VCPU */
-
+
/* set Tx GMAC FIFO Almost Empty Threshold */
/* SK_OUT32(IoC, MR_ADDR(Port, TX_GMF_AE_THR), 0); */
}
@@ -1120,16 +1120,16 @@ int SyncMode) /* Sync Mode: TXA_ENA_ALLOC | TXA_DIS_ALLOC | 0 */
SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E010, SKERR_HWI_E010MSG);
return(1);
}
-
+
if (pAC->GIni.GP[Port].PXSQSize == 0) {
SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E009, SKERR_HWI_E009MSG);
return(2);
}
-
+
/* calculate register values */
IntTime = (IntTime / 2) * pAC->GIni.GIHstClkFact / 100;
LimCount = LimCount / 8;
-
+
if (IntTime > TXA_MAX_VAL || LimCount > TXA_MAX_VAL) {
SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E010, SKERR_HWI_E010MSG);
return(1);
@@ -1147,13 +1147,13 @@ int SyncMode) /* Sync Mode: TXA_ENA_ALLOC | TXA_DIS_ALLOC | 0 */
*/
SK_OUT8(IoC, MR_ADDR(Port, TXA_CTRL),
TXA_ENA_FSYNC | TXA_DIS_ALLOC | TXA_STOP_RC);
-
+
SK_OUT32(IoC, MR_ADDR(Port, TXA_ITI_INI), IntTime);
SK_OUT32(IoC, MR_ADDR(Port, TXA_LIM_INI), LimCount);
-
+
SK_OUT8(IoC, MR_ADDR(Port, TXA_CTRL),
(SK_U8)(SyncMode & (TXA_ENA_ALLOC | TXA_DIS_ALLOC)));
-
+
if (IntTime != 0 || LimCount != 0) {
SK_OUT8(IoC, MR_ADDR(Port, TXA_CTRL), TXA_DIS_FSYNC | TXA_START_RC);
}
@@ -1271,10 +1271,10 @@ int Port) /* Port Index (MAC_1 + n) */
DoInitRamQueue(pAC, IoC, pPrt->PRxQOff, pPrt->PRxQRamStart,
pPrt->PRxQRamEnd, RxQType);
-
+
DoInitRamQueue(pAC, IoC, pPrt->PXsQOff, pPrt->PXsQRamStart,
pPrt->PXsQRamEnd, SK_TX_RAM_Q);
-
+
DoInitRamQueue(pAC, IoC, pPrt->PXaQOff, pPrt->PXaQRamStart,
pPrt->PXaQRamEnd, SK_TX_RAM_Q);
@@ -1341,7 +1341,7 @@ int Port) /* Port Index (MAC_1 + n) */
RxWm = SK_BMU_RX_WM;
TxWm = SK_BMU_TX_WM;
-
+
if (!pAC->GIni.GIPciSlot64 && !pAC->GIni.GIPciClock66) {
/* for better performance */
RxWm /= 2;
@@ -1360,7 +1360,7 @@ int Port) /* Port Index (MAC_1 + n) */
SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff, Q_CSR), CSR_CLR_RESET);
SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff, Q_F), TxWm);
}
-
+
if (pPrt->PXAQSize != 0) {
SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff, Q_CSR), CSR_CLR_RESET);
SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff, Q_F), TxWm);
@@ -1393,14 +1393,14 @@ int QuIoOffs) /* Queue IO Address Offset */
SK_U32 QuCsr; /* CSR contents */
SK_IN32(IoC, Q_ADDR(QuIoOffs, Q_CSR), &QuCsr);
-
+
if ((QuCsr & (CSR_STOP | CSR_SV_IDLE)) == 0) {
/* Stop Descriptor overridden by start command */
SK_OUT32(IoC, Q_ADDR(QuIoOffs, Q_CSR), CSR_STOP);
SK_IN32(IoC, Q_ADDR(QuIoOffs, Q_CSR), &QuCsr);
}
-
+
return(QuCsr);
} /* TestStopBit */
@@ -1506,7 +1506,7 @@ int RstMode)/* Reset Mode (SK_SOFT_RST, SK_HARD_RST) */
if ((Dir & SK_STOP_TX) != 0) {
/* disable receiver and transmitter */
SkMacRxTxDisable(pAC, IoC, Port);
-
+
/* stop both transmit queues */
/*
* If the BMU is in the reset state CSR_STOP will terminate
@@ -1582,11 +1582,11 @@ int RstMode)/* Reset Mode (SK_SOFT_RST, SK_HARD_RST) */
else {
SkMacHardRst(pAC, IoC, Port);
}
-
+
/* Disable Force Sync bit and Enable Alloc bit */
SK_OUT8(IoC, MR_ADDR(Port, TXA_CTRL),
TXA_DIS_FSYNC | TXA_DIS_ALLOC | TXA_STOP_RC);
-
+
/* Stop Interval Timer and Limit Counter of Tx Arbiter */
SK_OUT32(IoC, MR_ADDR(Port, TXA_ITI_INI), 0L);
SK_OUT32(IoC, MR_ADDR(Port, TXA_LIM_INI), 0L);
@@ -1601,7 +1601,7 @@ int RstMode)/* Reset Mode (SK_SOFT_RST, SK_HARD_RST) */
SK_OUT8(IoC, RB_ADDR(pPrt->PXaQOff, RB_CTRL), RB_RST_SET);
/* Reset the RAM Buffer sync Tx queue */
SK_OUT8(IoC, RB_ADDR(pPrt->PXsQOff, RB_CTRL), RB_RST_SET);
-
+
/* Reset Tx MAC FIFO */
if (pAC->GIni.GIGenesis) {
/* Note: MFF_RST_SET does NOT reset the XMAC ! */
@@ -1626,7 +1626,7 @@ int RstMode)/* Reset Mode (SK_SOFT_RST, SK_HARD_RST) */
*/
/* stop the port's receive queue */
SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff, Q_CSR), CSR_STOP);
-
+
i = 100;
do {
/*
@@ -1635,7 +1635,7 @@ int RstMode)/* Reset Mode (SK_SOFT_RST, SK_HARD_RST) */
*/
SK_OUT16(IoC, B3_PA_CTRL, (Port == MAC_1) ? PA_CLR_TO_RX1 :
PA_CLR_TO_RX2);
-
+
DWord = TestStopBit(pAC, IoC, pPrt->PRxQOff);
/* timeout if i==0 (bug fix for #10748) */
@@ -1662,7 +1662,7 @@ int RstMode)/* Reset Mode (SK_SOFT_RST, SK_HARD_RST) */
/* Reset Rx MAC FIFO */
if (pAC->GIni.GIGenesis) {
-
+
SK_OUT8(IoC, MR_ADDR(Port, RX_MFF_CTRL2), MFF_RST_SET);
/* switch Rx LED off, stop the LED counter */
@@ -1773,7 +1773,7 @@ SK_IOC IoC) /* IO context */
/* We know the RAM Interface Arbiter is enabled. */
SkPciWriteCfgWord(pAC, PCI_PM_CTL_STS, PCI_PM_STATE_D3);
SkPciReadCfgWord(pAC, PCI_PM_CTL_STS, &PmCtlSts);
-
+
if ((PmCtlSts & PCI_PM_STATE_MSK) != PCI_PM_STATE_D3) {
return(1);
}
@@ -1783,7 +1783,7 @@ SK_IOC IoC) /* IO context */
/* Check for D0 state. */
SkPciReadCfgWord(pAC, PCI_PM_CTL_STS, &PmCtlSts);
-
+
if ((PmCtlSts & PCI_PM_STATE_MSK) != PCI_PM_STATE_D0) {
return(1);
}
@@ -1794,7 +1794,7 @@ SK_IOC IoC) /* IO context */
SkPciReadCfgDWord(pAC, PCI_BASE_1ST, &Bp1);
SkPciReadCfgDWord(pAC, PCI_BASE_2ND, &Bp2);
SkPciReadCfgByte(pAC, PCI_LAT_TIM, &Lat);
-
+
if (PciCmd != 0 || Cls != 0 || (Bp1 & 0xfffffff0L) != 0 || Bp2 != 1 ||
Lat != 0) {
return(1);
@@ -1863,7 +1863,7 @@ SK_IOC IoC) /* IO context */
* available on some platforms after 'boot time'.
*/
SK_IN16(IoC, PCI_C(PCI_STATUS), &Word);
-
+
SK_OUT8(IoC, B2_TST_CTRL1, TST_CFG_WRITE_ON);
SK_OUT16(IoC, PCI_C(PCI_STATUS), Word | PCI_ERRBITS);
SK_OUT8(IoC, B2_TST_CTRL1, TST_CFG_WRITE_OFF);
@@ -1878,29 +1878,29 @@ SK_IOC IoC) /* IO context */
/* restore CLK_RUN bits */
SK_OUT16(IoC, B0_CTST, CtrlStat &
(CS_CLK_RUN_HOT | CS_CLK_RUN_RST | CS_CLK_RUN_ENA));
-
+
/* read Chip Identification Number */
SK_IN8(IoC, B2_CHIP_ID, &Byte);
pAC->GIni.GIChipId = Byte;
-
+
/* read number of MACs */
SK_IN8(IoC, B2_MAC_CFG, &Byte);
pAC->GIni.GIMacsFound = (Byte & CFG_SNG_MAC) ? 1 : 2;
-
+
/* get Chip Revision Number */
pAC->GIni.GIChipRev = (SK_U8)((Byte & CFG_CHIP_R_MSK) >> 4);
/* get diff. PCI parameters */
SK_IN16(IoC, B0_CTST, &CtrlStat);
-
+
/* read the adapters RAM size */
SK_IN8(IoC, B2_E_0, &Byte);
-
+
if (pAC->GIni.GIChipId == CHIP_ID_GENESIS) {
pAC->GIni.GIGenesis = SK_TRUE;
- if (Byte == 3) {
+ if (Byte == 3) {
/* special case: 4 x 64k x 36, offset = 0x80000 */
pAC->GIni.GIRamSize = 1024;
pAC->GIni.GIRamOffs = (SK_U32)512 * 1024;
@@ -1911,7 +1911,7 @@ SK_IOC IoC) /* IO context */
}
/* all GE adapters work with 53.125 MHz host clock */
pAC->GIni.GIHstClkFact = SK_FACT_53;
-
+
/* set Descr. Poll Timer Init Value to 250 ms */
pAC->GIni.GIPollTimerVal =
SK_DPOLL_DEF * (SK_U32)pAC->GIni.GIHstClkFact / 100;
@@ -1923,12 +1923,12 @@ SK_IOC IoC) /* IO context */
pAC->GIni.GIRamSize = (Byte == 0) ? 128 : (int)Byte * 4;
#else
pAC->GIni.GIRamSize = 128;
-#endif
+#endif
pAC->GIni.GIRamOffs = 0;
-
+
/* WA for chip Rev. A */
pAC->GIni.GIWolOffs = (pAC->GIni.GIChipRev == 0) ? WOL_REG_OFFS : 0;
-
+
/* get PM Capabilities of PCI config space */
SK_IN16(IoC, PCI_C(PCI_PM_CAP_REG), &Word);
@@ -1939,16 +1939,16 @@ SK_IOC IoC) /* IO context */
/* set entry in GE init struct */
pAC->GIni.GIVauxAvail = SK_TRUE;
}
-
+
/* save Flash-Address Register */
SK_IN32(IoC, B2_FAR, &FlashAddr);
/* test Flash-Address Register */
SK_OUT8(IoC, B2_FAR + 3, 0xff);
SK_IN8(IoC, B2_FAR + 3, &Byte);
-
+
pAC->GIni.GIYukonLite = (SK_BOOL)(Byte != 0);
-
+
/* restore Flash-Address Register */
SK_OUT32(IoC, B2_FAR, FlashAddr);
@@ -1961,13 +1961,13 @@ SK_IOC IoC) /* IO context */
}
/* all YU chips work with 78.125 MHz host clock */
pAC->GIni.GIHstClkFact = SK_FACT_78;
-
+
pAC->GIni.GIPollTimerVal = SK_DPOLL_MAX; /* 215 ms */
}
/* check if 64-bit PCI Slot is present */
pAC->GIni.GIPciSlot64 = (SK_BOOL)((CtrlStat & CS_BUS_SLOT_SZ) != 0);
-
+
/* check if 66 MHz PCI Clock is active */
pAC->GIni.GIPciClock66 = (SK_BOOL)((CtrlStat & CS_BUS_CLOCK) != 0);
@@ -1984,7 +1984,7 @@ SK_IOC IoC) /* IO context */
Byte &= 0x0f; /* the PHY type is stored in the lower nibble */
for (i = 0; i < pAC->GIni.GIMacsFound; i++) {
-
+
if (pAC->GIni.GIGenesis) {
switch (Byte) {
case SK_PHY_XMAC:
@@ -2016,7 +2016,7 @@ SK_IOC IoC) /* IO context */
pAC->GIni.GICopperType = SK_TRUE;
}
pAC->GIni.GP[i].PhyAddr = PHY_ADDR_MARV;
-
+
if (pAC->GIni.GICopperType) {
pAC->GIni.GP[i].PLinkSpeedCap = SK_LSPEED_CAP_AUTO |
SK_LSPEED_CAP_10MBPS | SK_LSPEED_CAP_100MBPS |
@@ -2029,14 +2029,14 @@ SK_IOC IoC) /* IO context */
Byte = SK_PHY_MARV_FIBER;
}
}
-
+
pAC->GIni.GP[i].PhyType = Byte;
-
+
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_INIT,
("PHY type: %d PHY addr: %04x\n", Byte,
pAC->GIni.GP[i].PhyAddr));
}
-
+
/* get Mac Type & set function pointers dependent on */
if (pAC->GIni.GIGenesis) {
pAC->GIni.GIMacType = SK_MAC_XMAC;
@@ -2053,7 +2053,7 @@ SK_IOC IoC) /* IO context */
pAC->GIni.GIFunc.pFnMacStatistic = SkGmMacStatistic;
pAC->GIni.GIFunc.pFnMacResetCounter = SkGmResetCounter;
pAC->GIni.GIFunc.pFnMacOverflow = SkGmOverflowStatus;
-
+
#ifdef SPECIAL_HANDLING
if (pAC->GIni.GIChipId == CHIP_ID_YUKON) {
/* check HW self test result */
@@ -2183,7 +2183,7 @@ int Level) /* initialization level */
SkGeInit0(pAC, IoC);
pAC->GIni.GILevel = SK_INIT_DATA;
break;
-
+
case SK_INIT_IO:
/* Initialization Level 1 */
RetVal = SkGeInit1(pAC, IoC);
@@ -2195,7 +2195,7 @@ int Level) /* initialization level */
SK_OUT32(IoC, B2_IRQM_INI, 0x11335577L);
SK_IN32(IoC, B2_IRQM_INI, &DWord);
SK_OUT32(IoC, B2_IRQM_INI, 0L);
-
+
if (DWord != 0x11335577L) {
RetVal = 2;
break;
@@ -2210,7 +2210,7 @@ int Level) /* initialization level */
/* Level 1 successfully passed */
pAC->GIni.GILevel = SK_INIT_IO;
break;
-
+
case SK_INIT_RUN:
/* Initialization Level 2 */
if (pAC->GIni.GILevel != SK_INIT_IO) {
@@ -2225,7 +2225,7 @@ int Level) /* initialization level */
/* Level 2 successfully passed */
pAC->GIni.GILevel = SK_INIT_RUN;
break;
-
+
default:
SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E003, SKERR_HWI_E003MSG);
RetVal = 3;
@@ -2274,7 +2274,7 @@ SK_IOC IoC) /* IO context */
* available on some platforms after 'boot time'.
*/
SK_IN16(IoC, PCI_C(PCI_STATUS), &Word);
-
+
SK_OUT8(IoC, B2_TST_CTRL1, TST_CFG_WRITE_ON);
SK_OUT16(IoC, PCI_C(PCI_STATUS), Word | PCI_ERRBITS);
SK_OUT8(IoC, B2_TST_CTRL1, TST_CFG_WRITE_OFF);
@@ -2325,7 +2325,7 @@ int Port) /* Port to configure */
SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E004, SKERR_HWI_E004MSG);
return(1);
}
-
+
if (pPrt->PState == SK_PRT_INIT || pPrt->PState == SK_PRT_RUN) {
SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E005, SKERR_HWI_E005MSG);
return(2);
@@ -2342,25 +2342,25 @@ int Port) /* Port to configure */
SkGeXmitLED(pAC, IoC, MR_ADDR(Port, TX_LED_INI), SK_LED_ENA);
SkGeXmitLED(pAC, IoC, MR_ADDR(Port, RX_LED_INI), SK_LED_ENA);
/* The Link LED is initialized by RLMT or Diagnostics itself */
-
+
SkXmInitMac(pAC, IoC, Port);
}
else {
SkGmInitMac(pAC, IoC, Port);
}
-
+
/* do NOT initialize the Link Sync Counter */
SkGeInitMacFifo(pAC, IoC, Port);
-
+
SkGeInitRamBufs(pAC, IoC, Port);
-
+
if (pPrt->PXSQSize != 0) {
/* enable Force Sync bit if synchronous queue available */
SK_OUT8(IoC, MR_ADDR(Port, TXA_CTRL), TXA_ENA_FSYNC);
}
-
+
SkGeInitBmu(pAC, IoC, Port);
/* mark port as initialized */
diff --git a/drivers/sk98lin/skgemib.c b/drivers/sk98lin/skgemib.c
index ab85ccd4e4..4a9e9e6af1 100644
--- a/drivers/sk98lin/skgemib.c
+++ b/drivers/sk98lin/skgemib.c
@@ -28,26 +28,26 @@
* $Log: skgemib.c,v $
* Revision 1.7 2002/12/16 09:04:34 tschilli
* Code for VCT handling added.
- *
+ *
* Revision 1.6 2002/08/09 15:40:21 rwahl
* Editorial change (renamed ConfSpeedCap).
- *
+ *
* Revision 1.5 2002/08/09 11:05:34 rwahl
* Added oid handling for link speed cap.
- *
+ *
* Revision 1.4 2002/08/09 09:40:27 rwahl
* Added support for NDIS OID_PNP_xxx.
- *
+ *
* Revision 1.3 2002/07/17 19:39:54 rwahl
* Added handler for OID_SKGE_SPEED_MODE & OID_SKGE_SPEED_STATUS.
- *
+ *
* Revision 1.2 2002/05/22 08:59:00 rwahl
* - static functions only for release build.
* - Source file must be included.
- *
+ *
* Revision 1.1 2002/05/22 08:12:42 rwahl
* Initial version.
- *
+ *
****************************************************************************/
#include <config.h>
@@ -107,7 +107,6 @@ PNMI_STATIC int PowerManagement(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id,
#endif
-
/* defines *******************************************************************/
#define ID_TABLE_SIZE (sizeof(IdTable)/sizeof(IdTable[0]))
@@ -321,7 +320,7 @@ PNMI_STATIC const SK_PNMI_TAB_ENTRY IdTable[] = {
sizeof(SK_PNMI_VPD),
SK_PNMI_OFF(Vpd) + SK_PNMI_VPD_OFF(VpdAction),
SK_PNMI_RW, Vpd, 0},
- {OID_SKGE_PORT_NUMBER,
+ {OID_SKGE_PORT_NUMBER,
1,
0,
SK_PNMI_MAI_OFF(PortNumber),
diff --git a/drivers/sk98lin/skgepnmi.c b/drivers/sk98lin/skgepnmi.c
index d1c1a3e7d0..b5d32b04c1 100644
--- a/drivers/sk98lin/skgepnmi.c
+++ b/drivers/sk98lin/skgepnmi.c
@@ -28,29 +28,29 @@
* $Log: skgepnmi.c,v $
* Revision 1.102 2002/12/16 14:03:24 tschilli
* VCT code in Vct() changed.
- *
+ *
* Revision 1.101 2002/12/16 09:04:10 tschilli
* Code for VCT handling added.
- *
+ *
* Revision 1.100 2002/09/26 14:28:13 tschilli
* For XMAC the values in the SK_PNMI_PORT Port struct are copied to
* the new SK_PNMI_PORT BufPort struct during a MacUpdate() call.
* These values are used when GetPhysStatVal() is called. With this
* mechanism you get the best results when software corrections for
* counters are needed. Example: RX_LONGFRAMES.
- *
+ *
* Revision 1.99 2002/09/17 12:31:19 tschilli
* OID_SKGE_TX_HW_ERROR_CTS, OID_SKGE_OUT_ERROR_CTS, OID_GEN_XMIT_ERROR:
* Double count of SK_PNMI_HTX_EXCESS_COL in function General() removed.
* OID_PNP_CAPABILITIES: sizeof(SK_PM_WAKE_UP_CAPABILITIES) changed to
* sizeof(SK_PNP_CAPABILITIES) in function PowerManagement().
- *
+ *
* Revision 1.98 2002/09/10 09:00:03 rwahl
* Adapted boolean definitions according sktypes.
- *
+ *
* Revision 1.97 2002/09/05 15:07:03 rwahl
* Editorial changes.
- *
+ *
* Revision 1.96 2002/09/05 11:04:14 rwahl
* - Rx/Tx packets statistics of virtual port were zero on link down (#10750)
* - For GMAC the overflow IRQ for Rx longframe counter was not counted.
@@ -58,23 +58,23 @@
* OID_SKGE_IN_ERRORS_CTS, OID_GEN_RCV_ERROR.
* - Moved correction for OID_SKGE_STAT_RX_TOO_LONG to GetPhysStatVal().
* - Editorial changes.
- *
+ *
* Revision 1.95 2002/09/04 08:53:37 rwahl
* - Incorrect statistics for Rx_too_long counter with jumbo frame (#10751)
* - StatRxFrameTooLong & StatRxPMaccErr counters were not reset.
* - Fixed compiler warning for debug msg arg types.
- *
+ *
* Revision 1.94 2002/08/09 15:42:14 rwahl
* - Fixed StatAddr table for GMAC.
* - VirtualConf(): returned indeterminated status for speed oids if no
* active port.
- *
+ *
* Revision 1.93 2002/08/09 11:04:59 rwahl
* Added handler for link speed caps.
- *
+ *
* Revision 1.92 2002/08/09 09:43:03 rwahl
* - Added handler for NDIS OID_PNP_xxx ids.
- *
+ *
* Revision 1.91 2002/07/17 19:53:03 rwahl
* - Added StatOvrflwBit table for XMAC & GMAC.
* - Extended StatAddr table for GMAC. Added check of number of counters
@@ -86,51 +86,51 @@
* - Added handler for oids SKGE_SPEED_MODE & SKGE_SPEED_STATUS.
* - Extendet GetPhysStatVal() for GMAC.
* - Editorial changes.
- *
+ *
* Revision 1.90 2002/05/22 08:56:25 rwahl
* - Moved OID table to separate source file.
* - Fix: TX_DEFFERAL counter incremented in full-duplex mode.
* - Use string definitions for error msgs.
- *
+ *
* Revision 1.89 2001/09/18 10:01:30 mkunz
* some OID's fixed for dualnetmode
- *
+ *
* Revision 1.88 2001/08/02 07:58:08 rwahl
* - Fixed NetIndex to csum module at ResetCounter().
- *
+ *
* Revision 1.87 2001/04/06 13:35:09 mkunz
* -Bugs fixed in handling of OID_SKGE_MTU and the VPD OID's
- *
+ *
* Revision 1.86 2001/03/09 09:18:03 mkunz
* Changes in SK_DBG_MSG
- *
+ *
* Revision 1.85 2001/03/08 09:37:31 mkunz
* Bugfix in ResetCounter for Pnmi.Port structure
- *
+ *
* Revision 1.84 2001/03/06 09:04:55 mkunz
* Made some changes in instance calculation
- *
+ *
* Revision 1.83 2001/02/15 09:15:32 mkunz
* Necessary changes for dual net mode added
- *
+ *
* Revision 1.82 2001/02/07 08:24:19 mkunz
* -Made changes in handling of OID_SKGE_MTU
- *
+ *
* Revision 1.81 2001/02/06 09:58:00 mkunz
* -Vpd bug fixed
* -OID_SKGE_MTU added
* -pnmi support for dual net mode. Interface function and macros extended
- *
+ *
* Revision 1.80 2001/01/22 13:41:35 rassmann
* Supporting two nets on dual-port adapters.
- *
+ *
* Revision 1.79 2000/12/05 14:57:40 cgoos
* SetStruct failed before first Link Up (link mode of virtual
* port "INDETERMINATED").
- *
+ *
* Revision 1.78 2000/09/12 10:44:58 cgoos
* Fixed SK_PNMI_STORE_U32 calls with typecasted argument.
- *
+ *
* Revision 1.77 2000/09/07 08:10:19 rwahl
* - Modified algorithm for 64bit NDIS statistic counters;
* returns 64bit or 32bit value depending on passed buffer
@@ -138,60 +138,60 @@
* buffer size is zero. OID_GEN_XMIT_ERROR, OID_GEN_RCV_ERROR,
* and OID_GEN_RCV_NO_BUFFER handled as 64bit counter, too.
* - corrected OID_SKGE_RLMT_PORT_PREFERRED.
- *
+ *
* Revision 1.76 2000/08/03 15:23:39 rwahl
* - Correction for FrameTooLong counter has to be moved to OID handling
* routines (instead of statistic counter routine).
* - Fix in XMAC Reset Event handling: Only offset counter for hardware
* statistic registers are updated.
- *
+ *
* Revision 1.75 2000/08/01 16:46:05 rwahl
* - Added StatRxLongFrames counter and correction of FrameTooLong counter.
* - Added directive to control width (default = 32bit) of NDIS statistic
* counters (SK_NDIS_64BIT_CTR).
- *
+ *
* Revision 1.74 2000/07/04 11:41:53 rwahl
* - Added volition connector type.
- *
+ *
* Revision 1.73 2000/03/15 16:33:10 rwahl
* Fixed bug 10510; wrong reset of virtual port statistic counters.
- *
+ *
* Revision 1.72 1999/12/06 16:15:53 rwahl
* Fixed problem of instance range for current and factory MAC address.
- *
+ *
* Revision 1.71 1999/12/06 10:14:20 rwahl
* Fixed bug 10476; set operation for PHY_OPERATION_MODE.
- *
+ *
* Revision 1.70 1999/11/22 13:33:34 cgoos
* Changed license header to GPL.
- *
+ *
* Revision 1.69 1999/10/18 11:42:15 rwahl
* Added typecasts for checking event dependent param (debug only).
- *
+ *
* Revision 1.68 1999/10/06 09:35:59 cgoos
* Added state check to PHY_READ call (hanged if called during startup).
- *
+ *
* Revision 1.67 1999/09/22 09:53:20 rwahl
* - Read Broadcom register for updating fcs error counter (1000Base-T).
*
* Revision 1.66 1999/08/26 13:47:56 rwahl
* Added SK_DRIVER_SENDEVENT when queueing RLMT_CHANGE_THRES trap.
- *
+ *
* Revision 1.65 1999/07/26 07:49:35 cgoos
* Added two typecasts to avoid compiler warnings.
- *
+ *
* Revision 1.64 1999/05/20 09:24:12 cgoos
* Changes for 1000Base-T (sensors, Master/Slave).
*
* Revision 1.63 1999/04/13 15:11:58 mhaveman
* Moved include of rlmt.h to header skgepnmi.h because some macros
* are needed there.
- *
+ *
* Revision 1.62 1999/04/13 15:08:07 mhaveman
* Replaced again SK_RLMT_CHECK_LINK with SK_PNMI_RLMT_MODE_CHK_LINK
* to grant unified interface by only using the PNMI header file.
* SK_PNMI_RLMT_MODE_CHK_LINK is defined the same as SK_RLMT_CHECK_LINK.
- *
+ *
* Revision 1.61 1999/04/13 15:02:48 mhaveman
* Changes caused by review:
* -Changed some comments
@@ -199,21 +199,21 @@
* -Optimized PRESET check.
* -Meaning of error SK_ADDR_DUPLICATE_ADDRESS changed. Set of same
* address will now not cause this error. Removed corresponding check.
- *
+ *
* Revision 1.60 1999/03/23 10:41:23 mhaveman
* Added comments.
- *
+ *
* Revision 1.59 1999/02/19 08:01:28 mhaveman
* Fixed bug 10372 that after counter reset all ports were displayed
* as inactive.
- *
+ *
* Revision 1.58 1999/02/16 18:04:47 mhaveman
* Fixed problem of twisted OIDs SENSOR_WAR_TIME and SENSOR_ERR_TIME.
- *
+ *
* Revision 1.56 1999/01/27 12:29:11 mhaveman
* SkTimerStart was called with time value in milli seconds but needs
* micro seconds.
- *
+ *
* Revision 1.55 1999/01/25 15:00:38 mhaveman
* Added support to allow multiple ports to be active. If this feature in
* future will be used, the Management Data Base variables PORT_ACTIVE
@@ -223,32 +223,32 @@
* physical ports. A get returns the melted values of all active physical
* ports. If the port values differ a return value INDETERMINATED will
* be returned. This effects especially the CONF group.
- *
+ *
* Revision 1.54 1999/01/19 10:10:22 mhaveman
* -Fixed bug 10354: Counter values of virtual port were wrong after port
* switches
* -Added check if a switch to the same port is notified.
- *
+ *
* Revision 1.53 1999/01/07 09:25:21 mhaveman
* Forgot to initialize a variable.
- *
+ *
* Revision 1.52 1999/01/05 10:34:33 mhaveman
* Fixed little error in RlmtChangeEstimate calculation.
- *
+ *
* Revision 1.51 1999/01/05 09:59:07 mhaveman
* -Moved timer start to init level 2
* -Redesigned port switch average calculation to avoid 64bit
* arithmetic.
- *
+ *
* Revision 1.50 1998/12/10 15:13:59 mhaveman
* -Fixed: PHYS_CUR_ADDR returned wrong addresses
* -Fixed: RLMT_PORT_PREFERED and RLMT_CHANGE_THRES preset returned
* always BAD_VALUE.
* -Fixed: TRAP buffer seemed to sometimes suddenly empty
- *
+ *
* Revision 1.49 1998/12/09 16:17:07 mhaveman
* Fixed: Couldnot delete VPD keys on UNIX.
- *
+ *
* Revision 1.48 1998/12/09 14:11:10 mhaveman
* -Add: Debugmessage for XMAC_RESET supressed to minimize output.
* -Fixed: RlmtChangeThreshold will now be initialized.
@@ -256,7 +256,7 @@
* -Fixed: On VPD key creation an invalid key name could be created
* (e.g. A5)
* -Some minor changes in comments and code.
- *
+ *
* Revision 1.47 1998/12/08 16:00:31 mhaveman
* -Fixed: For RLMT_PORT_ACTIVE will now be returned a 0 if no port
* is active.
@@ -275,11 +275,11 @@
* to 0, an error should be returned by the caller.
* -Fixed: Wrong number of instances with RLMT statistic.
* -Fixed: Return now SK_LMODE_STAT_UNKNOWN if the LinkModeStatus is 0.
- *
+ *
* Revision 1.45 1998/12/03 17:17:24 mhaveman
* -Removed for VPD create action the buffer size limitation to 4 bytes.
* -Pass now physical/active physical port to ADDR for CUR_ADDR set
- *
+ *
* Revision 1.44 1998/12/03 15:14:35 mhaveman
* Another change to Vpd instance evaluation.
*
@@ -289,36 +289,36 @@
*
* Revision 1.42 1998/12/03 11:31:47 mhaveman
* Inserted cast to satisfy lint.
- *
+ *
* Revision 1.41 1998/12/03 11:28:16 mhaveman
* Removed SK_PNMI_CHECKPTR
- *
+ *
* Revision 1.40 1998/12/03 11:19:07 mhaveman
* Fixed problems
* -A set to virtual port will now be ignored. A set with broadcast
* address to any port will be ignored.
* -GetStruct function made VPD instance calculation wrong.
* -Prefered port returned -1 instead of 0.
- *
+ *
* Revision 1.39 1998/11/26 15:30:29 mhaveman
* Added sense mode to link mode.
- *
+ *
* Revision 1.38 1998/11/23 15:34:00 mhaveman
* -Fixed bug for RX counters. On an RX overflow interrupt the high
* words of all RX counters were incremented.
* -SET operations on FLOWCTRL_MODE and LINK_MODE accept now the
* value 0, which has no effect. It is usefull for multiple instance
* SETs.
- *
+ *
* Revision 1.37 1998/11/20 08:02:04 mhaveman
* -Fixed: Ports were compared with MAX_SENSORS
* -Fixed: Crash in GetTrapEntry with MEMSET macro
* -Fixed: Conversions between physical, logical port index and instance
- *
+ *
* Revision 1.36 1998/11/16 07:48:53 mhaveman
* Casted SK_DRIVER_SENDEVENT with (void) to eleminate compiler warnings
* on Solaris.
- *
+ *
* Revision 1.35 1998/11/16 07:45:34 mhaveman
* SkAddrOverride now returns value and will be checked.
*
@@ -327,14 +327,14 @@
* of needed buffer space on TOO_SHORT errors. Therefore all
* SkPnmiGet/Preset/Set functions now have a pointer to the length
* parameter, where the needed space on error is returned.
- *
+ *
* Revision 1.33 1998/11/03 13:52:46 mhaveman
* Made file lint conform.
- *
+ *
* Revision 1.32 1998/11/03 13:19:07 mhaveman
* The events SK_HWEV_SET_LMODE and SK_HWEV_SET_FLOWMODE pass now in
* Para32[0] the physical MAC index and in Para32[1] the new mode.
- *
+ *
* Revision 1.31 1998/11/03 12:30:40 gklug
* fix: compiler warning memset
*
@@ -344,14 +344,14 @@
*
* Revision 1.29 1998/11/02 11:23:54 mhaveman
* Corrected SK_ERROR_LOG to SK_ERR_LOG. Sorry.
- *
+ *
* Revision 1.28 1998/11/02 10:47:16 mhaveman
* Added syslog messages for internal errors.
- *
+ *
* Revision 1.27 1998/10/30 15:48:06 mhaveman
* Fixed problems after simulation of SK_PNMI_EVT_CHG_EST_TIMER and
* RlmtChangeThreshold calculation.
- *
+ *
* Revision 1.26 1998/10/29 15:36:55 mhaveman
* -Fixed bug in trap buffer handling.
* -OID_SKGE_DRIVER_DESCR, OID_SKGE_DRIVER_VERSION, OID_SKGE_HW_DESCR,
@@ -361,10 +361,10 @@
* -Perform a RlmtUpdate during SK_PNMI_EVT_XMAC_RESET to minimize
* RlmtUpdate calls in GetStatVal.
* -Inserted SK_PNMI_CHECKFLAGS macro increase readability.
- *
+ *
* Revision 1.25 1998/10/29 08:50:36 mhaveman
* Fixed problems after second event simulation.
- *
+ *
* Revision 1.24 1998/10/28 08:44:37 mhaveman
* -Fixed alignment problem
* -Fixed problems during event simulation
@@ -374,19 +374,19 @@
*
* Revision 1.23 1998/10/23 10:16:37 mhaveman
* Fixed bugs after buffer test simulation.
- *
+ *
* Revision 1.22 1998/10/21 13:23:52 mhaveman
* -Call syntax of SkOsGetTime() changed to SkOsGetTime(pAc).
* -Changed calculation of hundrets of seconds.
*
* Revision 1.20 1998/10/20 07:30:45 mhaveman
* Made type changes to unsigned integer where possible.
- *
+ *
* Revision 1.19 1998/10/19 10:51:30 mhaveman
* -Made Bug fixes after simulation run
* -Renamed RlmtMAC... to RlmtPort...
* -Marked workarounds with Errata comments
- *
+ *
* Revision 1.18 1998/10/14 07:50:08 mhaveman
* -For OID_SKGE_LINK_STATUS the link down detection has moved from RLMT
* to HWACCESS.
@@ -401,21 +401,21 @@
* Revision 1.16 1998/10/07 10:52:49 mhaveman
* -Inserted handling of some OID_GEN_ Ids for windows
* -Fixed problem with 803.2 statistic.
- *
+ *
* Revision 1.15 1998/10/01 09:16:29 mhaveman
* Added Debug messages for function call and UpdateFlag tracing.
- *
+ *
* Revision 1.14 1998/09/30 13:39:09 mhaveman
* -Reduced namings of 'MAC' by replacing them with 'PORT'.
* -Completed counting of OID_SKGE_RX_HW_ERROR_CTS,
* OID_SKGE_TX_HW_ERROR_CTS,
* OID_SKGE_IN_ERRORS_CTS, and OID_SKGE_OUT_ERROR_CTS.
* -SET check for RlmtMode
- *
+ *
* Revision 1.13 1998/09/28 13:13:08 mhaveman
* Hide strcmp, strlen, and strncpy behind macros SK_STRCMP, SK_STRLEN,
* and SK_STRNCPY. (Same reasons as for mem.. and MEM..)
- *
+ *
* Revision 1.12 1998/09/16 08:18:36 cgoos
* Fix: XM_INxx and XM_OUTxx called with different parameter order:
* sometimes IoC,Mac,... sometimes Mac,IoC,... Now always first variant.
@@ -425,10 +425,10 @@
* Revision 1.11 1998/09/04 17:01:45 mhaveman
* Added SyncCounter as macro and OID_SKGE_.._NO_DESCR_CTS to
* OID_SKGE_RX_NO_BUF_CTS.
- *
+ *
* Revision 1.10 1998/09/04 14:35:35 mhaveman
* Added macro counters, that are counted by driver.
- *
+ *
****************************************************************************/
@@ -476,9 +476,9 @@ int SkPnmiSetVar(SK_AC *pAC, SK_IOC IoC, SK_U32 Id, void *pBuf,
unsigned int *pLen, SK_U32 Instance, SK_U32 NetIndex);
int SkPnmiGetStruct(SK_AC *pAC, SK_IOC IoC, void *pBuf,
unsigned int *pLen, SK_U32 NetIndex);
-int SkPnmiPreSetStruct(SK_AC *pAC, SK_IOC IoC, void *pBuf,
+int SkPnmiPreSetStruct(SK_AC *pAC, SK_IOC IoC, void *pBuf,
unsigned int *pLen, SK_U32 NetIndex);
-int SkPnmiSetStruct(SK_AC *pAC, SK_IOC IoC, void *pBuf,
+int SkPnmiSetStruct(SK_AC *pAC, SK_IOC IoC, void *pBuf,
unsigned int *pLen, SK_U32 NetIndex);
int SkPnmiEvent(SK_AC *pAC, SK_IOC IoC, SK_U32 Event, SK_EVPARA Param);
@@ -534,7 +534,7 @@ PNMI_STATIC void CheckVctStatus(SK_AC *, SK_IOC, char *, SK_U32, SK_U32);
/*
* Overflow status register bit table and corresponding counter
* dependent on MAC type - the number relates to the size of overflow
- * mask returned by the pFnMacOverflow function
+ * mask returned by the pFnMacOverflow function
*/
PNMI_STATIC const SK_U16 StatOvrflwBit[][SK_PNMI_MAC_TYPES] = {
/* Bit0 */ { SK_PNMI_HTX, SK_PNMI_HTX_UNICAST},
@@ -794,7 +794,7 @@ int Level) /* Initialization level */
#ifdef SK_PNMI_CHECK
if (SK_PNMI_MAX_IDX != SK_PNMI_CNT_NO) {
-
+
SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR049, SK_PNMI_ERR049MSG);
SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_INIT | SK_DBGCAT_FATAL,
@@ -806,13 +806,13 @@ int Level) /* Initialization level */
if (SK_PNMI_MAX_IDX !=
(sizeof(StatAddr) / (sizeof(SK_PNMI_STATADDR) * SK_PNMI_MAC_TYPES))) {
-
+
SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR050, SK_PNMI_ERR050MSG);
SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_INIT | SK_DBGCAT_FATAL,
("StatAddr table size (%d) differs from "
"SK_PNMI_MAX_IDX (%d)\n",
- (sizeof(StatAddr) /
+ (sizeof(StatAddr) /
(sizeof(SK_PNMI_STATADDR) * SK_PNMI_MAC_TYPES)),
SK_PNMI_MAX_IDX));
BRK;
@@ -830,15 +830,15 @@ int Level) /* Initialization level */
pAC->GIni.GIFunc.pFnMacResetCounter(pAC, IoC, PortIndex);
}
-
- /* Initialize DSP variables for Vct() to 0xff => Never written! */
+
+ /* Initialize DSP variables for Vct() to 0xff => Never written! */
for (PortIndex = 0; PortIndex < PortMax; PortIndex ++) {
pPrt = &pAC->GIni.GP[PortIndex];
pPrt->PCableLen =0xff;
pVctBackupData = &pAC->Pnmi.VctBackup[PortIndex];
pVctBackupData->PCableLen = 0xff;
}
-
+
/*
* Get pci bus speed
*/
@@ -962,9 +962,9 @@ int Level) /* Initialization level */
default:
pAC->Pnmi.Connector = 1;
break;
- }
+ }
break;
-
+
case SK_INIT_RUN:
/*
* Start timer for RLMT change counter
@@ -1120,7 +1120,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
* SK_PNMI_ERR_GENERAL A general severe internal error occured
* SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to take
* the data.
- * SK_PNMI_ERR_UNKNOWN_NET The requested NetIndex doesn't exist
+ * SK_PNMI_ERR_UNKNOWN_NET The requested NetIndex doesn't exist
*/
int SkPnmiGetStruct(
SK_AC *pAC, /* Pointer to adapter context */
@@ -1250,7 +1250,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
*/
if (Ret == SK_PNMI_ERR_UNKNOWN_INST) {
- break;
+ break;
}
if (Ret != SK_PNMI_ERR_OK) {
@@ -1311,8 +1311,8 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
("PNMI: SkPnmiPreSetStruct: Called, BufLen=%d, NetIndex=%d\n",
*pLen, NetIndex));
- return (PnmiStruct(pAC, IoC, SK_PNMI_PRESET, (char *)pBuf,
- pLen, NetIndex));
+ return (PnmiStruct(pAC, IoC, SK_PNMI_PRESET, (char *)pBuf,
+ pLen, NetIndex));
}
/*****************************************************************************
@@ -1349,8 +1349,8 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
("PNMI: SkPnmiSetStruct: Called, BufLen=%d, NetIndex=%d\n",
*pLen, NetIndex));
- return (PnmiStruct(pAC, IoC, SK_PNMI_SET, (char *)pBuf,
- pLen, NetIndex));
+ return (PnmiStruct(pAC, IoC, SK_PNMI_SET, (char *)pBuf,
+ pLen, NetIndex));
}
/*****************************************************************************
@@ -1444,7 +1444,7 @@ SK_EVPARA Param) /* Event dependent parameter */
SK_PNMI_CHECKFLAGS("SkPnmiEvent: On call");
MacType = pAC->GIni.GIMacType;
-
+
switch (Event) {
case SK_PNMI_EVT_SIRQ_OVERFLOW:
@@ -1470,7 +1470,7 @@ SK_EVPARA Param) /* Event dependent parameter */
(OverflowStatus == 0)) {
SK_PNMI_CHECKFLAGS("SkPnmiEvent: On return");
- return (0);
+ return (0);
}
/*
@@ -1513,7 +1513,7 @@ SK_EVPARA Param) /* Event dependent parameter */
case SK_PNMI_HRX_OCTETLOW:
case SK_PNMI_HRX_IRLENGTH:
case SK_PNMI_HRX_RESERVED:
-
+
/*
* the following counters aren't be handled (id > 63)
*/
@@ -1594,7 +1594,7 @@ SK_EVPARA Param) /* Event dependent parameter */
(unsigned int)Param.Para64);
(void)SK_DRIVER_SENDEVENT(pAC, IoC);
break;
-
+
case SK_PNMI_EVT_SEN_ERR_UPP:
#ifdef DEBUG
if ((unsigned int)Param.Para64 >= (unsigned int)pAC->I2c.MaxSens) {
@@ -1703,14 +1703,14 @@ SK_EVPARA Param) /* Event dependent parameter */
* Set all counters and timestamps to zero
*/
ResetCounter(pAC, IoC, NetIndex); /* the according NetIndex is required
- as a Parameter of the Event */
+ as a Parameter of the Event */
break;
case SK_PNMI_EVT_XMAC_RESET:
/*
* To grant continuous counter values store the current
* XMAC statistic values to the entries 1..n of the
- * CounterOffset array. XMAC Errata #2
+ * CounterOffset array. XMAC Errata #2
*/
#ifdef DEBUG
if ((unsigned int)Param.Para64 >= SK_MAX_MACS) {
@@ -1763,7 +1763,7 @@ SK_EVPARA Param) /* Event dependent parameter */
SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_RLMT_PORT_UP parameter"
- " wrong, PhysPortIndex=%d\n", PhysPortIndex));
+ " wrong, PhysPortIndex=%d\n", PhysPortIndex));
return (0);
}
@@ -1781,15 +1781,15 @@ SK_EVPARA Param) /* Event dependent parameter */
/* Add incremental difference to offset (#10620)*/
(void)pAC->GIni.GIFunc.pFnMacStatistic(pAC, IoC, PhysPortIndex,
XM_RXE_SHT_ERR, &Val32);
-
+
Value = (((SK_U64)pAC->Pnmi.Port[PhysPortIndex].
CounterHigh[SK_PNMI_HRX_SHORTS] << 32) | (SK_U64)Val32);
pAC->Pnmi.Port[PhysPortIndex].CounterOffset[SK_PNMI_HRX_SHORTS] +=
Value - pAC->Pnmi.Port[PhysPortIndex].RxShortZeroMark;
}
-
+
/* Tell VctStatus() that a link was up meanwhile. */
- pAC->Pnmi.VctStatus[PhysPortIndex] |= SK_PNMI_VCT_LINK;
+ pAC->Pnmi.VctStatus[PhysPortIndex] |= SK_PNMI_VCT_LINK;
break;
case SK_PNMI_EVT_RLMT_PORT_DOWN:
@@ -1800,7 +1800,7 @@ SK_EVPARA Param) /* Event dependent parameter */
SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL,
("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_RLMT_PORT_DOWN parameter"
- " wrong, PhysPortIndex=%d\n", PhysPortIndex));
+ " wrong, PhysPortIndex=%d\n", PhysPortIndex));
return (0);
}
@@ -1811,13 +1811,13 @@ SK_EVPARA Param) /* Event dependent parameter */
*/
QueueRlmtPortTrap(pAC, OID_SKGE_TRAP_RLMT_PORT_DOWN, PhysPortIndex);
(void)SK_DRIVER_SENDEVENT(pAC, IoC);
-
+
/* Bugfix #10620 - get zero level for incremental difference */
if ((pAC->GIni.GIMacType == SK_MAC_XMAC)) {
(void)pAC->GIni.GIFunc.pFnMacStatistic(pAC, IoC, PhysPortIndex,
XM_RXE_SHT_ERR, &Val32);
- pAC->Pnmi.Port[PhysPortIndex].RxShortZeroMark =
+ pAC->Pnmi.Port[PhysPortIndex].RxShortZeroMark =
(((SK_U64)pAC->Pnmi.Port[PhysPortIndex].
CounterHigh[SK_PNMI_HRX_SHORTS] << 32) | (SK_U64)Val32);
}
@@ -2007,7 +2007,7 @@ SK_EVPARA Param) /* Event dependent parameter */
* Param.Para32[1] is reserved, contains -1.
*/
/*
- * Check number of nets
+ * Check number of nets
*/
MaxNetNumber = pAC->GIni.GIMacsFound;
if (((unsigned int)Param.Para32[0] < 1)
@@ -2015,19 +2015,19 @@ SK_EVPARA Param) /* Event dependent parameter */
return (SK_PNMI_ERR_UNKNOWN_NET);
}
- if ((unsigned int)Param.Para32[0] == 1) { /* single net mode */
- pAC->Pnmi.DualNetActiveFlag = SK_FALSE;
- }
- else { /* dual net mode */
- pAC->Pnmi.DualNetActiveFlag = SK_TRUE;
- }
- break;
+ if ((unsigned int)Param.Para32[0] == 1) { /* single net mode */
+ pAC->Pnmi.DualNetActiveFlag = SK_FALSE;
+ }
+ else { /* dual net mode */
+ pAC->Pnmi.DualNetActiveFlag = SK_TRUE;
+ }
+ break;
case SK_PNMI_EVT_VCT_RESET:
PhysPortIndex = Param.Para32[0];
pPrt = &pAC->GIni.GP[PhysPortIndex];
pVctBackupData = &pAC->Pnmi.VctBackup[PhysPortIndex];
-
+
if (pAC->Pnmi.VctStatus[PhysPortIndex] & SK_PNMI_VCT_PENDING) {
RetCode = SkGmCableDiagStatus(pAC, IoC, PhysPortIndex, SK_FALSE);
if (RetCode == 2) {
@@ -2045,7 +2045,7 @@ SK_EVPARA Param) /* Event dependent parameter */
pAC->Pnmi.VctStatus[PhysPortIndex] &= ~SK_PNMI_VCT_PENDING;
pAC->Pnmi.VctStatus[PhysPortIndex] |=
(SK_PNMI_VCT_NEW_VCT_DATA | SK_PNMI_VCT_TEST_DONE);
-
+
/* Copy results for later use to PNMI struct. */
for (i = 0; i < 4; i++) {
if (pPrt->PMdiPairLen[i] > 35) {
@@ -2057,13 +2057,13 @@ SK_EVPARA Param) /* Event dependent parameter */
pVctBackupData->PMdiPairLen[i] = CableLength;
pVctBackupData->PMdiPairSts[i] = pPrt->PMdiPairSts[i];
}
-
+
Param.Para32[0] = PhysPortIndex;
Param.Para32[1] = -1;
SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_RESET, Param);
SkEventDispatcher(pAC, IoC);
}
-
+
break;
default:
@@ -2094,7 +2094,7 @@ SK_EVPARA Param) /* Event dependent parameter */
* Returns:
* SK_PNMI_ERR_XXX. For details have a look to the description of the
* calling functions.
- * SK_PNMI_ERR_UNKNOWN_NET The requested NetIndex doesn't exist
+ * SK_PNMI_ERR_UNKNOWN_NET The requested NetIndex doesn't exist
*/
PNMI_STATIC int PnmiVar(
SK_AC *pAC, /* Pointer to adapter context */
@@ -2115,9 +2115,9 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
*pLen = 0;
return (SK_PNMI_ERR_UNKNOWN_OID);
}
-
- /*
- * Check NetIndex
+
+ /*
+ * Check NetIndex
*/
if (NetIndex >= pAC->Rlmt.NumNets) {
return (SK_PNMI_ERR_UNKNOWN_NET);
@@ -2149,7 +2149,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
*
* Returns:
* SK_PNMI_ERR_XXX. The codes are described in the calling functions.
- * SK_PNMI_ERR_UNKNOWN_NET The requested NetIndex doesn't exist
+ * SK_PNMI_ERR_UNKNOWN_NET The requested NetIndex doesn't exist
*/
PNMI_STATIC int PnmiStruct(
SK_AC *pAC, /* Pointer to adapter context */
@@ -2182,14 +2182,14 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
*pLen = SK_PNMI_STRUCT_SIZE;
return (SK_PNMI_ERR_TOO_SHORT);
}
-
- /*
- * Check NetIndex
+
+ /*
+ * Check NetIndex
*/
if (NetIndex >= pAC->Rlmt.NumNets) {
return (SK_PNMI_ERR_UNKNOWN_NET);
}
-
+
SK_PNMI_CHECKFLAGS("PnmiStruct: On call");
/*
@@ -3546,7 +3546,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
*pLen = 0;
return (SK_PNMI_ERR_GENERAL);
}
-
+
Val32 = (SK_U32)pVpdStatus->vpd_free_rw;
SK_PNMI_STORE_U32(pBuf, Val32);
*pLen = sizeof(SK_U32);
@@ -3716,7 +3716,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
*pLen = 0;
return (SK_PNMI_ERR_GENERAL);
}
- }
+ }
else {
/* The only OID which can be set is VPD_ACTION */
if (Id != OID_SKGE_VPD_ACTION) {
@@ -3959,9 +3959,9 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
*pLen = 0;
return (SK_PNMI_ERR_READ_ONLY);
}
-
+
MacType = pAC->GIni.GIMacType;
-
+
/*
* Check length for the various supported OIDs
*/
@@ -4099,7 +4099,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_TOO_LONG, NetIndex) +
GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_FCS, NetIndex) +
GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_CEXT, NetIndex);
- break;
+ break;
case OID_SKGE_TX_HW_ERROR_CTS:
case OID_SKGE_OUT_ERROR_CTS:
@@ -4330,7 +4330,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
else {
Val64 = pAC->Pnmi.BufPort[0].TxSwQueueLen +
pAC->Pnmi.BufPort[1].TxSwQueueLen;
- }
+ }
}
else {
/* Dual net mode */
@@ -4341,7 +4341,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
else {
Val64 = pAC->Pnmi.Port[0].TxSwQueueLen +
pAC->Pnmi.Port[1].TxSwQueueLen;
- }
+ }
}
SK_PNMI_STORE_U64(pBuf, Val64);
*pLen = sizeof(SK_U64);
@@ -4619,7 +4619,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
}
/* Single net mode */
else {
- Val64 = Val64RxHwErrs +
+ Val64 = Val64RxHwErrs +
pAC->Pnmi.BufPort[0].RxNoBufCts +
pAC->Pnmi.BufPort[1].RxNoBufCts;
}
@@ -4631,7 +4631,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
}
/* Single net mode */
else {
- Val64 = Val64RxHwErrs +
+ Val64 = Val64RxHwErrs +
pAC->Pnmi.Port[0].RxNoBufCts +
pAC->Pnmi.Port[1].RxNoBufCts;
}
@@ -4649,7 +4649,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
}
/* Single net mode */
else {
- Val64 = Val64TxHwErrs +
+ Val64 = Val64TxHwErrs +
pAC->Pnmi.BufPort[0].TxNoBufCts +
pAC->Pnmi.BufPort[1].TxNoBufCts;
}
@@ -4661,7 +4661,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
}
/* Single net mode */
else {
- Val64 = Val64TxHwErrs +
+ Val64 = Val64TxHwErrs +
pAC->Pnmi.Port[0].TxNoBufCts +
pAC->Pnmi.Port[1].TxNoBufCts;
}
@@ -5418,7 +5418,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
}
break;
- case OID_SKGE_MTU:
+ case OID_SKGE_MTU:
if (*pLen < sizeof(SK_U32)) {
*pLen = sizeof(SK_U32);
@@ -5465,7 +5465,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
case OID_SKGE_LINK_CAP:
if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
if (LogPortIndex == 0) {
-
+
/* Get value for virtual port */
VirtualConf(pAC, IoC, Id, pBuf +
Offset);
@@ -5481,7 +5481,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
Offset += sizeof(char);
}
else { /* DualNetMode */
-
+
*(pBuf + Offset) = pAC->GIni.GP[NetIndex].PLinkCap;
Offset += sizeof(char);
}
@@ -5490,7 +5490,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
case OID_SKGE_LINK_MODE:
if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
if (LogPortIndex == 0) {
-
+
/* Get value for virtual port */
VirtualConf(pAC, IoC, Id, pBuf +
Offset);
@@ -5505,8 +5505,8 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
}
Offset += sizeof(char);
}
- else { /* DualNetMode */
-
+ else { /* DualNetMode */
+
*(pBuf + Offset) = pAC->GIni.GP[NetIndex].PLinkModeConf;
Offset += sizeof(char);
}
@@ -5515,7 +5515,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
case OID_SKGE_LINK_MODE_STATUS:
if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
if (LogPortIndex == 0) {
-
+
/* Get value for virtual port */
VirtualConf(pAC, IoC, Id, pBuf +
Offset);
@@ -5540,7 +5540,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
case OID_SKGE_LINK_STATUS:
if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
if (LogPortIndex == 0) {
-
+
/* Get value for virtual port */
VirtualConf(pAC, IoC, Id, pBuf +
Offset);
@@ -5549,7 +5549,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
/* Get value for physical ports */
PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
pAC, LogPortIndex);
-
+
*(pBuf + Offset) =
CalculateLinkStatus(pAC,
IoC, PhysPortIndex);
@@ -5566,7 +5566,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
case OID_SKGE_FLOWCTRL_CAP:
if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
if (LogPortIndex == 0) {
-
+
/* Get value for virtual port */
VirtualConf(pAC, IoC, Id, pBuf +
Offset);
@@ -5575,14 +5575,14 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
/* Get value for physical ports */
PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
pAC, LogPortIndex);
-
+
*(pBuf + Offset) = pAC->GIni.GP[
PhysPortIndex].PFlowCtrlCap;
}
Offset += sizeof(char);
}
else { /* DualNetMode */
-
+
*(pBuf + Offset) = pAC->GIni.GP[NetIndex].PFlowCtrlCap;
Offset += sizeof(char);
}
@@ -5591,7 +5591,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
case OID_SKGE_FLOWCTRL_MODE:
if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
if (LogPortIndex == 0) {
-
+
/* Get value for virtual port */
VirtualConf(pAC, IoC, Id, pBuf +
Offset);
@@ -5600,7 +5600,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
/* Get value for physical port */
PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
pAC, LogPortIndex);
-
+
*(pBuf + Offset) = pAC->GIni.GP[
PhysPortIndex].PFlowCtrlMode;
}
@@ -5616,7 +5616,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
case OID_SKGE_FLOWCTRL_STATUS:
if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
if (LogPortIndex == 0) {
-
+
/* Get value for virtual port */
VirtualConf(pAC, IoC, Id, pBuf +
Offset);
@@ -5625,7 +5625,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
/* Get value for physical port */
PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
pAC, LogPortIndex);
-
+
*(pBuf + Offset) = pAC->GIni.GP[
PhysPortIndex].PFlowCtrlStatus;
}
@@ -5641,7 +5641,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
case OID_SKGE_PHY_OPERATION_CAP:
if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
if (LogPortIndex == 0) {
-
+
/* Get value for virtual port */
VirtualConf(pAC, IoC, Id, pBuf +
Offset);
@@ -5650,14 +5650,14 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
/* Get value for physical ports */
PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
pAC, LogPortIndex);
-
+
*(pBuf + Offset) = pAC->GIni.GP[
PhysPortIndex].PMSCap;
}
Offset += sizeof(char);
}
else { /* DualNetMode */
-
+
*(pBuf + Offset) = pAC->GIni.GP[NetIndex].PMSCap;
Offset += sizeof(char);
}
@@ -5681,7 +5681,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
Offset += sizeof(char);
}
else { /* DualNetMode */
-
+
*(pBuf + Offset) = pAC->GIni.GP[NetIndex].PMSMode;
Offset += sizeof(char);
}
@@ -5698,14 +5698,14 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
/* Get value for physical port */
PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
pAC, LogPortIndex);
-
+
*(pBuf + Offset) = pAC->GIni.GP[
PhysPortIndex].PMSStatus;
}
Offset += sizeof(char);
}
else {
-
+
*(pBuf + Offset) = pAC->GIni.GP[NetIndex].PMSStatus;
Offset += sizeof(char);
}
@@ -5714,7 +5714,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
case OID_SKGE_SPEED_CAP:
if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
if (LogPortIndex == 0) {
-
+
/* Get value for virtual port */
VirtualConf(pAC, IoC, Id, pBuf +
Offset);
@@ -5723,14 +5723,14 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
/* Get value for physical ports */
PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
pAC, LogPortIndex);
-
+
*(pBuf + Offset) = pAC->GIni.GP[
PhysPortIndex].PLinkSpeedCap;
}
Offset += sizeof(char);
}
else { /* DualNetMode */
-
+
*(pBuf + Offset) = pAC->GIni.GP[NetIndex].PLinkSpeedCap;
Offset += sizeof(char);
}
@@ -5739,7 +5739,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
case OID_SKGE_SPEED_MODE:
if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
if (LogPortIndex == 0) {
-
+
/* Get value for virtual port */
VirtualConf(pAC, IoC, Id, pBuf + Offset);
}
@@ -5747,7 +5747,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
/* Get value for physical port */
PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
pAC, LogPortIndex);
-
+
*(pBuf + Offset) = pAC->GIni.GP[
PhysPortIndex].PLinkSpeed;
}
@@ -5763,7 +5763,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
case OID_SKGE_SPEED_STATUS:
if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */
if (LogPortIndex == 0) {
-
+
/* Get value for virtual port */
VirtualConf(pAC, IoC, Id, pBuf + Offset);
}
@@ -5771,7 +5771,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
/* Get value for physical port */
PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(
pAC, LogPortIndex);
-
+
*(pBuf + Offset) = pAC->GIni.GP[
PhysPortIndex].PLinkSpeedUsed;
}
@@ -5783,7 +5783,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
Offset += sizeof(char);
}
break;
-
+
case OID_SKGE_MTU:
Val32 = SK_DRIVER_GET_MTU(pAC, IoC, NetIndex);
SK_PNMI_STORE_U32(pBuf + Offset, Val32);
@@ -6184,8 +6184,8 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
break;
default:
- SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_ERR,
- ("MacPrivateConf: Unknown OID should be handled before set"));
+ SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_ERR,
+ ("MacPrivateConf: Unknown OID should be handled before set"));
*pLen = 0;
return (SK_PNMI_ERR_GENERAL);
@@ -6232,7 +6232,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
unsigned int Offset;
unsigned int Entries;
-
+
/*
* Calculate instance if wished.
*/
@@ -6490,7 +6490,7 @@ char *pBuf) /* Buffer to which to mgmt data will be retrieved */
*pBuf = SK_FLOW_STAT_INDETERMINATED;
}
break;
-
+
case OID_SKGE_PHY_OPERATION_CAP:
/* Check if it is the first active port */
if (*pBuf == 0) {
@@ -6544,7 +6544,7 @@ char *pBuf) /* Buffer to which to mgmt data will be retrieved */
*pBuf = SK_MS_STAT_INDETERMINATED;
}
break;
-
+
case OID_SKGE_SPEED_MODE:
/* Check if it is the first active port */
if (*pBuf == 0) {
@@ -6563,7 +6563,7 @@ char *pBuf) /* Buffer to which to mgmt data will be retrieved */
*pBuf = SK_LSPEED_INDETERMINATED;
}
break;
-
+
case OID_SKGE_SPEED_STATUS:
/* Check if it is the first active port */
if (*pBuf == 0) {
@@ -6617,7 +6617,7 @@ char *pBuf) /* Buffer to which to mgmt data will be retrieved */
case OID_SKGE_FLOWCTRL_STATUS:
*pBuf = SK_FLOW_STAT_INDETERMINATED;
break;
-
+
case OID_SKGE_PHY_OPERATION_CAP:
*pBuf = SK_MS_CAP_INDETERMINATED;
break;
@@ -6714,7 +6714,7 @@ unsigned int PhysPortIndex) /* Physical port index */
if (Result < SK_LMODE_STAT_HALF) {
Result = SK_LMODE_STAT_UNKNOWN;
- }
+ }
else if (pAC->GIni.GP[PhysPortIndex].PLinkMode >= SK_LMODE_AUTOHALF) {
/*
@@ -6918,7 +6918,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
* Description:
* The XMAC holds its statistic internally. To obtain the current
* values we send a command so that the statistic data will
- * be written to apredefined memory area on the adapter.
+ * be written to apredefined memory area on the adapter.
*
* Returns:
* SK_PNMI_ERR_OK Task successfully performed.
@@ -6945,15 +6945,15 @@ unsigned int LastMac) /* Index of the last Mac to be updated */
for (MacIndex = FirstMac; MacIndex <= LastMac; MacIndex ++) {
/*
- * 2002-09-13 pweber: Freeze the current sw counters.
- * (That should be done as close as
- * possible to the update of the
+ * 2002-09-13 pweber: Freeze the current sw counters.
+ * (That should be done as close as
+ * possible to the update of the
* hw counters)
*/
if (pAC->GIni.GIMacType == SK_MAC_XMAC) {
pAC->Pnmi.BufPort[MacIndex] = pAC->Pnmi.Port[MacIndex];
}
-
+
/* 2002-09-13 pweber: Update the hw counter */
if (pAC->GIni.GIFunc.pFnMacUpdateStats(pAC, IoC, MacIndex) != 0) {
@@ -7053,12 +7053,12 @@ unsigned int StatIndex) /* Index to statistic value */
SK_U32 HighVal = 0;
SK_U16 Word;
int MacType;
-
+
SK_PNMI_PORT *pPnmiPrt;
SK_GEMACFUNC *pFnMac;
-
+
MacType = pAC->GIni.GIMacType;
-
+
/* 2002-09-17 pweber: For XMAC, use the frozen sw counters (BufPort) */
if (pAC->GIni.GIMacType == SK_MAC_XMAC) {
pPnmiPrt = &pAC->Pnmi.BufPort[PhysPortIndex];
@@ -7066,7 +7066,7 @@ unsigned int StatIndex) /* Index to statistic value */
else {
pPnmiPrt = &pAC->Pnmi.Port[PhysPortIndex];
}
-
+
pFnMac = &pAC->GIni.GIFunc;
switch (StatIndex) {
@@ -7074,9 +7074,9 @@ unsigned int StatIndex) /* Index to statistic value */
case SK_PNMI_HRX:
/* Not supported by GMAC */
if (MacType == SK_MAC_GMAC) {
- return (Val);
+ return (Val);
}
-
+
(void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
StatAddr[StatIndex][MacType].Reg,
&LowVal);
@@ -7112,7 +7112,7 @@ unsigned int StatIndex) /* Index to statistic value */
if (MacType == SK_MAC_GMAC) {
Val = GetPhysStatVal(pAC, IoC, PhysPortIndex, SK_PNMI_HTX_PMACC);
- return (Val);
+ return (Val);
}
(void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
@@ -7135,13 +7135,12 @@ unsigned int StatIndex) /* Index to statistic value */
break;
-
case SK_PNMI_HTX_DEFFERAL:
/* Not supported by GMAC */
if (MacType == SK_MAC_GMAC) {
- return (Val);
+ return (Val);
}
-
+
/*
* XMAC counts frames with deferred transmission
* even in full-duplex mode.
@@ -7174,7 +7173,7 @@ unsigned int StatIndex) /* Index to statistic value */
&HighVal);
(void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
StatAddr[StatIndex + 1][MacType].Reg,
- &LowVal);
+ &LowVal);
break;
case SK_PNMI_HTX_OCTETLOW:
@@ -7185,21 +7184,21 @@ unsigned int StatIndex) /* Index to statistic value */
case SK_PNMI_HRX_LONGFRAMES:
/* For XMAC the SW counter is managed by PNMI */
if (MacType == SK_MAC_XMAC) {
- return (pPnmiPrt->StatRxLongFrameCts);
+ return (pPnmiPrt->StatRxLongFrameCts);
}
-
+
(void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
StatAddr[StatIndex][MacType].Reg,
&LowVal);
HighVal = pPnmiPrt->CounterHigh[StatIndex];
break;
-
+
case SK_PNMI_HRX_TOO_LONG:
(void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
StatAddr[StatIndex][MacType].Reg,
&LowVal);
HighVal = pPnmiPrt->CounterHigh[StatIndex];
-
+
Val = (((SK_U64)HighVal << 32) | (SK_U64)LowVal);
switch (MacType) {
@@ -7225,14 +7224,14 @@ unsigned int StatIndex) /* Index to statistic value */
LowVal = (SK_U32)Val;
HighVal = (SK_U32)(Val >> 32);
break;
-
+
case SK_PNMI_HRX_SHORTS:
/* Not supported by GMAC */
if (MacType == SK_MAC_GMAC) {
/* GM_RXE_FRAG?? */
- return (Val);
+ return (Val);
}
-
+
/*
* XMAC counts short frame errors even if link down (#10620)
*
@@ -7266,7 +7265,7 @@ unsigned int StatIndex) /* Index to statistic value */
/* Not supported by GMAC */
if (MacType == SK_MAC_GMAC) {
/* GM_RXE_FRAG?? */
- return (Val);
+ return (Val);
}
(void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
@@ -7278,9 +7277,9 @@ unsigned int StatIndex) /* Index to statistic value */
case SK_PNMI_HRX_PMACC_ERR:
/* For GMAC the SW counter is managed by PNMI */
if (MacType == SK_MAC_GMAC) {
- return (pPnmiPrt->StatRxPMaccErr);
+ return (pPnmiPrt->StatRxPMaccErr);
}
-
+
(void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex,
StatAddr[StatIndex][MacType].Reg,
&LowVal);
@@ -7300,8 +7299,8 @@ unsigned int StatIndex) /* Index to statistic value */
break;
case SK_PNMI_HRX_FCS:
- /*
- * Broadcom filters fcs errors and counts it in
+ /*
+ * Broadcom filters fcs errors and counts it in
* Receive Error Counter register
*/
if (pAC->GIni.GP[PhysPortIndex].PhyType == SK_PHY_BCOM) {
@@ -7310,7 +7309,7 @@ unsigned int StatIndex) /* Index to statistic value */
PHY_READ(IoC, &pAC->GIni.GP[PhysPortIndex],
PhysPortIndex, PHY_BCOM_RE_CTR,
&Word);
-
+
LowVal = Word;
}
HighVal = pPnmiPrt->CounterHigh[StatIndex];
@@ -7507,7 +7506,7 @@ unsigned int Size) /* Space needed for trap entry */
}
}
- /*
+ /*
* Insert new entry as first entry. Newest entries are
* stored at the beginning of the queue.
*/
@@ -7678,7 +7677,7 @@ unsigned int SensorIndex) /* Index of sensor which caused the trap */
Val32 = (SK_U32)SensorIndex;
SK_PNMI_STORE_U32(pBuf + Offset + 5, Val32);
Offset += 9;
-
+
Val32 = (SK_U32)OID_SKGE_SENSOR_DESCR;
SK_PNMI_STORE_U32(pBuf + Offset, Val32);
*(pBuf + Offset + 4) = (char)DescrLen;
@@ -7807,7 +7806,7 @@ SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */
unsigned int TableIndex, /* Index to the Id table */
SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
{
-
+
SK_U32 RetCode = SK_PNMI_ERR_GENERAL;
/*
@@ -7850,7 +7849,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
case OID_PNP_ADD_WAKE_UP_PATTERN:
case OID_PNP_REMOVE_WAKE_UP_PATTERN:
break;
-
+
default:
SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR040,
SK_PNMI_ERR040MSG);
@@ -7869,8 +7868,8 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
case OID_PNP_QUERY_POWER:
/* The Windows DDK describes: An OID_PNP_QUERY_POWER requests
- the miniport to indicate whether it can transition its NIC
- to the low-power state.
+ the miniport to indicate whether it can transition its NIC
+ to the low-power state.
A miniport driver must always return NDIS_STATUS_SUCCESS
to a query of OID_PNP_QUERY_POWER. */
RetCode = SK_PNMI_ERR_OK;
@@ -7883,7 +7882,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
case OID_PNP_SET_POWER:
case OID_PNP_ADD_WAKE_UP_PATTERN:
case OID_PNP_REMOVE_WAKE_UP_PATTERN:
- *pLen = 0;
+ *pLen = 0;
RetCode = SK_PNMI_ERR_OK;
break;
@@ -7896,9 +7895,9 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
break;
}
- return (RetCode);
+ return (RetCode);
}
-
+
/*
* From here SET or PRESET action. Check if the passed
* buffer length is plausible.
@@ -7923,7 +7922,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
if (*pLen < sizeof(SK_PM_PACKET_PATTERN)) {
*pLen = 0;
- return (SK_PNMI_ERR_BAD_VALUE);
+ return (SK_PNMI_ERR_BAD_VALUE);
}
break;
@@ -7935,33 +7934,33 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */
/*
* Perform preset or set
*/
-
+
/* POWER module does not support PRESET action */
if (Action == SK_PNMI_PRESET) {
- return (SK_PNMI_ERR_OK);
+ return (SK_PNMI_ERR_OK);
}
switch (Id) {
case OID_PNP_SET_POWER:
- RetCode = SkPowerSetPower(pAC, IoC, pBuf, pLen);
+ RetCode = SkPowerSetPower(pAC, IoC, pBuf, pLen);
break;
case OID_PNP_ADD_WAKE_UP_PATTERN:
- RetCode = SkPowerAddWakeUpPattern(pAC, IoC, pBuf, pLen);
+ RetCode = SkPowerAddWakeUpPattern(pAC, IoC, pBuf, pLen);
break;
-
+
case OID_PNP_REMOVE_WAKE_UP_PATTERN:
- RetCode = SkPowerRemoveWakeUpPattern(pAC, IoC, pBuf, pLen);
+ RetCode = SkPowerRemoveWakeUpPattern(pAC, IoC, pBuf, pLen);
break;
-
+
case OID_PNP_ENABLE_WAKE_UP:
RetCode = SkPowerSetEnableWakeUp(pAC, IoC, pBuf, pLen);
break;
-
+
default:
RetCode = SK_PNMI_ERR_GENERAL;
}
-
+
return (RetCode);
}
#endif /* SK_POWER_MGMT */
@@ -8010,25 +8009,25 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
int i;
SK_EVPARA Para;
SK_U32 CableLength;
-
+
/*
* Calculate the port indexes from the instance.
*/
PhysPortMax = pAC->GIni.GIMacsFound;
LogPortMax = SK_PNMI_PORT_PHYS2LOG(PhysPortMax);
-
+
/* Dual net mode? */
if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
LogPortMax--;
}
-
+
if ((Instance != (SK_U32) (-1))) {
/* Check instance range. */
if ((Instance < 2) || (Instance > LogPortMax)) {
*pLen = 0;
return (SK_PNMI_ERR_UNKNOWN_INST);
}
-
+
if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) {
PhysPortIndex = NetIndex;
}
@@ -8045,7 +8044,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
PhysPortIndex = 0;
Limit = PhysPortMax;
}
-
+
pPrt = &pAC->GIni.GP[PhysPortIndex];
if (pPrt->PHWLinkUp) {
Link = SK_TRUE;
@@ -8053,7 +8052,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
else {
Link = SK_FALSE;
}
-
+
/*
* Check MAC type.
*/
@@ -8061,10 +8060,10 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
*pLen = 0;
return (SK_PNMI_ERR_GENERAL);
}
-
+
/* Initialize backup data pointer. */
pVctBackupData = &pAC->Pnmi.VctBackup[PhysPortIndex];
-
+
/*
* Check action type.
*/
@@ -8073,34 +8072,34 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
* Check length.
*/
switch (Id) {
-
+
case OID_SKGE_VCT_GET:
if (*pLen < (Limit - PhysPortIndex) * sizeof(SK_PNMI_VCT)) {
*pLen = (Limit - PhysPortIndex) * sizeof(SK_PNMI_VCT);
return (SK_PNMI_ERR_TOO_SHORT);
}
break;
-
+
case OID_SKGE_VCT_STATUS:
if (*pLen < (Limit - PhysPortIndex) * sizeof(SK_U8)) {
*pLen = (Limit - PhysPortIndex) * sizeof(SK_U8);
return (SK_PNMI_ERR_TOO_SHORT);
}
break;
-
+
default:
*pLen = 0;
return (SK_PNMI_ERR_GENERAL);
- }
-
+ }
+
/*
* Get value.
*/
Offset = 0;
for (; PhysPortIndex < Limit; PhysPortIndex++) {
switch (Id) {
-
- case OID_SKGE_VCT_GET:
+
+ case OID_SKGE_VCT_GET:
if ((Link == SK_FALSE) &&
(pAC->Pnmi.VctStatus[PhysPortIndex] & SK_PNMI_VCT_PENDING)) {
RetCode = SkGmCableDiagStatus(pAC, IoC, PhysPortIndex, SK_FALSE);
@@ -8108,7 +8107,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
pAC->Pnmi.VctStatus[PhysPortIndex] &= ~SK_PNMI_VCT_PENDING;
pAC->Pnmi.VctStatus[PhysPortIndex] |=
(SK_PNMI_VCT_NEW_VCT_DATA | SK_PNMI_VCT_TEST_DONE);
-
+
/* Copy results for later use to PNMI struct. */
for (i = 0; i < 4; i++) {
if (pPrt->PMdiPairSts[i] == SK_PNMI_VCT_NORMAL_CABLE) {
@@ -8135,7 +8134,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
; /* VCT test is running. */
}
}
-
+
/* Get all results. */
CheckVctStatus(pAC, IoC, pBuf, Offset, PhysPortIndex);
Offset += sizeof(SK_U8);
@@ -8149,16 +8148,16 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
*(pBuf + Offset) = pVctBackupData->PMdiPairSts[i];
Offset += sizeof(SK_U8);
}
-
+
RetCode = SK_PNMI_ERR_OK;
break;
-
+
case OID_SKGE_VCT_STATUS:
CheckVctStatus(pAC, IoC, pBuf, Offset, PhysPortIndex);
Offset += sizeof(SK_U8);
RetCode = SK_PNMI_ERR_OK;
break;
-
+
default:
*pLen = 0;
return (SK_PNMI_ERR_GENERAL);
@@ -8166,14 +8165,14 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
} /* for */
*pLen = Offset;
return (RetCode);
-
+
} /* if SK_PNMI_GET */
-
+
/*
* From here SET or PRESET action. Check if the passed
* buffer length is plausible.
*/
-
+
/*
* Check length.
*/
@@ -8184,34 +8183,34 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
return (SK_PNMI_ERR_TOO_SHORT);
}
break;
-
+
default:
*pLen = 0;
return (SK_PNMI_ERR_GENERAL);
}
-
+
/*
* Perform preset or set.
*/
-
+
/* VCT does not support PRESET action. */
if (Action == SK_PNMI_PRESET) {
return (SK_PNMI_ERR_OK);
}
-
+
Offset = 0;
for (; PhysPortIndex < Limit; PhysPortIndex++) {
switch (Id) {
case OID_SKGE_VCT_SET: /* Start VCT test. */
if (Link == SK_FALSE) {
SkGeStopPort(pAC, IoC, PhysPortIndex, SK_STOP_ALL, SK_SOFT_RST);
-
+
RetCode = SkGmCableDiagStatus(pAC, IoC, PhysPortIndex, SK_TRUE);
if (RetCode == 0) { /* RetCode: 0 => Start! */
pAC->Pnmi.VctStatus[PhysPortIndex] |= SK_PNMI_VCT_PENDING;
pAC->Pnmi.VctStatus[PhysPortIndex] &= ~SK_PNMI_VCT_NEW_VCT_DATA;
pAC->Pnmi.VctStatus[PhysPortIndex] &= ~SK_PNMI_VCT_LINK;
-
+
/*
* Start VCT timer counter.
*/
@@ -8235,7 +8234,7 @@ SK_U32 NetIndex) /* NetIndex (0..n), in single net mode always zero */
}
Offset += sizeof(SK_U32);
break;
-
+
default:
*pLen = 0;
return (SK_PNMI_ERR_GENERAL);
@@ -8258,14 +8257,14 @@ SK_U32 PhysPortIndex)
SK_PNMI_VCT *pVctData;
SK_U32 RetCode;
SK_U8 LinkSpeedUsed;
-
+
pPrt = &pAC->GIni.GP[PhysPortIndex];
-
+
pVctData = (SK_PNMI_VCT *) (pBuf + Offset);
pVctData->VctStatus = SK_PNMI_VCT_NONE;
-
+
if (!pPrt->PHWLinkUp) {
-
+
/* Was a VCT test ever made before? */
if (pAC->Pnmi.VctStatus[PhysPortIndex] & SK_PNMI_VCT_TEST_DONE) {
if ((pAC->Pnmi.VctStatus[PhysPortIndex] & SK_PNMI_VCT_LINK)) {
@@ -8275,7 +8274,7 @@ SK_U32 PhysPortIndex)
pVctData->VctStatus |= SK_PNMI_VCT_NEW_VCT_DATA;
}
}
-
+
/* Check VCT test status. */
RetCode = SkGmCableDiagStatus(pAC,IoC, PhysPortIndex, SK_FALSE);
if (RetCode == 2) { /* VCT test is running. */
@@ -8286,22 +8285,22 @@ SK_U32 PhysPortIndex)
pVctData->VctStatus |= SK_PNMI_VCT_NEW_VCT_DATA;
}
}
-
+
if (pPrt->PCableLen != 0xff) { /* Old DSP value. */
pVctData->VctStatus |= SK_PNMI_VCT_OLD_DSP_DATA;
}
}
else {
-
+
/* Was a VCT test ever made before? */
if (pAC->Pnmi.VctStatus[PhysPortIndex] & SK_PNMI_VCT_TEST_DONE) {
pVctData->VctStatus &= ~SK_PNMI_VCT_NEW_VCT_DATA;
pVctData->VctStatus |= SK_PNMI_VCT_OLD_VCT_DATA;
}
-
+
/* DSP only valid in 100/1000 modes. */
LinkSpeedUsed = pAC->GIni.GP[PhysPortIndex].PLinkSpeedUsed;
- if (LinkSpeedUsed != SK_LSPEED_STAT_10MBPS) {
+ if (LinkSpeedUsed != SK_LSPEED_STAT_10MBPS) {
pVctData->VctStatus |= SK_PNMI_VCT_NEW_DSP_DATA;
}
}
diff --git a/drivers/sk98lin/skgesirq.c b/drivers/sk98lin/skgesirq.c
index c7c04b70ec..e5a4f7ec10 100644
--- a/drivers/sk98lin/skgesirq.c
+++ b/drivers/sk98lin/skgesirq.c
@@ -30,39 +30,39 @@
* Fixed setting of PLinkSpeedUsed in SkHWLinkUp() when
* auto-negotiation is disabled.
* Editorial changes.
- *
+ *
* Revision 1.82 2003/01/29 13:34:33 rschmidt
* Added some typecasts to avoid compiler warnings.
- *
+ *
* Revision 1.81 2002/12/05 10:49:51 rschmidt
* Fixed missing Link Down Event for fiber (Bug Id #10768)
* Added reading of cable length when link is up
* Removed testing of unused error bits in PHY ISR
* Editorial changes.
- *
+ *
* Revision 1.80 2002/11/12 17:15:21 rschmidt
* Replaced SkPnmiGetVar() by ...MacStatistic() in SkMacParity().
* Editorial changes.
- *
+ *
* Revision 1.79 2002/10/14 15:14:51 rschmidt
* Changed clearing of IS_M1_PAR_ERR (MAC 1 Parity Error) in
* SkMacParity() depending on GIChipRev (HW-Bug #8).
* Added error messages for GPHY Auto-Negotiation Error and
* FIFO Overflow/Underrun in SkPhyIsrGmac().
* Editorial changes.
- *
+ *
* Revision 1.78 2002/10/10 15:54:29 mkarl
* changes for PLinkSpeedUsed
- *
+ *
* Revision 1.77 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.76 2002/08/16 15:21:54 rschmidt
* Replaced all if(GIChipId == CHIP_ID_GENESIS) with new entry GIGenesis.
* Replaced wrong 1st para pAC with IoC in SK_IN/OUT macros.
* Editorial changes.
- *
+ *
* Revision 1.75 2002/08/12 13:50:47 rschmidt
* Changed clearing of IS_M1_PAR_ERR (MAC 1 Parity Error) in
* SkMacParity() by GMF_CLI_TX_FC instead of GMF_CLI_TX_PE (HW-Bug #8).
@@ -70,26 +70,26 @@
* Corrected handling of Link Up and Auto-Negotiation Over for GPHY.
* in SkGePortCheckUpGmac().
* Editorial changes.
- *
+ *
* Revision 1.74 2002/08/08 16:17:04 rschmidt
* Added PhyType check for SK_HWEV_SET_ROLE event (copper only)
* Changed Link Up check reading PHY Specific Status (YUKON)
* Editorial changes
- *
+ *
* Revision 1.73 2002/07/15 18:36:53 rwahl
* Editorial changes.
- *
+ *
* Revision 1.72 2002/07/15 15:46:26 rschmidt
* Added new event: SK_HWEV_SET_SPEED
* Editorial changes
- *
+ *
* Revision 1.71 2002/06/10 09:34:19 rschmidt
* Editorial changes
- *
+ *
* Revision 1.70 2002/06/05 08:29:18 rschmidt
* SkXmRxTxEnable() replaced by SkMacRxTxEnable().
* Editorial changes.
- *
+ *
* Revision 1.69 2002/04/25 13:03:49 rschmidt
* Changes for handling YUKON.
* Use of #ifdef OTHER_PHY to eliminate code for unused Phy types.
@@ -105,119 +105,119 @@
* Removed status parameter from MAC IRQ handler SkMacIrq().
* Added SkGePortCheckUpGmac(), SkPhyIsrGmac() for GMAC.
* Editorial changes
- *
+ *
* Revision 1.68 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.67 2001/11/20 09:19:58 rwahl
* Reworked bugfix #10639 (no dependency to RLMT mode).
- *
+ *
* Revision 1.66 2001/10/26 07:52:53 afischer
* Port switching bug in `check local link` mode
- *
+ *
* Revision 1.65 2001/02/23 13:41:51 gklug
* fix: PHYS2INST should be used correctly for Dual Net operation
* chg: do no longer work with older PNMI
- *
+ *
* Revision 1.64 2001/02/15 11:27:04 rassmann
* Working with RLMT v1 if SK_MAX_NETS undefined.
- *
+ *
* Revision 1.63 2001/02/06 10:44:23 mkunz
* - NetIndex added to interface functions of pnmi V4 with dual net support
- *
+ *
* Revision 1.62 2001/01/31 15:31:41 gklug
* fix: problem with autosensing an SR8800 switch
- *
+ *
* Revision 1.61 2000/11/09 11:30:09 rassmann
* WA: Waiting after releasing reset until BCom chip is accessible.
*
* Revision 1.60 2000/10/18 12:37:48 cgoos
* Reinserted the comment for version 1.56.
- *
+ *
* Revision 1.59 2000/10/18 12:22:20 cgoos
* Added workaround for half duplex hangup.
- *
+ *
* Revision 1.58 2000/09/28 13:06:04 gklug
* fix: BCom may NOT be touched if XMAC is in RESET state
- *
+ *
* Revision 1.57 2000/09/08 12:38:39 cgoos
* Added forgotten variable declaration.
- *
+ *
* Revision 1.56 2000/09/08 08:12:13 cgoos
* Changed handling of parity errors in SkGeHwErr (correct reset of error).
*
* Revision 1.55 2000/06/19 08:36:25 cgoos
* Changed comment.
- *
+ *
* Revision 1.54 2000/05/22 08:45:57 malthoff
* Fix: #10523 is valid for all BCom PHYs.
- *
+ *
* Revision 1.53 2000/05/19 10:20:30 cgoos
* Removed Solaris debug output code.
- *
+ *
* Revision 1.52 2000/05/19 10:19:37 cgoos
* Added PHY state check in HWLinkDown.
* Move PHY interrupt code to IS_EXT_REG case in SkGeSirqIsr.
- *
+ *
* Revision 1.51 2000/05/18 05:56:20 cgoos
* Fixed typo.
- *
+ *
* Revision 1.50 2000/05/17 12:49:49 malthoff
* Fixes BCom link bugs (#10523).
- *
+ *
* Revision 1.49 1999/12/17 11:02:50 gklug
* fix: read PHY_STAT of Broadcom chip more often to assure good status
- *
+ *
* Revision 1.48 1999/12/06 10:01:17 cgoos
* Added SET function for Role.
- *
+ *
* Revision 1.47 1999/11/22 13:34:24 cgoos
* Changed license header to GPL.
- *
+ *
* Revision 1.46 1999/09/16 10:30:07 cgoos
* Removed debugging output statement from Linux.
- *
+ *
* Revision 1.45 1999/09/16 07:32:55 cgoos
* Fixed dual-port copperfield bug (PHY_READ from resetted port).
* Removed some unused variables.
- *
+ *
* Revision 1.44 1999/08/03 15:25:04 cgoos
* Removed workaround for disabled interrupts in half duplex mode.
- *
+ *
* Revision 1.43 1999/08/03 14:27:58 cgoos
* Removed SENSE mode code from SkGePortCheckUpBcom.
- *
+ *
* Revision 1.42 1999/07/26 09:16:54 cgoos
* Added some typecasts to avoid compiler warnings.
- *
+ *
* Revision 1.41 1999/05/19 07:28:59 cgoos
* Changes for 1000Base-T.
- *
+ *
* Revision 1.40 1999/04/08 13:59:39 gklug
* fix: problem with 3Com switches endless RESTARTs
- *
+ *
* Revision 1.39 1999/03/08 10:10:52 gklug
* fix: AutoSensing did switch to next mode even if LiPa indicated offline
- *
+ *
* Revision 1.38 1999/03/08 09:49:03 gklug
* fix: Bug using pAC instead of IoC, causing AIX problems
* fix: change compare for Linux compiler bug workaround
- *
+ *
* Revision 1.37 1999/01/28 14:51:33 gklug
* fix: monitor for autosensing and extra RESETS the RX on wire counters
- *
+ *
* Revision 1.36 1999/01/22 09:19:55 gklug
* fix: Init DupMode and InitPauseMd are now called in RxTxEnable
- *
+ *
* Revision 1.35 1998/12/11 15:22:59 gklug
* chg: autosensing: check for receive if manual mode was guessed
* chg: simplified workaround for XMAC errata
* chg: wait additional 100 ms before link goes up.
* chg: autoneg timeout to 600 ms
* chg: restart autoneg even if configured to autonegotiation
- *
+ *
* Revision 1.34 1998/12/10 10:33:14 gklug
* add: more debug messages
* fix: do a new InitPhy if link went down (AutoSensing problem)
@@ -225,114 +225,114 @@
* chg: reset Port if link goes down
* chg: wait additional 100 ms when link comes up to check shorts
* fix: dummy read extended autoneg status to prevent link going down immediately
- *
+ *
* Revision 1.33 1998/12/07 12:18:29 gklug
* add: refinement of autosense mode: take into account the autoneg cap of LiPa
- *
+ *
* Revision 1.32 1998/12/07 07:11:21 gklug
* fix: compiler warning
- *
+ *
* Revision 1.31 1998/12/02 09:29:05 gklug
* fix: WA XMAC Errata: FCSCt check was not correct.
* fix: WA XMAC Errata: Prec Counter were NOT updated in case of short checks.
* fix: Clear Stat : now clears the Prev counters of all known Ports
- *
+ *
* Revision 1.30 1998/12/01 10:54:15 gklug
* dd: workaround for XMAC errata changed. Check RX count and CRC err Count, too.
- *
+ *
* Revision 1.29 1998/12/01 10:01:53 gklug
* fix: if MAC IRQ occurs during port down, this will be handled correctly
- *
+ *
* Revision 1.28 1998/11/26 16:22:11 gklug
* fix: bug in autosense if manual modes are used
- *
+ *
* Revision 1.27 1998/11/26 15:50:06 gklug
* fix: PNMI needs to set PLinkModeConf
- *
+ *
* Revision 1.26 1998/11/26 14:51:58 gklug
* add: AutoSensing functionalty
- *
+ *
* Revision 1.25 1998/11/26 07:34:37 gklug
* fix: Init PrevShorts when restarting port due to Link connection
- *
+ *
* Revision 1.24 1998/11/25 10:57:32 gklug
* fix: remove unreferenced local vars
- *
+ *
* Revision 1.23 1998/11/25 08:26:40 gklug
* fix: don't do a RESET on a starting or stopping port
- *
+ *
* Revision 1.22 1998/11/24 13:29:44 gklug
* add: Workaround for MAC parity errata
- *
+ *
* Revision 1.21 1998/11/18 15:31:06 gklug
* fix: lint bugs
- *
+ *
* Revision 1.20 1998/11/18 12:58:54 gklug
* fix: use PNMI query instead of hardware access
- *
+ *
* Revision 1.19 1998/11/18 12:54:55 gklug
* chg: add new workaround for XMAC Errata
* add: short event counter monitoring on active link too
- *
+ *
* Revision 1.18 1998/11/13 14:27:41 malthoff
* Bug Fix: Packet Arbiter Timeout was not cleared correctly
* for timeout on TX1 and TX2.
- *
+ *
* Revision 1.17 1998/11/04 07:01:59 cgoos
* Moved HW link poll sequence.
* Added call to SkXmRxTxEnable.
- *
+ *
* Revision 1.16 1998/11/03 13:46:03 gklug
* add: functionality of SET_LMODE and SET_FLOW_MODE
* fix: send RLMT LinkDown event when Port stop is given with LinkUp
- *
+ *
* Revision 1.15 1998/11/03 12:56:47 gklug
* fix: Needs more events
- *
+ *
* Revision 1.14 1998/10/30 07:36:35 gklug
* rmv: unnecessary code
- *
+ *
* Revision 1.13 1998/10/29 15:21:57 gklug
* add: Poll link feature for activating HW link
* fix: Deactivate HWLink when Port STOP is given
- *
+ *
* Revision 1.12 1998/10/28 07:38:57 cgoos
* Checking link status at begin of SkHWLinkUp.
- *
+ *
* Revision 1.11 1998/10/22 09:46:50 gklug
* fix SysKonnectFileId typo
- *
+ *
* Revision 1.10 1998/10/14 13:57:47 gklug
* add: Port start/stop event
- *
+ *
* Revision 1.9 1998/10/14 05:48:29 cgoos
* Added definition for Para.
- *
+ *
* Revision 1.8 1998/10/14 05:40:09 gklug
* add: Hardware Linkup signal used
- *
+ *
* Revision 1.7 1998/10/09 06:50:20 malthoff
* Remove ID_sccs by SysKonnectFileId.
*
* Revision 1.6 1998/10/08 09:11:49 gklug
* add: clear IRQ commands
- *
+ *
* Revision 1.5 1998/10/02 14:27:35 cgoos
* Fixed some typos and wrong event names.
- *
+ *
* Revision 1.4 1998/10/02 06:24:17 gklug
* add: HW error function
* fix: OUT macros
- *
+ *
* Revision 1.3 1998/10/01 07:03:00 gklug
* add: ISR for the usual interrupt source register
- *
+ *
* Revision 1.2 1998/09/03 13:50:33 gklug
* add: function prototypes
- *
+ *
* Revision 1.1 1998/08/27 11:50:21 gklug
* initial revision
- *
+ *
*
*
******************************************************************************/
@@ -539,7 +539,7 @@ int Port) /* Port Index (MAC_1 + n) */
/* Disable Receiver and Transmitter */
SkMacRxTxDisable(pAC, IoC, Port);
-
+
/* Init default sense mode */
SkHWInitDefSense(pAC, IoC, Port);
@@ -680,13 +680,13 @@ int Port) /* Port Index of the port failed */
if (pAC->GIni.GIGenesis) {
/* Snap statistic counters */
(void)SkXmUpdateStats(pAC, IoC, Port);
-
+
(void)SkXmMacStatistic(pAC, IoC, Port, XM_TXF_MAX_SZ, &TxMax);
}
else {
(void)SkGmMacStatistic(pAC, IoC, Port, GM_TXF_1518B, &TxMax);
}
-
+
if (TxMax > 0) {
/* From now on check the parity */
pPrt->PCheckPar = SK_TRUE;
@@ -721,7 +721,7 @@ SK_U32 HwStatus) /* Interrupt status word */
/* Reset all bits in the PCI STATUS register */
SK_IN16(IoC, PCI_C(PCI_STATUS), &Word);
-
+
SK_OUT8(IoC, B2_TST_CTRL1, TST_CFG_WRITE_ON);
SK_OUT16(IoC, PCI_C(PCI_STATUS), Word | PCI_ERRBITS);
SK_OUT8(IoC, B2_TST_CTRL1, TST_CFG_WRITE_OFF);
@@ -736,19 +736,19 @@ SK_U32 HwStatus) /* Interrupt status word */
/* This situation is also indicated in the descriptor */
SK_OUT16(IoC, MR_ADDR(MAC_1, RX_MFF_CTRL1), MFF_CLR_INSTAT);
}
-
+
if ((HwStatus & IS_NO_STAT_M2) != 0) {
/* Ignore it */
/* This situation is also indicated in the descriptor */
SK_OUT16(IoC, MR_ADDR(MAC_2, RX_MFF_CTRL1), MFF_CLR_INSTAT);
}
-
+
if ((HwStatus & IS_NO_TIST_M1) != 0) {
/* Ignore it */
/* This situation is also indicated in the descriptor */
SK_OUT16(IoC, MR_ADDR(MAC_1, RX_MFF_CTRL1), MFF_CLR_INTIST);
}
-
+
if ((HwStatus & IS_NO_TIST_M2) != 0) {
/* Ignore it */
/* This situation is also indicated in the descriptor */
@@ -839,7 +839,7 @@ SK_U32 Istatus) /* Interrupt status word */
if ((Istatus & IS_HW_ERR) != 0) {
/* read the HW Error Interrupt source */
SK_IN32(IoC, B0_HWE_ISRC, &RegVal32);
-
+
SkGeHwErr(pAC, IoC, RegVal32);
}
@@ -876,7 +876,7 @@ SK_U32 Istatus) /* Interrupt status word */
}
if ((Istatus & IS_PA_TO_TX1) != 0) {
-
+
pPrt = &pAC->GIni.GP[0];
/* May be a normal situation in a server with a slow network */
@@ -901,9 +901,9 @@ SK_U32 Istatus) /* Interrupt status word */
SkPnmiGetVar(pAC, IoC, OID_SKGE_STAT_TX_OCTETS, (char *)&Octets,
&Len, (SK_U32) SK_PNMI_PORT_PHYS2INST(pAC, 0),
pAC->Rlmt.Port[0].Net->NetNumber);
-
+
pPrt->LastOctets = Octets;
-
+
Para.Para32[0] = 0;
SkTimerStart(pAC, IoC, &pPrt->HalfDupChkTimer, SK_HALFDUP_CHK_TIME,
SKGE_HWAC, SK_HWEV_HALFDUP_CHK, Para);
@@ -911,7 +911,7 @@ SK_U32 Istatus) /* Interrupt status word */
}
if ((Istatus & IS_PA_TO_TX2) != 0) {
-
+
pPrt = &pAC->GIni.GP[1];
/* May be a normal situation in a server with a slow network */
@@ -927,9 +927,9 @@ SK_U32 Istatus) /* Interrupt status word */
SkPnmiGetVar(pAC, IoC, OID_SKGE_STAT_TX_OCTETS, (char *)&Octets,
&Len, (SK_U32) SK_PNMI_PORT_PHYS2INST(pAC, 1),
pAC->Rlmt.Port[1].Net->NetNumber);
-
+
pPrt->LastOctets = Octets;
-
+
Para.Para32[0] = 1;
SkTimerStart(pAC, IoC, &pPrt->HalfDupChkTimer, SK_HALFDUP_CHK_TIME,
SKGE_HWAC, SK_HWEV_HALFDUP_CHK, Para);
@@ -1007,18 +1007,18 @@ SK_U32 Istatus) /* Interrupt status word */
if ((Istatus & IS_EXT_REG) != 0) {
/* Test IRQs from PHY */
for (i = 0; i < pAC->GIni.GIMacsFound; i++) {
-
+
pPrt = &pAC->GIni.GP[i];
-
+
if (pPrt->PState == SK_PRT_RESET) {
continue;
}
-
+
switch (pPrt->PhyType) {
-
+
case SK_PHY_XMAC:
break;
-
+
case SK_PHY_BCOM:
SkXmPhyRead(pAC, IoC, i, PHY_BCOM_INT_STAT, &PhyInt);
SkXmPhyRead(pAC, IoC, i, PHY_BCOM_INT_MASK, &PhyIMsk);
@@ -1030,7 +1030,7 @@ SK_U32 Istatus) /* Interrupt status word */
SkPhyIsrBcom(pAC, IoC, i, PhyInt);
}
break;
-
+
case SK_PHY_MARV_COPPER:
case SK_PHY_MARV_FIBER:
SkGmPhyRead(pAC, IoC, i, PHY_MARV_INT_STAT, &PhyInt);
@@ -1048,7 +1048,7 @@ SK_U32 Istatus) /* Interrupt status word */
case SK_PHY_LONE:
SkXmPhyRead(pAC, IoC, i, PHY_LONE_INT_STAT, &PhyInt);
SkXmPhyRead(pAC, IoC, i, PHY_LONE_INT_ENAB, &PhyIMsk);
-
+
if ((PhyInt & PhyIMsk) != 0) {
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
("Port %d Lone Int: %x Mask: %x\n",
@@ -1162,7 +1162,7 @@ int Port) /* Which port should be checked */
CheckShorts = 2;
(void)SkXmMacStatistic(pAC, IoC, Port, XM_RXF_FCS_ERR, &FcsErrCts);
-
+
if (pPrt->PLinkModeConf == SK_LMODE_AUTOSENSE &&
pPrt->PLipaAutoNeg == SK_LIPA_UNKNOWN &&
(pPrt->PLinkMode == SK_LMODE_HALF ||
@@ -1175,7 +1175,7 @@ int Port) /* Which port should be checked */
/* Nothing received, restart link */
pPrt->PPrevFcs = FcsErrCts;
pPrt->PPrevShorts = Shorts;
-
+
return(SK_HW_PS_RESTART);
}
else {
@@ -1307,7 +1307,7 @@ int Port) /* Which port should be checked */
XM_IN16(IoC, Port, XM_ISRC, &Isrc);
IsrcSum |= Isrc;
SkXmAutoNegLipaXmac(pAC, IoC, Port, IsrcSum);
-
+
if ((Isrc & XM_IS_INP_ASS) == 0) {
/* It has been in sync since last time */
/* Restart the PORT */
@@ -1333,7 +1333,7 @@ int Port) /* Which port should be checked */
* check whether the link is now o.k.
*/
pPrt->PLinkResCt++;
-
+
pPrt->PAutoNegTimeOut = 0;
if (pPrt->PLinkResCt < SK_MAX_LRESTART) {
@@ -1341,13 +1341,13 @@ int Port) /* Which port should be checked */
}
pPrt->PLinkResCt = 0;
-
+
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("Do NOT restart on Port %d %x %x\n", Port, Isrc, IsrcSum));
}
else {
pPrt->PIsave = (SK_U16)(IsrcSum & XM_IS_AND);
-
+
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("Save Sync/nosync Port %d %x %x\n", Port, Isrc, IsrcSum));
@@ -1402,7 +1402,7 @@ int Port) /* Which port should be checked */
IsrcSum |= Isrc;
SkXmAutoNegLipaXmac(pAC, IoC, Port, IsrcSum);
-
+
if ((GpReg & XM_GP_INP_ASS) != 0 || (IsrcSum & XM_IS_INP_ASS) != 0) {
if ((GpReg & XM_GP_INP_ASS) == 0) {
/* Save Auto-negotiation Done interrupt only if link is in sync */
@@ -1428,7 +1428,7 @@ int Port) /* Which port should be checked */
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("AutoNeg FAIL Port %d (LpAb %x, ResAb %x)\n",
Port, LpAb, ResAb));
-
+
/* Try next possible mode */
NextMode = SkHWSenseGetNext(pAC, IoC, Port);
SkHWLinkDown(pAC, IoC, Port);
@@ -1448,7 +1448,7 @@ int Port) /* Which port should be checked */
("AutoNeg done Port %d\n", Port));
return(SK_HW_PS_LINK);
}
-
+
/* AutoNeg not done, but HW link is up. Check for timeouts */
pPrt->PAutoNegTimeOut++;
if (pPrt->PAutoNegTimeOut >= SK_AND_MAX_TO) {
@@ -1499,7 +1499,7 @@ int Port) /* Which port should be checked */
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
("Link sync(GP), Port %d\n", Port));
SkHWLinkUp(pAC, IoC, Port);
-
+
/*
* Link sync (GP) and so assume a good connection. But if not received
* a bunch of frames received in a time slot (maybe broken tx cable)
@@ -1722,7 +1722,7 @@ int Port) /* Which port should be checked */
SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_STAT, &PhyStat);
SkMacAutoNegLipaPhy(pAC, IoC, Port, PhyStat);
-
+
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("AutoNeg: %d, PhyStat: 0x%04x\n", AutoNeg, PhyStat));
@@ -1734,17 +1734,17 @@ int Port) /* Which port should be checked */
("Master/Slave Fault port %d\n", Port));
pPrt->PAutoNegFail = SK_TRUE;
pPrt->PMSStatus = SK_MS_STAT_FAULT;
-
+
return(SK_HW_PS_RESTART);
}
if ((PhyStat & PHY_ST_LSYNC) == 0) {
return(SK_HW_PS_NONE);
}
-
+
pPrt->PMSStatus = ((ResAb & PHY_B_1000S_MSR) != 0) ?
SK_MS_STAT_MASTER : SK_MS_STAT_SLAVE;
-
+
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("AutoNeg: %d, PhyStat: 0x%04x\n", AutoNeg, PhyStat));
@@ -1777,7 +1777,7 @@ int Port) /* Which port should be checked */
(void *)NULL);
}
#endif /* DEBUG */
-
+
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("AutoNeg done Port %d\n", Port));
return(SK_HW_PS_LINK);
@@ -1806,7 +1806,7 @@ int Port) /* Which port should be checked */
(void *)NULL);
}
#endif /* DEBUG */
-
+
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
("Link sync(GP), Port %d\n", Port));
SkHWLinkUp(pAC, IoC, Port);
@@ -1871,7 +1871,7 @@ int Port) /* Which port should be checked */
("AutoNeg: %d, PhyStat: 0x%04x\n", AutoNeg, PhyStat));
SkMacAutoNegLipaPhy(pAC, IoC, Port, PhyStat);
-
+
SkGmPhyRead(pAC, IoC, Port, PHY_MARV_1000T_STAT, &ResAb);
if ((ResAb & PHY_B_1000S_MSF) != 0) {
@@ -1880,37 +1880,37 @@ int Port) /* Which port should be checked */
("Master/Slave Fault port %d\n", Port));
pPrt->PAutoNegFail = SK_TRUE;
pPrt->PMSStatus = SK_MS_STAT_FAULT;
-
+
return(SK_HW_PS_RESTART);
}
/* Read PHY Specific Status */
SkGmPhyRead(pAC, IoC, Port, PHY_MARV_PHY_STAT, &PhySpecStat);
-
+
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("AutoNeg: %d, PhySpecStat: 0x%04x\n", AutoNeg, PhySpecStat));
if ((PhySpecStat & PHY_M_PS_LINK_UP) == 0) {
return(SK_HW_PS_NONE);
}
-
+
pPrt->PMSStatus = ((ResAb & PHY_B_1000S_MSR) != 0) ?
SK_MS_STAT_MASTER : SK_MS_STAT_SLAVE;
-
+
pPrt->PCableLen = (SK_U8)((PhySpecStat & PHY_M_PS_CABLE_MSK) >> 7);
-
+
if (AutoNeg) {
/* Auto-Negotiation Over ? */
if ((PhyStat & PHY_ST_AN_OVER) != 0) {
-
+
SkHWLinkUp(pAC, IoC, Port);
-
+
Done = SkMacAutoNegDone(pAC, IoC, Port);
-
+
if (Done != SK_AND_OK) {
return(SK_HW_PS_RESTART);
}
-
+
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("AutoNeg done Port %d\n", Port));
return(SK_HW_PS_LINK);
@@ -1928,7 +1928,7 @@ int Port) /* Which port should be checked */
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
("Link sync, Port %d\n", Port));
SkHWLinkUp(pAC, IoC, Port);
-
+
return(SK_HW_PS_LINK);
}
@@ -1986,7 +1986,7 @@ int Port) /* Which port should be checked */
StatSum |= PhyStat;
SkMacAutoNegLipaPhy(pAC, IoC, Port, PhyStat);
-
+
if ((PhyStat & PHY_ST_LSYNC) == 0) {
/* Save Auto-negotiation Done bit */
pPrt->PIsave = (SK_U16)(StatSum & PHY_ST_AN_OVER);
@@ -2010,7 +2010,7 @@ int Port) /* Which port should be checked */
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("AutoNeg FAIL Port %d (LpAb %x, 1000TStat %x)\n",
Port, LpAb, ExtStat));
-
+
/* Try next possible mode */
NextMode = SkHWSenseGetNext(pAC, IoC, Port);
SkHWLinkDown(pAC, IoC, Port);
@@ -2033,7 +2033,7 @@ int Port) /* Which port should be checked */
return(SK_HW_PS_LINK);
}
}
-
+
/* AutoNeg not done, but HW link is up. Check for timeouts */
pPrt->PAutoNegTimeOut++;
if (pPrt->PAutoNegTimeOut >= SK_AND_MAX_TO) {
@@ -2066,7 +2066,7 @@ int Port) /* Which port should be checked */
* extra link down/ups
*/
SkXmPhyRead(pAC, IoC, Port, PHY_LONE_INT_STAT, &ExtStat);
-
+
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
("Link sync(GP), Port %d\n", Port));
SkHWLinkUp(pAC, IoC, Port);
@@ -2152,7 +2152,7 @@ SK_EVPARA Para) /* Event specific Parameter */
break;
}
-
+
/* Start again the check Timer */
if (pPrt->PHWLinkUp) {
Time = SK_WA_ACT_TIME;
@@ -2277,19 +2277,19 @@ SK_EVPARA Para) /* Event specific Parameter */
pPrt->HalfDupTimerActive = SK_FALSE;
if (pPrt->PLinkModeStatus == SK_LMODE_STAT_HALF ||
pPrt->PLinkModeStatus == SK_LMODE_STAT_AUTOHALF) {
-
+
Len = sizeof(SK_U64);
SkPnmiGetVar(pAC, IoC, OID_SKGE_STAT_TX_OCTETS, (char *)&Octets,
&Len, (SK_U32)SK_PNMI_PORT_PHYS2INST(pAC, Port),
pAC->Rlmt.Port[Port].Net->NetNumber);
-
+
if (pPrt->LastOctets == Octets) {
/* Tx hanging, a FIFO flush restarts it */
SkMacFlushTxFifo(pAC, IoC, Port);
}
}
break;
-
+
default:
SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_SIRQ_E001, SKERR_SIRQ_E001MSG);
break;
@@ -2323,7 +2323,7 @@ SK_U16 IStatus) /* Interrupt Status */
SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E022,
SKERR_SIRQ_E022MSG);
}
-
+
if ((IStatus & (PHY_B_IS_AN_PR | PHY_B_IS_LST_CHANGE)) != 0) {
Para.Para32[0] = (SK_U32)Port;
@@ -2367,16 +2367,16 @@ SK_U16 IStatus) /* Interrupt Status */
/* Signal to RLMT */
SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_LINK_DOWN, Para);
}
-
+
if ((IStatus & PHY_M_IS_AN_ERROR) != 0) {
/* Auto-Negotiation Error */
SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_SIRQ_E023, SKERR_SIRQ_E023MSG);
}
-
+
if ((IStatus & PHY_M_IS_LSP_CHANGE) != 0) {
/* TBD */
}
-
+
if ((IStatus & PHY_M_IS_FIFO_ERROR) != 0) {
/* FIFO Overflow/Underrun Error */
SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_SIRQ_E024, SKERR_SIRQ_E024MSG);
diff --git a/drivers/sk98lin/ski2c.c b/drivers/sk98lin/ski2c.c
index b262f29a8d..2ab635a229 100644
--- a/drivers/sk98lin/ski2c.c
+++ b/drivers/sk98lin/ski2c.c
@@ -29,178 +29,178 @@
* Revision 1.57 2003/01/28 09:17:38 rschmidt
* Fixed handling for sensors on YUKON Fiber.
* Editorial changes.
- *
+ *
* Revision 1.56 2002/12/19 14:20:41 rschmidt
* Added debugging code in SkI2cWait().
* Replaced all I2C-write operations with function SkI2cWrite().
* Fixed compiler warning because of uninitialized 'Time' in SkI2cEvent().
* Editorial changes.
- *
+ *
* Revision 1.55 2002/10/15 07:23:55 rschmidt
* Added setting of the GIYukon32Bit bool variable to distinguish
* 32-bit adapters.
* Editorial changes (TWSI).
- *
+ *
* Revision 1.54 2002/08/13 09:05:06 rschmidt
* Added new thresholds if VAUX is not available (GIVauxAvail).
* Merged defines for PHY PLL 3V3 voltage (A and B).
* Editorial changes.
- *
+ *
* Revision 1.53 2002/08/08 11:04:53 rwahl
* Added missing comment for revision 1.51
- *
+ *
* Revision 1.52 2002/08/08 10:09:02 jschmalz
* Sensor init state caused wrong error log entry
- *
+ *
* Revision 1.51 2002/08/06 09:43:03 jschmalz
* Extensions and changes for Yukon
- *
+ *
* Revision 1.50 2002/08/02 12:09:22 rschmidt
* Added support for YUKON sensors.
* Editorial changes.
- *
+ *
* Revision 1.49 2002/07/30 11:07:52 rschmidt
* Replaced MaxSens init by update for Copper in SkI2cInit1(),
* because it was already initialized in SkI2cInit0().
* Editorial changes.
- *
+ *
* Revision 1.48 2001/08/16 12:44:33 afischer
* LM80 sensor init values corrected
- *
+ *
* Revision 1.47 2001/04/05 11:38:09 rassmann
* Set SenState to idle in SkI2cWaitIrq().
* Changed error message in SkI2cWaitIrq().
- *
+ *
* Revision 1.46 2001/04/02 14:03:35 rassmann
* Changed pAC to IoC in SK_IN32().
- *
+ *
* Revision 1.45 2001/03/21 12:12:49 rassmann
* Resetting I2C_READY interrupt in SkI2cInit1().
- *
+ *
* Revision 1.44 2000/08/07 15:49:03 gklug
* Fix: SK_INFAST only in NetWare driver.
- *
+ *
* Revision 1.43 2000/08/03 14:28:17 rassmann
* Added function to wait for I2C being ready before resetting the board.
* Replaced one duplicate "out of range" message with correct one.
- *
+ *
* Revision 1.42 1999/11/22 13:35:12 cgoos
* Changed license header to GPL.
- *
+ *
* Revision 1.41 1999/09/14 14:11:30 malthoff
* The 1000BT Dual Link adapter has got only one Fan.
* The second Fan has been removed.
- *
+ *
* Revision 1.40 1999/05/27 13:37:27 malthoff
* Set divisor of 1 for fan count calculation.
- *
+ *
* Revision 1.39 1999/05/20 14:54:43 malthoff
* I2c.DummyReads is not used in Diagnostics.
- *
+ *
* Revision 1.38 1999/05/20 09:20:56 cgoos
* Changes for 1000Base-T (up to 9 sensors and fans).
- *
+ *
* Revision 1.37 1999/03/25 15:11:36 gklug
* fix: reset error flag if sensor reads correct value
- *
+ *
* Revision 1.36 1999/01/07 14:11:16 gklug
* fix: break added
- *
+ *
* Revision 1.35 1999/01/05 15:31:49 gklug
* fix: CLEAR STAT command is now added correctly
- *
+ *
* Revision 1.34 1998/12/01 13:45:16 gklug
* fix: introduced Init level, because we don't need reinits
- *
+ *
* Revision 1.33 1998/11/09 14:54:25 malthoff
* Modify I2C Transfer Timeout handling for Diagnostics.
- *
+ *
* Revision 1.32 1998/11/03 06:54:35 gklug
* fix: Need dummy reads at the beginning to init sensors
*
* Revision 1.31 1998/11/03 06:42:42 gklug
* fix: select correctVIO range only if between warning levels
- *
+ *
* Revision 1.30 1998/11/02 07:36:53 gklug
* fix: Error should not include WARNING message
- *
+ *
* Revision 1.29 1998/10/30 15:07:43 malthoff
* Disable 'I2C does not compelete' error log for diagnostics.
- *
+ *
* Revision 1.28 1998/10/22 09:48:11 gklug
* fix: SysKonnectFileId typo
- *
+ *
* Revision 1.27 1998/10/20 09:59:46 gklug
* add: parameter to SkOsGetTime
- *
+ *
* Revision 1.26 1998/10/09 06:10:59 malthoff
* Remove ID_sccs by SysKonnectFileId.
- *
+ *
* Revision 1.25 1998/09/08 12:40:26 gklug
* fix: syntax error in if clause
- *
+ *
* Revision 1.24 1998/09/08 12:19:42 gklug
* chg: INIT Level checking
- *
+ *
* Revision 1.23 1998/09/08 07:37:20 gklug
* fix: log error if PCI_IO voltage sensor could not be initialized
- *
+ *
* Revision 1.22 1998/09/04 08:30:03 malthoff
* Bugfixes during SK_DIAG testing:
* - correct NS2BCLK() macro
* - correct SkI2cSndDev()
* - correct SkI2cWait() loop waiting for an event
- *
+ *
* Revision 1.21 1998/08/27 14:46:01 gklug
* chg: if-then-else replaced by switch
*
* Revision 1.20 1998/08/27 14:40:07 gklug
* test: integral types
- *
+ *
* Revision 1.19 1998/08/25 07:51:54 gklug
* fix: typos for compiling
- *
+ *
* Revision 1.18 1998/08/25 06:12:24 gklug
* add: count errors and warnings
* fix: check not the sensor state but the ErrFlag!
- *
+ *
* Revision 1.17 1998/08/25 05:56:48 gklug
* add: CheckSensor function
- *
+ *
* Revision 1.16 1998/08/20 11:41:10 gklug
* chg: omit STRCPY macro by using char * as Sensor Description
- *
+ *
* Revision 1.15 1998/08/20 11:37:35 gklug
* chg: change Ioc to IoC
- *
+ *
* Revision 1.14 1998/08/20 11:32:52 gklug
* fix: Para compile error
- *
+ *
* Revision 1.13 1998/08/20 11:27:41 gklug
* fix: Compile bugs with new awrning constants
- *
+ *
* Revision 1.12 1998/08/20 08:53:05 gklug
* fix: compiler errors
* add: Threshold values
- *
+ *
* Revision 1.11 1998/08/19 12:39:22 malthoff
* Compiler Fix: Some names have changed.
- *
+ *
* Revision 1.10 1998/08/19 12:20:56 gklug
* fix: remove struct from C files (see CCC)
- *
+ *
* Revision 1.9 1998/08/19 06:28:46 malthoff
* SkOsGetTime returns SK_U64 now.
- *
+ *
* Revision 1.8 1998/08/17 13:53:33 gklug
* fix: Parameter of event function and its result
- *
+ *
* Revision 1.7 1998/08/17 07:02:15 malthoff
* Modify the functions for accessing the I2C SW Registers.
* Modify SkI2cWait().
* Put Lm80RcvReg into sklm80.c
* Remove Compiler Errors.
- *
+ *
* Revision 1.6 1998/08/14 07:13:20 malthoff
* remove pAc with pAC
* remove smc with pAC
@@ -473,7 +473,7 @@ SK_IOC IoC) /* I/O Context */
SkDgWaitTime(IoC, NS2BCLK(T_CLK_HIGH));
SK_I2C_GET_SW(IoC, &I2cSwCtrl);
-
+
Bit = (I2cSwCtrl & I2C_DATA) ? 1 : 0;
I2C_CLK_LOW(IoC);
@@ -615,19 +615,19 @@ int Event) /* complete event to wait for (I2C_READ or I2C_WRITE) */
SK_U32 I2cCtrl;
StartTime = SkOsGetTime(pAC);
-
+
do {
CurrentTime = SkOsGetTime(pAC);
if (CurrentTime - StartTime > SK_TICKS_PER_SEC / 8) {
-
+
SK_I2C_STOP(IoC);
#ifndef SK_DIAG
SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_I2C_E002, SKERR_I2C_E002MSG);
#endif /* !SK_DIAG */
return(1);
}
-
+
SK_I2C_GET_CTL(IoC, &I2cCtrl);
#ifdef xYUKON_DBG
@@ -637,7 +637,7 @@ int Event) /* complete event to wait for (I2C_READ or I2C_WRITE) */
return(1);
}
#endif /* YUKON_DBG */
-
+
} while ((I2cCtrl & I2C_FLAG) == (SK_U32)Event << 31);
return(0);
@@ -696,7 +696,7 @@ int I2cBurst) /* I2C Burst Flag */
{
SK_OUT32(IoC, B2_I2C_DATA, I2cData);
SK_I2C_CTL(IoC, I2C_WRITE, I2cDev, I2cReg, I2cBurst);
-
+
return(SkI2cWait(pAC, IoC, I2C_WRITE));
} /* SkI2cWrite*/
@@ -719,11 +719,11 @@ int I2cBurst) /* I2C Burst Flag */
SK_OUT32(IoC, B2_I2C_DATA, 0);
SK_I2C_CTL(IoC, I2C_READ, I2cDev, I2cReg, I2cBurst);
-
+
if (SkI2cWait(pAC, IoC, I2C_READ) != 0) {
w_print("%s\n", SKERR_I2C_E002MSG);
}
-
+
SK_IN32(IoC, B2_I2C_DATA, &Data);
return(Data);
} /* SkI2cRead */
@@ -747,10 +747,10 @@ SK_IOC IoC, /* I/O Context */
SK_SENSOR *pSen) /* Sensor to be read */
{
if (pSen->SenRead != NULL) {
- return((*pSen->SenRead)(pAC, IoC, pSen));
+ return((*pSen->SenRead)(pAC, IoC, pSen));
}
else
- return(0); /* no success */
+ return(0); /* no success */
} /* SkI2cReadSensor*/
/*
@@ -763,10 +763,10 @@ SK_AC *pAC) /* Adapter Context */
/* Begin with first sensor */
pAC->I2c.CurrSens = 0;
-
+
/* Begin with timeout control for state machine */
pAC->I2c.TimerMode = SK_TIMER_WATCH_STATEMACHINE;
-
+
/* Set sensor number to zero */
pAC->I2c.MaxSens = 0;
@@ -840,32 +840,32 @@ SK_IOC IoC) /* I/O Context */
if ((I2cSwCtrl & I2C_DATA) == 0) {
/* this is a 32-Bit board */
pAC->GIni.GIYukon32Bit = SK_TRUE;
- return(0);
+ return(0);
}
/* Check for 64 Bit Yukon without sensors */
if (SkI2cWrite(pAC, IoC, 0, LM80_ADDR, LM80_CFG, 0) != 0) {
- return(0);
+ return(0);
}
(void)SkI2cWrite(pAC, IoC, 0xff, LM80_ADDR, LM80_IMSK_1, 0);
-
+
(void)SkI2cWrite(pAC, IoC, 0xff, LM80_ADDR, LM80_IMSK_2, 0);
-
+
(void)SkI2cWrite(pAC, IoC, 0, LM80_ADDR, LM80_FAN_CTRL, 0);
-
+
(void)SkI2cWrite(pAC, IoC, 0, LM80_ADDR, LM80_TEMP_CTRL, 0);
-
+
(void)SkI2cWrite(pAC, IoC, LM80_CFG_START, LM80_ADDR, LM80_CFG, 0);
-
+
/*
* MaxSens has to be updated here, because PhyType is not
* set when performing Init Level 0
*/
pAC->I2c.MaxSens = 5;
-
+
pPrt = &pAC->GIni.GP[0];
-
+
if (pAC->GIni.GIGenesis) {
if (pPrt->PhyType == SK_PHY_BCOM) {
if (pAC->GIni.GIMacsFound == 1) {
@@ -879,7 +879,7 @@ SK_IOC IoC) /* I/O Context */
else {
pAC->I2c.MaxSens += 3;
}
-
+
for (i = 0; i < pAC->I2c.MaxSens; i++) {
switch (i) {
case 0:
@@ -1022,10 +1022,10 @@ SK_IOC IoC) /* I/O Context */
#ifndef SK_DIAG
pAC->I2c.DummyReads = pAC->I2c.MaxSens;
#endif /* !SK_DIAG */
-
+
/* Clear I2C IRQ */
SK_OUT32(IoC, B2_I2C_IRQ, I2C_CLR_IRQ);
-
+
/* Now we are I/O initialized */
pAC->I2c.InitLevel = SK_INIT_IO;
return(0);
@@ -1156,7 +1156,7 @@ SK_SENSOR *pSen)
/* Check the Value against the thresholds. First: Error Thresholds */
TooHigh = (pSen->SenValue > pSen->SenThreErrHigh);
TooLow = (pSen->SenValue < pSen->SenThreErrLow);
-
+
IsError = SK_FALSE;
if (TooHigh || TooLow) {
/* Error condition is satisfied */
@@ -1229,7 +1229,7 @@ SK_SENSOR *pSen)
/* 2nd: Warning thresholds */
TooHigh = (pSen->SenValue > pSen->SenThreWarnHigh);
TooLow = (pSen->SenValue < pSen->SenThreWarnLow);
-
+
if (!IsError && (TooHigh || TooLow)) {
/* Error condition is satisfied */
DoTrapSend = SK_TRUE;
@@ -1307,7 +1307,7 @@ SK_SENSOR *pSen)
*/
if (pSen->SenInit == SK_SEN_DYN_INIT_PCI_IO) {
- pSen->SenInit = SK_SEN_DYN_INIT_NONE;
+ pSen->SenInit = SK_SEN_DYN_INIT_NONE;
if (pSen->SenValue > SK_SEN_PCI_IO_RANGE_LIMITER) {
/* 5V PCI-IO Voltage */
@@ -1320,12 +1320,12 @@ SK_SENSOR *pSen)
pSen->SenThreErrHigh = SK_SEN_PCI_IO_3V3_HIGH_ERR;
}
}
-
+
#if 0
/* Dynamic thresholds also for VAUX of LM80 sensor */
if (pSen->SenInit == SK_SEN_DYN_INIT_VAUX) {
- pSen->SenInit = SK_SEN_DYN_INIT_NONE;
+ pSen->SenInit = SK_SEN_DYN_INIT_NONE;
/* 3.3V VAUX Voltage */
if (pSen->SenValue > SK_SEN_VAUX_RANGE_LIMITER) {
@@ -1410,17 +1410,17 @@ SK_EVPARA Para) /* Event specific Parameter */
ParaLocal.Para64 = (SK_U64)0;
pAC->I2c.TimerMode = SK_TIMER_NEW_GAUGING;
-
+
SkTimerStart(pAC, IoC, &pAC->I2c.SenTimer, Time,
SKGE_I2C, SK_I2CEV_TIM, ParaLocal);
}
- else {
+ else {
/* Start Timer */
ParaLocal.Para64 = (SK_U64)0;
pAC->I2c.TimerMode = SK_TIMER_WATCH_STATEMACHINE;
- SkTimerStart(pAC, IoC, &pAC->I2c.SenTimer, SK_I2C_TIM_WATCH,
+ SkTimerStart(pAC, IoC, &pAC->I2c.SenTimer, SK_I2C_TIM_WATCH,
SKGE_I2C, SK_I2CEV_TIM, ParaLocal);
}
break;
diff --git a/drivers/sk98lin/sklm80.c b/drivers/sk98lin/sklm80.c
index 1c96ee3a36..687572b1d2 100644
--- a/drivers/sk98lin/sklm80.c
+++ b/drivers/sk98lin/sklm80.c
@@ -29,50 +29,50 @@
* Revision 1.20 2002/08/13 09:16:27 rschmidt
* Changed return value for SkLm80ReadSensor() back to 'int'
* Editorial changes
- *
+ *
* Revision 1.19 2002/08/06 09:43:31 jschmalz
* Extensions and changes for Yukon
- *
+ *
* Revision 1.18 2002/08/02 12:26:57 rschmidt
* Editorial changes
- *
+ *
* Revision 1.17 1999/11/22 13:35:51 cgoos
* Changed license header to GPL.
- *
+ *
* Revision 1.16 1999/05/27 14:05:47 malthoff
* Fans: Set SenVal to 0 if the fan value is 0 or 0xff. Both values
* are outside the limits (0: div zero error, 0xff: value not in
* range, assume 0).
- *
+ *
* Revision 1.15 1999/05/27 13:38:51 malthoff
* Pervent from Division by zero errors.
- *
+ *
* Revision 1.14 1999/05/20 09:20:01 cgoos
* Changes for 1000Base-T (Fan sensors).
- *
+ *
* Revision 1.13 1998/10/22 09:48:14 gklug
* fix: SysKonnectFileId typo
- *
+ *
* Revision 1.12 1998/10/09 06:12:06 malthoff
* Remove ID_sccs by SysKonnectFileId.
- *
+ *
* Revision 1.11 1998/09/04 08:33:48 malthoff
* bug fix: SenState = SK_SEN_IDLE when
* leaving SK_SEN_VALEXT state
- *
+ *
* Revision 1.10 1998/08/20 12:02:10 gklug
* fix: compiler warnings type mismatch
*
* Revision 1.9 1998/08/20 11:37:38 gklug
* chg: change Ioc to IoC
- *
+ *
* Revision 1.8 1998/08/19 12:20:58 gklug
* fix: remove struct from C files (see CCC)
- *
+ *
* Revision 1.7 1998/08/17 07:04:57 malthoff
* Take SkLm80RcvReg() function from ski2c.c.
* Add IoC parameter to BREAK_OR_WAIT() macro.
- *
+ *
* Revision 1.6 1998/08/14 07:11:28 malthoff
* remove pAc with pAC.
*
@@ -158,9 +158,9 @@ int Reg) /* register to read */
}
Val = Val * SK_LM80_TEMP_LSB;
SkI2cStop(IoC);
-
+
TempExt = (int)SkLm80RcvReg(IoC, LM80_ADDR, LM80_TEMP_CTRL);
-
+
if (Val > 0) {
Val += ((TempExt >> 7) * SK_LM80_TEMPEXT_LSB);
}
@@ -175,7 +175,7 @@ int Reg) /* register to read */
case LM80_VT3_IN:
Val = (int)SkI2cRcvByte(IoC, 1) * SK_LM80_VT_LSB;
break;
-
+
default:
Val = (int)SkI2cRcvByte(IoC, 1);
break;
@@ -210,11 +210,11 @@ SK_SENSOR *pSen) /* Sensor to be read */
pSen->SenState = SK_SEN_VALUE ;
BREAK_OR_WAIT(pAC, IoC, I2C_READ);
-
+
case SK_SEN_VALUE:
/* Read value from data register */
SK_IN32(IoC, B2_I2C_DATA, ((SK_U32 *)&Value));
-
+
Value &= 0xff; /* only least significant byte is valid */
/* Do NOT check the Value against the thresholds */
@@ -258,7 +258,7 @@ SK_SENSOR *pSen) /* Sensor to be read */
pSen->SenState = SK_SEN_VALEXT ;
BREAK_OR_WAIT(pAC, IoC, I2C_READ);
-
+
case SK_SEN_VALEXT:
/* Read value from data register */
SK_IN32(IoC, B2_I2C_DATA, ((SK_U32 *)&Value));
@@ -279,7 +279,7 @@ SK_SENSOR *pSen) /* Sensor to be read */
pSen->SenState = SK_SEN_IDLE ;
return(1);
-
+
default:
SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_I2C_E007, SKERR_I2C_E007MSG);
return(1);
diff --git a/drivers/sk98lin/skproc.c b/drivers/sk98lin/skproc.c
index ecba704816..4e340730e5 100644
--- a/drivers/sk98lin/skproc.c
+++ b/drivers/sk98lin/skproc.c
@@ -7,7 +7,7 @@
* Purpose: Funktions to display statictic data
*
******************************************************************************/
-
+
/******************************************************************************
*
* (C)Copyright 1998-2003 SysKonnect GmbH.
@@ -30,43 +30,43 @@
* $Log: skproc.c,v $
* Revision 1.4 2003/02/25 14:16:37 mlindner
* Fix: Copyright statement
- *
+ *
* Revision 1.3 2002/10/02 12:59:51 mlindner
* Add: Support for Yukon
* Add: Speed check and setup
* Add: Merge source for kernel 2.2.x and 2.4.x
* Add: Read sensor names directly from VPD
* Fix: Volt values
- *
+ *
* Revision 1.2.2.7 2002/01/14 12:45:15 mlindner
* Fix: Editorial changes
- *
+ *
* Revision 1.2.2.6 2001/12/06 15:26:07 mlindner
* Fix: Return value of proc_read
- *
+ *
* Revision 1.2.2.5 2001/12/06 09:57:39 mlindner
* New ProcFs entries
- *
+ *
* Revision 1.2.2.4 2001/09/05 12:16:02 mlindner
* Add: New ProcFs entries
* Fix: Counter Errors (Jumbo == to long errors)
* Fix: Kernel error compilation
* Fix: too short counters
- *
+ *
* Revision 1.2.2.3 2001/06/25 07:26:26 mlindner
* Add: More error messages
- *
+ *
* Revision 1.2.2.2 2001/03/15 12:50:13 mlindner
* fix: ProcFS owner protection
- *
+ *
* Revision 1.2.2.1 2001/03/12 16:43:48 mlindner
* chg: 2.4 requirements for procfs
- *
+ *
* Revision 1.1 2001/01/22 14:15:31 mlindner
* added ProcFs functionality
* Dual Net functionality integrated
* Rlmt networks added
- *
+ *
*
******************************************************************************/
@@ -100,15 +100,15 @@ extern char * SkNumber(
/*****************************************************************************
*
- * proc_read - print "summaries" entry
+ * proc_read - print "summaries" entry
*
* Description:
- * This function fills the proc entry with statistic data about
+ * This function fills the proc entry with statistic data about
* the ethernet device.
- *
+ *
*
* Returns: buffer with statistic data
- *
+ *
*/
int proc_read(char *buffer,
char **buffer_location,
@@ -124,7 +124,7 @@ void *data)
SK_AC *pAC;
char test_buf[100];
char sens_msg[50];
- unsigned long Flags;
+ unsigned long Flags;
unsigned int Size;
struct SK_NET_DEVICE *next;
struct SK_NET_DEVICE *SkgeProcDev = SkGeRootDev;
@@ -146,20 +146,20 @@ void *data)
spin_lock_irqsave(&pAC->SlowPathLock, Flags);
Size = SK_PNMI_STRUCT_SIZE;
- SkPnmiGetStruct(pAC, pAC->IoBase,
+ SkPnmiGetStruct(pAC, pAC->IoBase,
pPnmiStruct, &Size, t-1);
spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
-
+
if (strcmp(pAC->dev[t-1]->name, file->name) == 0) {
pPnmiStat = &pPnmiStruct->Stat[0];
- len = sprintf(buffer,
+ len = sprintf(buffer,
"\nDetailed statistic for device %s\n",
pAC->dev[t-1]->name);
len += sprintf(buffer + len,
"=======================================\n");
-
+
/* Board statistics */
- len += sprintf(buffer + len,
+ len += sprintf(buffer + len,
"\nBoard statistics\n\n");
len += sprintf(buffer + len,
"Active Port %c\n",
@@ -226,9 +226,9 @@ void *data)
break;
}
}
-
+
/*Receive statistics */
- len += sprintf(buffer + len,
+ len += sprintf(buffer + len,
"\nReceive statistics\n\n");
len += sprintf(buffer + len,
@@ -240,14 +240,14 @@ void *data)
SkNumber(test_buf, pPnmiStat->StatRxOkCts,
10,0,-1,0));
#if 0
- if (pAC->GIni.GP[0].PhyType == SK_PHY_XMAC &&
+ if (pAC->GIni.GP[0].PhyType == SK_PHY_XMAC &&
pAC->HWRevision < 12) {
- pPnmiStruct->InErrorsCts = pPnmiStruct->InErrorsCts -
+ pPnmiStruct->InErrorsCts = pPnmiStruct->InErrorsCts -
pPnmiStat->StatRxShortsCts;
pPnmiStat->StatRxShortsCts = 0;
}
#endif
- if (pNet->Mtu > 1500)
+ if (pNet->Mtu > 1500)
pPnmiStruct->InErrorsCts = pPnmiStruct->InErrorsCts -
pPnmiStat->StatRxTooLongCts;
@@ -292,37 +292,37 @@ void *data)
len += sprintf(buffer + len,
" too long %s\n",
SkNumber(test_buf, pPnmiStat->StatRxTooLongCts,
- 10, 0, -1, 0));
+ 10, 0, -1, 0));
len += sprintf(buffer + len,
" carrier extension %s\n",
SkNumber(test_buf, pPnmiStat->StatRxCextCts,
- 10, 0, -1, 0));
+ 10, 0, -1, 0));
len += sprintf(buffer + len,
" too short %s\n",
SkNumber(test_buf, pPnmiStat->StatRxShortsCts,
- 10, 0, -1, 0));
+ 10, 0, -1, 0));
len += sprintf(buffer + len,
" symbol %s\n",
SkNumber(test_buf, pPnmiStat->StatRxSymbolCts,
- 10, 0, -1, 0));
+ 10, 0, -1, 0));
len += sprintf(buffer + len,
" LLC MAC size %s\n",
SkNumber(test_buf, pPnmiStat->StatRxIRLengthCts,
- 10, 0, -1, 0));
+ 10, 0, -1, 0));
len += sprintf(buffer + len,
" carrier event %s\n",
SkNumber(test_buf, pPnmiStat->StatRxCarrierCts,
- 10, 0, -1, 0));
+ 10, 0, -1, 0));
len += sprintf(buffer + len,
" jabber %s\n",
SkNumber(test_buf, pPnmiStat->StatRxJabberCts,
- 10, 0, -1, 0));
+ 10, 0, -1, 0));
/*Transmit statistics */
- len += sprintf(buffer + len,
+ len += sprintf(buffer + len,
"\nTransmit statistics\n\n");
-
+
len += sprintf(buffer + len,
"Transmited bytes %s\n",
SkNumber(test_buf, pPnmiStat->StatTxOctetsOkCts,
@@ -363,7 +363,7 @@ void *data)
len += sprintf(buffer + len,
" window %ld\n",
pAC->stats.tx_window_errors);
-
+
}
}
SkgeProcDev = next;
@@ -381,9 +381,6 @@ void *data)
}
-
-
-
/*****************************************************************************
*
* SkDoDiv - convert 64bit number
@@ -509,9 +506,9 @@ char * SkNumber(char * str, long long num, int base, int size, int precision
*str++ = tmp[i];
while (size-- > 0)
*str++ = ' ';
-
+
str[0] = '\0';
-
+
return strorg;
}
diff --git a/drivers/sk98lin/skqueue.c b/drivers/sk98lin/skqueue.c
index c9740e316b..c49baed4f0 100644
--- a/drivers/sk98lin/skqueue.c
+++ b/drivers/sk98lin/skqueue.c
@@ -29,60 +29,60 @@
* $Log: skqueue.c,v $
* Revision 1.18 2002/05/07 14:11:11 rwahl
* Fixed Watcom Precompiler error.
- *
+ *
* Revision 1.17 2002/03/25 10:06:41 mkunz
* SkIgnoreEvent deleted
- *
+ *
* Revision 1.16 2002/03/15 10:51:59 mkunz
* Added event classes for link aggregation
- *
+ *
* Revision 1.15 1999/11/22 13:36:29 cgoos
* Changed license header to GPL.
- *
+ *
* Revision 1.14 1998/10/15 15:11:35 gklug
* fix: ID_sccs to SysKonnectFileId
- *
+ *
* Revision 1.13 1998/09/08 08:47:52 gklug
* add: init level handling
- *
+ *
* Revision 1.12 1998/09/08 07:43:20 gklug
* fix: Sirq Event function name
- *
+ *
* Revision 1.11 1998/09/08 05:54:34 gklug
* chg: define SK_CSUM is replaced by SK_USE_CSUM
- *
+ *
* Revision 1.10 1998/09/03 14:14:49 gklug
* add: CSUM and HWAC Eventclass and function.
- *
+ *
* Revision 1.9 1998/08/19 09:50:50 gklug
* fix: remove struct keyword from c-code (see CCC) add typedefs
- *
+ *
* Revision 1.8 1998/08/17 13:43:11 gklug
* chg: Parameter will be union of 64bit para, 2 times SK_U32 or SK_PTR
- *
+ *
* Revision 1.7 1998/08/14 07:09:11 gklug
* fix: chg pAc -> pAC
- *
+ *
* Revision 1.6 1998/08/11 12:13:14 gklug
* add: return code feature of Event service routines
* add: correct Error log calls
- *
+ *
* Revision 1.5 1998/08/07 12:53:45 gklug
* fix: first compiled version
- *
+ *
* Revision 1.4 1998/08/07 09:20:48 gklug
* adapt functions to C coding conventions.
- *
+ *
* Revision 1.3 1998/08/05 11:29:32 gklug
* rmv: Timer event entry. Timer will queue event directly
- *
+ *
* Revision 1.2 1998/07/31 11:22:40 gklug
* Initial version
- *
+ *
* Revision 1.1 1998/07/30 15:14:01 gklug
* Initial version. Adapted from SMT
- *
- *
+ *
+ *
*
******************************************************************************/
@@ -175,7 +175,7 @@ SK_IOC Ioc) /* Io context */
while (pEv != pAC->Event.EvPut) {
PRINTF("dispatch Class %d Event %d\n",pEv->Class,pEv->Event) ;
switch(Class = pEv->Class) {
-#ifndef SK_USE_LAC_EV
+#ifndef SK_USE_LAC_EV
case SKGE_RLMT : /* RLMT Event */
Rtv = SkRlmtEvent(pAC,Ioc,pEv->Event,pEv->Para);
break ;
@@ -189,16 +189,16 @@ SK_IOC Ioc) /* Io context */
case SKGE_DRV : /* Driver Event */
Rtv = SkDrvEvent(pAC,Ioc,pEv->Event,pEv->Para);
break ;
-#ifndef SK_USE_SW_TIMER
+#ifndef SK_USE_SW_TIMER
case SKGE_HWAC :
Rtv = SkGeSirqEvent(pAC,Ioc,pEv->Event,pEv->Para);
break ;
#else /* !SK_USE_SW_TIMER */
- case SKGE_SWT :
+ case SKGE_SWT :
Rtv = SkSwtEvent(pAC,Ioc,pEv->Event,pEv->Para);
break ;
#endif /* !SK_USE_SW_TIMER */
-#ifdef SK_USE_LAC_EV
+#ifdef SK_USE_LAC_EV
case SKGE_LACP :
Rtv = SkLacpEvent(pAC,Ioc,pEv->Event,pEv->Para);
break ;
diff --git a/drivers/sk98lin/skrlmt.c b/drivers/sk98lin/skrlmt.c
index 1e707c9973..f8a3b41f0f 100644
--- a/drivers/sk98lin/skrlmt.c
+++ b/drivers/sk98lin/skrlmt.c
@@ -28,17 +28,17 @@
* $Log: skrlmt.c,v $
* Revision 1.68 2003/01/31 15:26:56 rschmidt
* Added init for local variables in RlmtInit().
- *
+ *
* Revision 1.67 2003/01/31 14:12:41 mkunz
* single port adapter runs now with two identical MAC addresses
- *
+ *
* Revision 1.66 2002/09/23 15:14:19 rwahl
* - Reset broadcast timestamp on link down.
* - Editorial corrections.
- *
+ *
* Revision 1.65 2002/07/22 14:29:48 rwahl
* - Removed BRK statement from debug check.
- *
+ *
* Revision 1.64 2001/11/28 19:36:14 rwahl
* - RLMT Packets sent to an invalid MAC address in CLP/CLPSS mode
* (#10650).
@@ -46,220 +46,220 @@
* (no dependency to RLMT module).
* - Enabled dbg output for entry/exit of event functions.
* - Editorial changes.
- *
+ *
* Revision 1.63 2001/10/26 07:53:18 afischer
* Port switching bug in `check local link` mode
- *
+ *
* Revision 1.62 2001/07/03 12:16:30 mkunz
* New Flag ChgBcPrio (Change priority of last broadcast received)
- *
+ *
* Revision 1.61 2001/03/14 12:52:08 rassmann
* Fixed reporting of active port up/down to PNMI.
- *
+ *
* Revision 1.60 2001/02/21 16:02:25 gklug
* fix: when RLMT starts set Active Port for PNMI
- *
+ *
* Revision 1.59 2001/02/16 14:38:19 rassmann
* Initializing some pointers earlier in the init phase.
* Rx Mbufs are freed if the net which they belong to is stopped.
- *
+ *
* Revision 1.58 2001/02/14 14:06:31 rassmann
* Editorial changes.
- *
+ *
* Revision 1.57 2001/02/05 14:25:26 rassmann
* Prepared RLMT for transparent operation.
- *
+ *
* Revision 1.56 2001/01/30 10:29:09 rassmann
* Not checking switching befor RlmtStart.
* Editorial changes.
- *
+ *
* Revision 1.55 2001/01/22 13:41:38 rassmann
* Supporting two nets on dual-port adapters.
- *
+ *
* Revision 1.54 2000/11/30 13:25:07 rassmann
* Setting SK_TICK_INCR to 1 by default.
- *
+ *
* Revision 1.53 2000/11/30 10:48:07 cgoos
* Changed definition of SK_RLMT_BC_DELTA.
- *
+ *
* Revision 1.52 2000/11/27 12:50:03 rassmann
* Checking ports after receiving broadcasts.
- *
+ *
* Revision 1.51 2000/11/17 08:58:00 rassmann
* Moved CheckSwitch from SK_RLMT_PACKET_RECEIVED to SK_RLMT_TIM event.
- *
+ *
* Revision 1.50 2000/11/09 12:24:34 rassmann
* Indicating that segmentation check is not running anymore after
* SkRlmtCheckSeg().
* Restarting segmentation timer after segmentation log.
* Editorial changes.
- *
+ *
* Revision 1.49 1999/11/22 13:38:02 cgoos
* Changed license header to GPL.
* Added initialization to some variables to avoid compiler warnings.
- *
+ *
* Revision 1.48 1999/10/04 14:01:17 rassmann
* Corrected reaction to reception of BPDU frames (#10441).
- *
+ *
* Revision 1.47 1999/07/20 12:53:36 rassmann
* Fixed documentation errors for lookahead macros.
- *
+ *
* Revision 1.46 1999/05/28 13:29:16 rassmann
* Replaced C++-style comment.
- *
+ *
* Revision 1.45 1999/05/28 13:28:08 rassmann
* Corrected syntax error (xxx).
- *
+ *
* Revision 1.44 1999/05/28 11:15:54 rassmann
* Changed behaviour to reflect Design Spec v1.2.
* Controlling Link LED(s).
* Introduced RLMT Packet Version field in RLMT Packet.
* Newstyle lookahead macros (checking meta-information before looking at
* the packet).
- *
+ *
* Revision 1.43 1999/01/28 13:12:43 rassmann
* Corrected Lookahead (bug introduced in previous Rev.).
- *
+ *
* Revision 1.42 1999/01/28 12:50:41 rassmann
* Not using broadcast time stamps in CheckLinkState mode.
- *
+ *
* Revision 1.41 1999/01/27 14:13:02 rassmann
* Monitoring broadcast traffic.
* Switching more reliably and not too early if switch is
* configured for spanning tree.
- *
+ *
* Revision 1.40 1999/01/22 13:17:30 rassmann
* Informing PNMI of NET_UP.
* Clearing RLMT multicast addresses before setting them for the first time.
* Reporting segmentation earlier, setting a "quiet time"
* after a report.
- *
+ *
* Revision 1.39 1998/12/10 15:29:53 rassmann
* Corrected SuspectStatus in SkRlmtBuildCheckChain().
* Corrected CHECK_SEG mode.
- *
+ *
* Revision 1.38 1998/12/08 13:11:23 rassmann
* Stopping SegTimer at RlmtStop.
- *
+ *
* Revision 1.37 1998/12/07 16:51:42 rassmann
* Corrected comments.
- *
+ *
* Revision 1.36 1998/12/04 10:58:56 rassmann
* Setting next pointer to NULL when receiving.
- *
+ *
* Revision 1.35 1998/12/03 16:12:42 rassmann
* Ignoring/correcting illegal PrefPort values.
- *
+ *
* Revision 1.34 1998/12/01 11:45:35 rassmann
* Code cleanup.
- *
+ *
* Revision 1.33 1998/12/01 10:29:32 rassmann
* Starting standby ports before getting the net up.
* Checking if a port is started when the link comes up.
- *
+ *
* Revision 1.32 1998/11/30 16:19:50 rassmann
* New default for PortNoRx.
- *
+ *
* Revision 1.31 1998/11/27 19:17:13 rassmann
* Corrected handling of LINK_DOWN coming shortly after LINK_UP.
- *
+ *
* Revision 1.30 1998/11/24 12:37:31 rassmann
* Implemented segmentation check.
- *
+ *
* Revision 1.29 1998/11/18 13:04:32 rassmann
* Secured PortUpTimer event.
* Waiting longer before starting standby port(s).
- *
+ *
* Revision 1.28 1998/11/17 13:43:04 rassmann
* Handling (logical) tx failure.
* Sending packet on logical address after PORT_SWITCH.
- *
+ *
* Revision 1.27 1998/11/13 17:09:50 rassmann
* Secured some events against being called in wrong state.
- *
+ *
* Revision 1.26 1998/11/13 16:56:54 rassmann
* Added macro version of SkRlmtLookaheadPacket.
- *
+ *
* Revision 1.25 1998/11/06 18:06:04 rassmann
* Corrected timing when RLMT checks fail.
* Clearing tx counter earlier in periodical checks.
- *
+ *
* Revision 1.24 1998/11/05 10:37:27 rassmann
* Checking destination address in Lookahead.
- *
+ *
* Revision 1.23 1998/11/03 13:53:49 rassmann
* RLMT should switch now (at least in mode 3).
- *
+ *
* Revision 1.22 1998/10/29 14:34:49 rassmann
* Clearing SK_RLMT struct at startup.
* Initializing PortsUp during SK_RLMT_START.
- *
+ *
* Revision 1.21 1998/10/28 11:30:17 rassmann
* Default mode is now SK_RLMT_CHECK_LOC_LINK.
- *
+ *
* Revision 1.20 1998/10/26 16:02:03 rassmann
* Ignoring LINK_DOWN for links that are down.
- *
+ *
* Revision 1.19 1998/10/22 15:54:01 rassmann
* Corrected EtherLen.
* Starting Link Check when second port comes up.
- *
+ *
* Revision 1.18 1998/10/22 11:39:50 rassmann
* Corrected signed/unsigned mismatches.
* Corrected receive list handling and address recognition.
- *
+ *
* Revision 1.17 1998/10/19 17:01:20 rassmann
* More detailed checking of received packets.
- *
+ *
* Revision 1.16 1998/10/15 15:16:34 rassmann
* Finished Spanning Tree checking.
* Checked with lint.
- *
+ *
* Revision 1.15 1998/09/24 19:16:07 rassmann
* Code cleanup.
* Introduced Timer for PORT_DOWN due to no RX.
- *
+ *
* Revision 1.14 1998/09/18 20:27:14 rassmann
* Added address override.
- *
+ *
* Revision 1.13 1998/09/16 11:31:48 rassmann
* Including skdrv1st.h again. :(
- *
+ *
* Revision 1.12 1998/09/16 11:09:50 rassmann
* Syntax corrections.
- *
+ *
* Revision 1.11 1998/09/15 12:32:03 rassmann
* Syntax correction.
- *
+ *
* Revision 1.10 1998/09/15 11:28:49 rassmann
* Syntax corrections.
- *
+ *
* Revision 1.9 1998/09/14 17:07:37 rassmann
* Added code for port checking via LAN.
* Changed Mbuf definition.
- *
+ *
* Revision 1.8 1998/09/07 11:14:14 rassmann
* Syntax corrections.
- *
+ *
* Revision 1.7 1998/09/07 09:06:07 rassmann
* Syntax corrections.
- *
+ *
* Revision 1.6 1998/09/04 19:41:33 rassmann
* Syntax corrections.
* Started entering code for checking local links.
- *
+ *
* Revision 1.5 1998/09/04 12:14:27 rassmann
* Interface cleanup.
- *
+ *
* Revision 1.4 1998/09/02 16:55:28 rassmann
* Updated to reflect new DRV/HWAC/RLMT interface.
- *
+ *
* Revision 1.3 1998/08/27 14:29:03 rassmann
* Code cleanup.
- *
+ *
* Revision 1.2 1998/08/27 14:26:24 rassmann
* Updated interface.
- *
+ *
* Revision 1.1 1998/08/21 08:26:49 rassmann
* First public version.
*
@@ -668,7 +668,7 @@ int Level) /* Initialization Level */
}
(void)SkAddrMcClear(pAC, IoC, i, SK_ADDR_PERMANENT | SK_MC_SW_ONLY);
-
+
/* Add RLMT MC address. */
(void)SkAddrMcAdd(pAC, IoC, i, &SkRlmtMcAddr, SK_ADDR_PERMANENT);
@@ -680,34 +680,34 @@ int Level) /* Initialization Level */
(void)SkAddrMcUpdate(pAC, IoC, i);
}
- VirtualMacAddressSet = SK_FALSE;
+ VirtualMacAddressSet = SK_FALSE;
/* Read virtual MAC address from Control Register File. */
for (j = 0; j < SK_MAC_ADDR_LEN; j++) {
-
- SK_IN8(IoC, B2_MAC_1 + j, &VirtualMacAddress.a[j]);
- VirtualMacAddressSet |= VirtualMacAddress.a[j];
+
+ SK_IN8(IoC, B2_MAC_1 + j, &VirtualMacAddress.a[j]);
+ VirtualMacAddressSet |= VirtualMacAddress.a[j];
}
-
- PhysicalAMacAddressSet = SK_FALSE;
+
+ PhysicalAMacAddressSet = SK_FALSE;
/* Read physical MAC address for MAC A from Control Register File. */
for (j = 0; j < SK_MAC_ADDR_LEN; j++) {
-
- SK_IN8(IoC, B2_MAC_2 + j, &PhysicalAMacAddress.a[j]);
- PhysicalAMacAddressSet |= PhysicalAMacAddress.a[j];
+
+ SK_IN8(IoC, B2_MAC_2 + j, &PhysicalAMacAddress.a[j]);
+ PhysicalAMacAddressSet |= PhysicalAMacAddress.a[j];
}
- /* check if the two mac addresses contain reasonable values */
- if (!VirtualMacAddressSet || !PhysicalAMacAddressSet) {
+ /* check if the two mac addresses contain reasonable values */
+ if (!VirtualMacAddressSet || !PhysicalAMacAddressSet) {
- pAC->Rlmt.RlmtOff = SK_TRUE;
- }
+ pAC->Rlmt.RlmtOff = SK_TRUE;
+ }
- /* if the two mac addresses are equal switch off the RLMT_PRE_LOOKAHEAD
- and the RLMT_LOOKAHEAD macros */
- else if (SK_ADDR_EQUAL(PhysicalAMacAddress.a, VirtualMacAddress.a)) {
+ /* if the two mac addresses are equal switch off the RLMT_PRE_LOOKAHEAD
+ and the RLMT_LOOKAHEAD macros */
+ else if (SK_ADDR_EQUAL(PhysicalAMacAddress.a, VirtualMacAddress.a)) {
- pAC->Rlmt.RlmtOff = SK_TRUE;
- }
+ pAC->Rlmt.RlmtOff = SK_TRUE;
+ }
else {
pAC->Rlmt.RlmtOff = SK_FALSE;
}
@@ -751,14 +751,14 @@ SK_U32 NetIdx) /* Net Number */
FirstMacUp = NULL;
PrevMacUp = NULL;
-
+
if (!(pAC->Rlmt.Net[NetIdx].RlmtMode & SK_RLMT_CHECK_LOC_LINK)) {
for (i = 0; i < pAC->Rlmt.Net[i].NumPorts; i++) {
pAC->Rlmt.Net[NetIdx].Port[i]->PortsChecked = 0;
}
return; /* Done. */
}
-
+
SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
("SkRlmtBuildCheckChain.\n"))
@@ -843,7 +843,7 @@ SK_MAC_ADDR *DestAddr) /* Destination address */
#ifdef DEBUG
SK_U8 CheckSrc = 0;
SK_U8 CheckDest = 0;
-
+
for (i = 0; i < SK_MAC_ADDR_LEN; ++i) {
CheckSrc |= SrcAddr->a[i];
CheckDest |= DestAddr->a[i];
@@ -878,7 +878,7 @@ SK_MAC_ADDR *DestAddr) /* Destination address */
for (i = 0; i < 4; i++) {
pPacket->Random[i] = pAC->Rlmt.Port[PortNumber].Random[i];
}
-
+
SK_U16_TO_NETWORK_ORDER(
SK_RLMT_PACKET_VERSION, &pPacket->RlmtPacketVersion[0]);
@@ -1156,7 +1156,7 @@ SK_MBUF *pMb) /* Received packet */
if ((pRPort->PacketsPerTimeSlot - pRPort->BpduPacketsPerTimeSlot) != 0) {
SkRlmtPortReceives(pAC, IoC, PortNumber);
}
-
+
/* Check destination address. */
if (!SK_ADDR_EQUAL(pAPort->CurrentMacAddress.a, pRPacket->DstAddr) &&
@@ -1544,7 +1544,7 @@ SK_U32 PortNumber) /* Port to check */
PortNumber,
pRPort->PacketsPerTimeSlot - pRPort->BpduPacketsPerTimeSlot,
pRPort->PacketsPerTimeSlot))
-
+
SkRlmtPortReceives(pAC, IoC, PortNumber);
if (pAC->Rlmt.CheckSwitch) {
SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber);
@@ -1584,14 +1584,14 @@ SK_U32 *pSelect) /* New active port */
BcTimeStamp = 0; /* Not totally necessary, but feeling better. */
PortFound = SK_FALSE;
-
+
/* Select port with the latest TimeStamp. */
for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) {
SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
("TimeStamp Port %d (Down: %d, NoRx: %d): %08x %08x.\n",
i,
- pAC->Rlmt.Port[i].PortDown, pAC->Rlmt.Port[i].PortNoRx,
+ pAC->Rlmt.Port[i].PortDown, pAC->Rlmt.Port[i].PortNoRx,
*((SK_U32*)(&pAC->Rlmt.Port[i].BcTimeStamp) + OFFS_HI32),
*((SK_U32*)(&pAC->Rlmt.Port[i].BcTimeStamp) + OFFS_LO32)))
@@ -1619,7 +1619,7 @@ SK_U32 *pSelect) /* New active port */
pAC->Rlmt.Port[i].BcTimeStamp +
SK_RLMT_BC_DELTA > BcTimeStamp)) {
PortFound = SK_FALSE;
-
+
SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
("Port %d received a broadcast at a similar time.\n", i))
break;
@@ -1974,7 +1974,7 @@ SK_U32 NetIdx) /* Net index */
/* check of ChgBcPrio flag added */
if ((pAC->Rlmt.Net[0].RlmtMode != SK_RLMT_MODE_CLS) &&
(!pAC->Rlmt.Net[0].ChgBcPrio)) {
-
+
if (!PortFound) {
PortFound = SkRlmtSelectBcRx(
pAC, IoC, Active, PrefPort, &Para.Para32[1]);
@@ -2130,7 +2130,7 @@ SK_U32 NetIdx) /* Net number */
break;
}
}
-
+
if (!Equal) {
SK_ERR_LOG(pAC, SK_ERRCL_COMM, SKERR_RLMT_E005, SKERR_RLMT_E005_MSG);
Para.Para32[0] = NetIdx;
@@ -2330,7 +2330,7 @@ SK_EVPARA Para) /* SK_U32 PortNumber; SK_U32 Undefined */
Para2.Para32[1] = (SK_U32)-1;
SkTimerStart(pAC, IoC, &pRPort->UpTimer, SK_RLMT_PORTUP_TIM_VAL,
SKGE_RLMT, SK_RLMT_PORTUP_TIM, Para2);
-
+
/* Later: if (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_LOC_LINK) && */
if ((pRPort->Net->RlmtMode & SK_RLMT_TRANSPARENT) == 0 &&
(pRPort->Net->RlmtMode & SK_RLMT_CHECK_LINK) != 0 &&
@@ -2457,7 +2457,7 @@ SK_EVPARA Para) /* SK_U32 PortNumber; SK_U32 -1 */
("SK_RLMT_PORTDOWN* Event (%d) EMPTY.\n", Event))
return;
}
-
+
/* Stop port's timers. */
SkTimerStop(pAC, IoC, &pRPort->UpTimer);
SkTimerStop(pAC, IoC, &pRPort->DownRxTimer);
@@ -2947,7 +2947,7 @@ SK_EVPARA Para) /* SK_U32 NetNumber; SK_U32 -1 */
}
}
#endif /* xDEBUG */
-
+
SkRlmtCheckSeg(pAC, IoC, Para.Para32[0]);
SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
@@ -2978,7 +2978,7 @@ SK_EVPARA Para) /* SK_MBUF *pMb */
SK_MBUF *pNextMb;
SK_U32 NetNumber;
-
+
SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL,
("SK_RLMT_PACKET_RECEIVED Event BEGIN.\n"))
@@ -3261,7 +3261,7 @@ SK_EVPARA Para) /* SK_U32 NumNets; SK_U32 -1 */
pAC->Rlmt.Net[1].NumPorts = pAC->GIni.GIMacsFound - 1;
pAC->Rlmt.Net[0].NumPorts =
pAC->GIni.GIMacsFound - pAC->Rlmt.Net[1].NumPorts;
-
+
pAC->Rlmt.NumNets = Para.Para32[0];
for (i = 0; (SK_U32)i < pAC->Rlmt.NumNets; i++) {
pAC->Rlmt.Net[i].RlmtState = SK_RLMT_RS_INIT;
@@ -3432,7 +3432,7 @@ SK_U32 Event, /* Event code */
SK_EVPARA Para) /* Event-specific parameter */
{
switch (Event) {
-
+
/* ----- PORT events ----- */
case SK_RLMT_PORTSTART_TIM: /* From RLMT via TIME. */
diff --git a/drivers/sk98lin/sktimer.c b/drivers/sk98lin/sktimer.c
index 67431d96aa..37cd4c9fe1 100644
--- a/drivers/sk98lin/sktimer.c
+++ b/drivers/sk98lin/sktimer.c
@@ -29,45 +29,45 @@
* $Log: sktimer.c,v $
* Revision 1.12 1999/11/22 13:38:51 cgoos
* Changed license header to GPL.
- *
+ *
* Revision 1.11 1998/12/17 13:24:13 gklug
* fix: restart problem: do NOT destroy timer queue if init 1 is done
- *
+ *
* Revision 1.10 1998/10/15 15:11:36 gklug
* fix: ID_sccs to SysKonnectFileId
- *
+ *
* Revision 1.9 1998/09/15 15:15:04 cgoos
* Changed TRUE/FALSE to SK_TRUE/SK_FALSE
- *
+ *
* Revision 1.8 1998/09/08 08:47:55 gklug
* add: init level handling
- *
+ *
* Revision 1.7 1998/08/19 09:50:53 gklug
* fix: remove struct keyword from c-code (see CCC) add typedefs
- *
+ *
* Revision 1.6 1998/08/17 13:43:13 gklug
* chg: Parameter will be union of 64bit para, 2 times SK_U32 or SK_PTR
- *
+ *
* Revision 1.5 1998/08/14 07:09:14 gklug
* fix: chg pAc -> pAC
- *
+ *
* Revision 1.4 1998/08/07 12:53:46 gklug
* fix: first compiled version
- *
+ *
* Revision 1.3 1998/08/07 09:31:53 gklug
* fix: delta spelling
- *
+ *
* Revision 1.2 1998/08/07 09:31:02 gklug
* adapt functions to new c coding conventions
* rmv: "fast" handling
* chg: inserting of new timer in queue.
* chg: event queue generation when timer runs out
- *
+ *
* Revision 1.1 1998/08/05 11:27:55 gklug
* first version: adapted from SMT
- *
- *
- *
+ *
+ *
+ *
*
******************************************************************************/
diff --git a/drivers/sk98lin/skvpd.c b/drivers/sk98lin/skvpd.c
index f4558fabf8..3b81e67df8 100644
--- a/drivers/sk98lin/skvpd.c
+++ b/drivers/sk98lin/skvpd.c
@@ -30,80 +30,80 @@
* Replaced check for PCI device Id from YUKON with GENESIS
* to set the VPD size in VpdInit()
* Editorial changes
- *
+ *
* Revision 1.36 2002/11/14 15:16:56 gheinig
* Added const specifier to key and buf parameters for VpdPara, VpdRead
* and VpdWrite for Diag 7 GUI
- *
+ *
* Revision 1.35 2002/10/21 14:31:59 gheinig
* Took out CVS web garbage at head of file
- *
+ *
* Revision 1.34 2002/10/21 11:47:24 gheinig
* Reverted to version 1.32 due to unwanted commit
- *
+ *
* Revision 1.32 2002/10/14 16:04:29 rschmidt
* Added saving of VPD ROM Size from PCI_OUR_REG_2
* Avoid reading of PCI_OUR_REG_2 in VpdTransferBlock()
* Editorial changes
- *
+ *
* Revision 1.31 2002/09/10 09:21:32 mkarl
* Replaced all if(GIChipId == CHIP_ID_GENESIS) with new entry GIGenesis
- *
+ *
* Revision 1.30 2002/09/09 14:43:03 mkarl
* changes for diagnostics in order to read VPD data before the adapter
* has been initialized
* editorial changes
- *
+ *
* Revision 1.29 2002/07/26 13:20:43 mkarl
* added Yukon support
* save size of VPD in pAC->vpd.vpd_size
- *
+ *
* Revision 1.28 2002/04/02 15:31:47 afischer
* Bug fix in VpdWait()
- *
+ *
* Revision 1.27 2000/08/10 11:29:06 rassmann
* Editorial changes.
* Preserving 32-bit alignment in structs for the adapter context.
* Removed unused function VpdWriteDword() (#if 0).
* Made VpdReadKeyword() available for SKDIAG only.
- *
+ *
* Revision 1.26 2000/06/13 08:00:01 mkarl
* additional cast to avoid compile problems in 64 bit environment
- *
+ *
* Revision 1.25 1999/11/22 13:39:32 cgoos
* Changed license header to GPL.
- *
+ *
* Revision 1.24 1999/03/11 14:25:49 malthoff
* Replace __STDC__ with SK_KR_PROTO.
- *
+ *
* Revision 1.23 1999/01/11 15:13:11 gklug
* fix: syntax error
- *
+ *
* Revision 1.22 1998/10/30 06:41:15 gklug
* rmv: WARNING
- *
+ *
* Revision 1.21 1998/10/29 07:15:14 gklug
* fix: Write Stream function needs verify.
- *
+ *
* Revision 1.20 1998/10/28 18:05:08 gklug
* chg: no DEBUG in VpdMayWrite
- *
+ *
* Revision 1.19 1998/10/28 15:56:11 gklug
* fix: Return len at end of ReadStream
* fix: Write even less than 4 bytes correctly
- *
+ *
* Revision 1.18 1998/10/28 09:00:47 gklug
* fix: unreferenced local vars
- *
+ *
* Revision 1.17 1998/10/28 08:25:45 gklug
* fix: WARNING
- *
+ *
* Revision 1.16 1998/10/28 08:17:30 gklug
* fix: typo
- *
+ *
* Revision 1.15 1998/10/28 07:50:32 gklug
* fix: typo
- *
+ *
* Revision 1.14 1998/10/28 07:20:38 gklug
* chg: Interface functions to use IoC as parameter as well
* fix: VpdRead/WriteDWord now returns SK_U32
@@ -112,51 +112,51 @@
* add: VpdRead/Write Stream functions to r/w a stream of data
* fix: VpdTransferBlock swapped illegal
* add: VpdMayWrite
- *
+ *
* Revision 1.13 1998/10/22 10:02:37 gklug
* fix: SysKonnectFileId typo
- *
+ *
* Revision 1.12 1998/10/20 10:01:01 gklug
* fix: parameter to SkOsGetTime
- *
+ *
* Revision 1.11 1998/10/15 12:51:48 malthoff
* Remove unrequired parameter p in vpd_setup_para().
- *
+ *
* Revision 1.10 1998/10/08 14:52:43 malthoff
* Remove CvsId by SysKonnectFileId.
- *
+ *
* Revision 1.9 1998/09/16 07:33:52 malthoff
* replace memcmp() by SK_MEMCMP and
* memcpy() by SK_MEMCPY() to be
* independent from the 'C' Standard Library.
- *
+ *
* Revision 1.8 1998/08/19 12:52:35 malthoff
* compiler fix: use SK_VPD_KEY instead of S_VPD.
- *
+ *
* Revision 1.7 1998/08/19 08:14:01 gklug
* fix: remove struct keyword as much as possible from the C-code (see CCC)
- *
+ *
* Revision 1.6 1998/08/18 13:03:58 gklug
* SkOsGetTime now returns SK_U64
- *
+ *
* Revision 1.5 1998/08/18 08:17:29 malthoff
* Ensure we issue a VPD read in vpd_read_dword().
* Discard all VPD keywords other than Vx or Yx, where
* x is '0..9' or 'A..Z'.
- *
+ *
* Revision 1.4 1998/07/03 14:52:19 malthoff
* Add category SK_DBGCAT_FATAL to some debug macros.
* bug fix: correct the keyword name check in vpd_write().
- *
+ *
* Revision 1.3 1998/06/26 11:16:53 malthoff
* Correct the modified File Identifier.
- *
+ *
* Revision 1.2 1998/06/26 11:13:43 malthoff
* Modify the File Identifier.
- *
+ *
* Revision 1.1 1998/06/19 14:11:08 malthoff
* Created, Tests with AIX were performed successfully
- *
+ *
*
******************************************************************************/
@@ -224,9 +224,9 @@ int event) /* event to wait for (VPD_READ / VPD_write) completion*/
("ERROR:VPD wait timeout\n"));
return(1);
}
-
+
VPD_IN16(pAC, IoC, PCI_VPD_ADR_REG, &state);
-
+
SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_CTRL,
("state = %x, event %x\n",state,event));
} while((int)(state & PCI_VPD_FLAG) == event);
@@ -267,7 +267,7 @@ int addr) /* VPD address */
Rtv = 0;
VPD_IN32(pAC, IoC, PCI_VPD_DAT_REG, &Rtv);
-
+
SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_CTRL,
("VPD read dword data = 0x%x\n",Rtv));
return(Rtv);
@@ -412,9 +412,9 @@ int Len) /* number of bytes to read / to write */
}
for (j = 0; j <= (int)(i%sizeof(SK_U32)); j++, pComp++) {
-
+
VPD_IN8(pAC, IoC, PCI_VPD_DAT_REG + j, &Data);
-
+
if (Data != *pComp) {
/* Verify Error */
SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,
@@ -427,7 +427,7 @@ int Len) /* number of bytes to read / to write */
return(Len);
}
-
+
/*
* Read one Stream of 'len' bytes of VPD data, starting at 'addr' from
@@ -493,14 +493,14 @@ int dir) /* transfer direction may be VPD_READ or VPD_WRITE */
return(0);
vpd_rom_size = pAC->vpd.rom_size;
-
+
if (addr > vpd_rom_size - 4) {
SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR | SK_DBGCAT_FATAL,
("Address error: 0x%x, exp. < 0x%x\n",
addr, vpd_rom_size - 4));
return(0);
}
-
+
if (addr + len > vpd_rom_size) {
len = vpd_rom_size - addr;
SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR,
@@ -571,13 +571,13 @@ SK_IOC IoC) /* IO Context */
SK_U32 our_reg2;
SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_INIT, ("VpdInit .. "));
-
+
VPD_IN16(pAC, IoC, PCI_DEVICE_ID, &dev_id);
-
+
VPD_IN32(pAC, IoC, PCI_OUR_REG_2, &our_reg2);
-
+
pAC->vpd.rom_size = 256 << ((our_reg2 & PCI_VPD_ROM_SZ) >> 14);
-
+
/*
* this function might get used before the hardware is initialized
* therefore we cannot always trust in GIChipId
@@ -608,7 +608,7 @@ SK_IOC IoC) /* IO Context */
("Block Read Error\n"));
return(1);
}
-
+
pAC->vpd.vpd_size = vpd_size;
/* find the end tag of the RO area */
@@ -617,7 +617,7 @@ SK_IOC IoC) /* IO Context */
("Encoding Error: RV Tag not found\n"));
return(1);
}
-
+
if (r->p_val + r->p_len > pAC->vpd.vpd_buf + vpd_size/2) {
SK_DBG_MSG(pAC,SK_DBGMOD_VPD,SK_DBGCAT_ERR | SK_DBGCAT_FATAL,
("Encoding Error: Invalid VPD struct size\n"));
@@ -629,7 +629,7 @@ SK_IOC IoC) /* IO Context */
for (i = 0, x = 0; (unsigned)i <= (unsigned)vpd_size/2 - r->p_len; i++) {
x += pAC->vpd.vpd_buf[i];
}
-
+
if (x != 0) {
/* checksum error */
SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR | SK_DBGCAT_FATAL,
@@ -643,7 +643,7 @@ SK_IOC IoC) /* IO Context */
("Encoding Error: RV Tag not found\n"));
return(1);
}
-
+
if (r->p_val < pAC->vpd.vpd_buf + vpd_size/2) {
SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_ERR | SK_DBGCAT_FATAL,
("Encoding Error: Invalid VPD struct size\n"));
@@ -879,7 +879,7 @@ int op) /* operation to do: ADD_KEY or OWR_KEY */
SK_DBG_MSG(pAC, SK_DBGMOD_VPD, SK_DBGCAT_CTRL,
("VPD setup para key = %s, val = %s\n",key,buf));
-
+
vpd_size = pAC->vpd.vpd_size;
rtv = 0;
@@ -1281,7 +1281,6 @@ SK_IOC IoC) /* IO Context */
}
-
/*
* Read the contents of the VPD EEPROM and copy it to the VPD buffer
* if not already done. If the keyword "VF" is not present it will be
diff --git a/drivers/sk98lin/skxmac2.c b/drivers/sk98lin/skxmac2.c
index 9c87b2393f..e6b5a95d4a 100644
--- a/drivers/sk98lin/skxmac2.c
+++ b/drivers/sk98lin/skxmac2.c
@@ -31,51 +31,51 @@
* Disabled auto-update for speed, duplex and flow-control when
* auto-negotiation is not enabled (Bug Id #10766).
* Editorial changes.
- *
+ *
* Revision 1.90 2003/01/29 13:35:19 rschmidt
* Increment Rx FIFO Overflow counter only in DEBUG-mode.
* Corrected define for blinking active LED.
- *
+ *
* Revision 1.89 2003/01/28 16:37:45 rschmidt
* Changed init for blinking active LED
- *
+ *
* Revision 1.88 2003/01/28 10:09:38 rschmidt
* Added debug outputs in SkGmInitMac().
* Added customized init of LED registers in SkGmInitPhyMarv(),
* for blinking active LED (#ifdef ACT_LED_BLINK) and
* for normal duplex LED (#ifdef DUP_LED_NORMAL).
* Editorial changes.
- *
+ *
* Revision 1.87 2002/12/10 14:39:05 rschmidt
* Improved initialization of GPHY in SkGmInitPhyMarv().
* Editorial changes.
- *
+ *
* Revision 1.86 2002/12/09 15:01:12 rschmidt
* Added setup of Ext. PHY Specific Ctrl Reg (downshift feature).
- *
+ *
* Revision 1.85 2002/12/05 14:09:16 rschmidt
* Improved avoiding endless loop in SkGmPhyWrite(), SkGmPhyWrite().
* Added additional advertising for 10Base-T when 100Base-T is selected.
* Added case SK_PHY_MARV_FIBER for YUKON Fiber adapter.
* Editorial changes.
- *
+ *
* Revision 1.84 2002/11/15 12:50:09 rschmidt
* Changed SkGmCableDiagStatus() when getting results.
- *
+ *
* Revision 1.83 2002/11/13 10:28:29 rschmidt
* Added some typecasts to avoid compiler warnings.
- *
+ *
* Revision 1.82 2002/11/13 09:20:46 rschmidt
* Replaced for(..) with do {} while (...) in SkXmUpdateStats().
* Replaced 2 macros GM_IN16() with 1 GM_IN32() in SkGmMacStatistic().
* Added SkGmCableDiagStatus() for Virtual Cable Test (VCT).
* Editorial changes.
- *
+ *
* Revision 1.81 2002/10/28 14:28:08 rschmidt
* Changed MAC address setup for GMAC in SkGmInitMac().
* Optimized handling of counter overflow IRQ in SkGmOverflowStatus().
* Editorial changes.
- *
+ *
* Revision 1.80 2002/10/14 15:29:44 rschmidt
* Corrected disabling of all PHY IRQs.
* Added WA for deviation #16 (address used for pause packets).
@@ -84,22 +84,22 @@
* SkXmTimeStamp() replaced by SkMacTimeStamp().
* Added clearing of GMAC Tx FIFO Underrun IRQ in SkGmIrq().
* Editorial changes.
- *
+ *
* Revision 1.79 2002/10/10 15:55:36 mkarl
* changes for PLinkSpeedUsed
- *
+ *
* Revision 1.78 2002/09/12 09:39:51 rwahl
* Removed deactivate code for SIRQ overflow event separate for TX/RX.
- *
+ *
* Revision 1.77 2002/09/09 12:26:37 mkarl
* added handling for Yukon to SkXmTimeStamp
- *
+ *
* Revision 1.76 2002/08/21 16:41:16 rschmidt
* Added bit GPC_ENA_XC (Enable MDI crossover) in HWCFG_MODE.
* Added forced speed settings in SkGmInitPhyMarv().
* Added settings of full/half duplex capabilities for YUKON Fiber.
* Editorial changes.
- *
+ *
* Revision 1.75 2002/08/16 15:12:01 rschmidt
* Replaced all if(GIChipId == CHIP_ID_GENESIS) with new entry GIGenesis.
* Added function SkMacHashing() for ADDR-Module.
@@ -110,36 +110,36 @@
* Changed initialization of GPHY in SkGmInitPhyMarv().
* Changed check of parameter in SkXmMacStatistic().
* Editorial changes.
- *
+ *
* Revision 1.74 2002/08/12 14:00:17 rschmidt
* Replaced usage of Broadcom PHY Ids with defines.
* Corrected error messages in SkGmMacStatistic().
* Made SkMacPromiscMode() public for ADDR-Modul.
* Editorial changes.
- *
+ *
* Revision 1.73 2002/08/08 16:26:24 rschmidt
* Improved reset sequence for YUKON in SkGmHardRst() and SkGmInitMac().
* Replaced XMAC Rx High Watermark init value with SK_XM_RX_HI_WM.
* Editorial changes.
- *
+ *
* Revision 1.72 2002/07/24 15:11:19 rschmidt
* Fixed wrong placement of parenthesis.
* Editorial changes.
- *
+ *
* Revision 1.71 2002/07/23 16:05:18 rschmidt
* Added global functions for PHY: SkGePhyRead(), SkGePhyWrite().
* Fixed Tx Counter Overflow IRQ (Bug ID #10730).
* Editorial changes.
- *
+ *
* Revision 1.70 2002/07/18 14:27:27 rwahl
* Fixed syntax error.
- *
+ *
* Revision 1.69 2002/07/17 17:08:47 rwahl
* Fixed check in SkXmMacStatistic().
- *
+ *
* Revision 1.68 2002/07/16 07:35:24 rwahl
* Removed check for cleared mib counter in SkGmResetCounter().
- *
+ *
* Revision 1.67 2002/07/15 18:35:56 rwahl
* Added SkXmUpdateStats(), SkGmUpdateStats(), SkXmMacStatistic(),
* SkGmMacStatistic(), SkXmResetCounter(), SkGmResetCounter(),
@@ -148,7 +148,7 @@
* RX & TX.
* Changes to SkGmInitMac(): call to SkGmResetCounter().
* Editorial changes.
- *
+ *
* Revision 1.66 2002/07/15 15:59:30 rschmidt
* Added PHY Address in SkXmPhyRead(), SkXmPhyWrite().
* Added MIB Clear Counter in SkGmInitMac().
@@ -156,12 +156,12 @@
* Reset all Multicast filtering Hash reg. in SkGmInitMac().
* Added new function: SkGmGetMuxConfig().
* Editorial changes.
- *
+ *
* Revision 1.65 2002/06/10 09:35:39 rschmidt
* Replaced C++ comments (//).
* Added #define VCPU around VCPUwaitTime.
* Editorial changes.
- *
+ *
* Revision 1.64 2002/06/05 08:41:10 rschmidt
* Added function for XMAC2: SkXmTimeStamp().
* Added function for YUKON: SkGmSetRxCmd().
@@ -169,7 +169,7 @@
* Fixed wrong variable in SkXmAutoNegLipaXmac() (debug mode).
* SkXmRxTxEnable() replaced by SkMacRxTxEnable().
* Editorial changes.
- *
+ *
* Revision 1.63 2002/04/25 13:04:44 rschmidt
* Changes for handling YUKON.
* Use of #ifdef OTHER_PHY to eliminate code for unused Phy types.
@@ -187,94 +187,94 @@
* SkGmAutoNegDoneMarv(), SkGmPhyRead(), SkGmPhyWrite().
* Changes for V-CPU support.
* Editorial changes.
- *
+ *
* Revision 1.62 2001/08/06 09:50:14 rschmidt
* Workaround BCOM Errata #1 for the C5 type.
* Editorial changes.
- *
+ *
* Revision 1.61 2001/02/09 15:40:59 rassmann
* Editorial changes.
- *
+ *
* Revision 1.60 2001/02/07 15:02:01 cgoos
* Added workaround for Fujitsu switch link down.
- *
+ *
* Revision 1.59 2001/01/10 09:38:06 cgoos
* Fixed Broadcom C0/A1 Id check for workaround.
- *
+ *
* Revision 1.58 2000/11/29 11:30:38 cgoos
* Changed DEBUG sections with NW output to xDEBUG
- *
+ *
* Revision 1.57 2000/11/27 12:40:40 rassmann
* Suppressing preamble after first access to BCom, not before (#10556).
- *
+ *
* Revision 1.56 2000/11/09 12:32:48 rassmann
* Renamed variables.
- *
+ *
* Revision 1.55 2000/11/09 11:30:10 rassmann
* WA: Waiting after releasing reset until BCom chip is accessible.
- *
+ *
* Revision 1.54 2000/10/02 14:10:27 rassmann
* Reading BCOM PHY after releasing reset until it returns a valid value.
- *
+ *
* Revision 1.53 2000/07/27 12:22:11 gklug
* fix: possible endless loop in XmHardRst.
- *
+ *
* Revision 1.52 2000/05/22 08:48:31 malthoff
* Fix: #10523 errata valid for all BCOM PHYs.
- *
+ *
* Revision 1.51 2000/05/17 12:52:18 malthoff
* Fixes BCom link errata (#10523).
- *
+ *
* Revision 1.50 1999/11/22 13:40:14 cgoos
* Changed license header to GPL.
- *
+ *
* Revision 1.49 1999/11/22 08:12:13 malthoff
* Add workaround for power consumption feature of BCom C0 chip.
- *
+ *
* Revision 1.48 1999/11/16 08:39:01 malthoff
* Fix: MDIO preamble suppression is port dependent.
- *
+ *
* Revision 1.47 1999/08/27 08:55:35 malthoff
* 1000BT: Optimizing MDIO transfer by oppressing MDIO preamble.
- *
+ *
* Revision 1.46 1999/08/13 11:01:12 malthoff
* Fix for 1000BT: pFlowCtrlMode was not set correctly.
- *
+ *
* Revision 1.45 1999/08/12 19:18:28 malthoff
* 1000BT Fixes: Do not owerwrite XM_MMU_CMD.
* Do not execute BCOM A1 workaround for B1 chips.
* Fix pause frame setting.
* Always set PHY_B_AC_TX_TST in PHY_BCOM_AUX_CTRL.
- *
+ *
* Revision 1.44 1999/08/03 15:23:48 cgoos
* Fixed setting of PHY interrupt mask in half duplex mode.
- *
+ *
* Revision 1.43 1999/08/03 15:22:17 cgoos
* Added some debug output.
* Disabled XMac GP0 interrupt for external PHYs.
- *
+ *
* Revision 1.42 1999/08/02 08:39:23 malthoff
* BCOM PHY: TX LED: To get the mono flop behaviour it is required
* to set the LED Traffic Mode bit in PHY_BCOM_P_EXT_CTRL.
- *
+ *
* Revision 1.41 1999/07/30 06:54:31 malthoff
* Add temp. workarounds for the BCOM Phy revision A1.
- *
+ *
* Revision 1.40 1999/06/01 07:43:26 cgoos
* Changed Link Mode Status in SkXmAutoNegDone... from FULL/HALF to
* AUTOFULL/AUTOHALF.
- *
+ *
* Revision 1.39 1999/05/19 07:29:51 cgoos
* Changes for 1000Base-T.
- *
+ *
* Revision 1.38 1999/04/08 14:35:10 malthoff
* Add code for enabling signal detect. Enabling signal detect is disabled.
- *
+ *
* Revision 1.37 1999/03/12 13:42:54 malthoff
* Add: Jumbo Frame Support.
* Add: Receive modes SK_LENERR_OK_ON/OFF and
* SK_BIG_PK_OK_ON/OFF in SkXmSetRxCmd().
- *
+ *
* Revision 1.36 1999/03/08 10:10:55 gklug
* fix: AutoSensing did switch to next mode even if LiPa indicated offline
*
@@ -456,7 +456,6 @@ static int SkXmAutoNegDoneNat (SK_AC*, SK_IOC, int);
#endif /* OTHER_PHY */
-
/******************************************************************************
*
* SkXmPhyRead() - Read from XMAC PHY register
@@ -477,13 +476,13 @@ SK_U16 *pVal) /* Pointer to Value */
SK_GEPORT *pPrt;
pPrt = &pAC->GIni.GP[Port];
-
+
/* write the PHY register's address */
XM_OUT16(IoC, Port, XM_PHY_ADDR, PhyReg | pPrt->PhyAddr);
-
+
/* get the PHY register's value */
XM_IN16(IoC, Port, XM_PHY_DATA, pVal);
-
+
if (pPrt->PhyType != SK_PHY_XMAC) {
do {
XM_IN16(IoC, Port, XM_MMU_CMD, &Mmu);
@@ -516,20 +515,20 @@ SK_U16 Val) /* Value */
SK_GEPORT *pPrt;
pPrt = &pAC->GIni.GP[Port];
-
+
if (pPrt->PhyType != SK_PHY_XMAC) {
do {
XM_IN16(IoC, Port, XM_MMU_CMD, &Mmu);
/* wait until 'Busy' is cleared */
} while ((Mmu & XM_MMU_PHY_BUSY) != 0);
}
-
+
/* write the PHY register's address */
XM_OUT16(IoC, Port, XM_PHY_ADDR, PhyReg | pPrt->PhyAddr);
-
+
/* write the PHY register's value */
XM_OUT16(IoC, Port, XM_PHY_DATA, Val);
-
+
if (pPrt->PhyType != SK_PHY_XMAC) {
do {
XM_IN16(IoC, Port, XM_MMU_CMD, &Mmu);
@@ -560,14 +559,14 @@ SK_U16 *pVal) /* Pointer to Value */
#ifdef VCPU
u_long SimCyle;
u_long SimLowTime;
-
+
VCPUgetTime(&SimCyle, &SimLowTime);
VCPUprintf(0, "SkGmPhyRead(%u), SimCyle=%u, SimLowTime=%u\n",
PhyReg, SimCyle, SimLowTime);
#endif /* VCPU */
-
+
pPrt = &pAC->GIni.GP[Port];
-
+
/* set PHY-Register offset and 'Read' OpCode (= 1) */
*pVal = (SK_U16)(GM_SMI_CT_PHY_AD(pPrt->PhyAddr) |
GM_SMI_CT_REG_AD(PhyReg) | GM_SMI_CT_OP_RD);
@@ -575,7 +574,7 @@ SK_U16 *pVal) /* Pointer to Value */
GM_OUT16(IoC, Port, GM_SMI_CTRL, *pVal);
GM_IN16(IoC, Port, GM_SMI_CTRL, &Ctrl);
-
+
/* additional check for MDC/MDIO activity */
if ((Ctrl & GM_SMI_CT_BUSY) == 0) {
*pVal = 0;
@@ -583,7 +582,7 @@ SK_U16 *pVal) /* Pointer to Value */
}
*pVal |= GM_SMI_CT_BUSY;
-
+
do {
#ifdef VCPU
VCPUwaitTime(1000);
@@ -593,7 +592,7 @@ SK_U16 *pVal) /* Pointer to Value */
/* wait until 'ReadValid' is set */
} while (Ctrl == *pVal);
-
+
/* get the PHY register's value */
GM_IN16(IoC, Port, GM_SMI_DATA, pVal);
@@ -627,29 +626,29 @@ SK_U16 Val) /* Value */
SK_U32 DWord;
u_long SimCyle;
u_long SimLowTime;
-
+
VCPUgetTime(&SimCyle, &SimLowTime);
VCPUprintf(0, "SkGmPhyWrite(Reg=%u, Val=0x%04x), SimCyle=%u, SimLowTime=%u\n",
PhyReg, Val, SimCyle, SimLowTime);
#endif /* VCPU */
-
+
pPrt = &pAC->GIni.GP[Port];
-
+
/* write the PHY register's value */
GM_OUT16(IoC, Port, GM_SMI_DATA, Val);
-
+
/* set PHY-Register offset and 'Write' OpCode (= 0) */
Val = GM_SMI_CT_PHY_AD(pPrt->PhyAddr) | GM_SMI_CT_REG_AD(PhyReg);
GM_OUT16(IoC, Port, GM_SMI_CTRL, Val);
GM_IN16(IoC, Port, GM_SMI_CTRL, &Ctrl);
-
+
/* additional check for MDC/MDIO activity */
if ((Ctrl & GM_SMI_CT_BUSY) == 0) {
return;
}
-
+
Val |= GM_SMI_CT_BUSY;
do {
@@ -664,7 +663,7 @@ SK_U16 Val) /* Value */
/* wait until 'Busy' is cleared */
} while (Ctrl == Val);
-
+
#ifdef VCPU
VCPUgetTime(&SimCyle, &SimLowTime);
VCPUprintf(0, "VCPUgetTime(), SimCyle=%u, SimLowTime=%u\n",
@@ -697,7 +696,7 @@ SK_U16 *pVal) /* Pointer to Value */
else {
r_func = SkGmPhyRead;
}
-
+
r_func(pAC, IoC, Port, PhyReg, pVal);
} /* SkGePhyRead */
@@ -726,7 +725,7 @@ SK_U16 Val) /* Value */
else {
w_func = SkGmPhyWrite;
}
-
+
w_func(pAC, IoC, Port, PhyReg, Val);
} /* SkGePhyWrite */
@@ -737,7 +736,7 @@ SK_U16 Val) /* Value */
*
* Description:
* enables / disables promiscuous mode by setting Mode Register (XMAC) or
- * Receive Control Register (GMAC) dep. on board type
+ * Receive Control Register (GMAC) dep. on board type
*
* Returns:
* nothing
@@ -752,7 +751,7 @@ SK_BOOL Enable) /* Enable / Disable */
SK_U32 MdReg;
if (pAC->GIni.GIGenesis) {
-
+
XM_IN32(IoC, Port, XM_MODE, &MdReg);
/* enable or disable promiscuous mode */
if (Enable) {
@@ -765,9 +764,9 @@ SK_BOOL Enable) /* Enable / Disable */
XM_OUT32(IoC, Port, XM_MODE, MdReg);
}
else {
-
+
GM_IN16(IoC, Port, GM_RX_CTRL, &RcReg);
-
+
/* enable or disable unicast and multicast filtering */
if (Enable) {
RcReg &= ~(GM_RXCR_UCF_ENA | GM_RXCR_MCF_ENA);
@@ -787,7 +786,7 @@ SK_BOOL Enable) /* Enable / Disable */
*
* Description:
* enables / disables hashing by setting Mode Register (XMAC) or
- * Receive Control Register (GMAC) dep. on board type
+ * Receive Control Register (GMAC) dep. on board type
*
* Returns:
* nothing
@@ -802,7 +801,7 @@ SK_BOOL Enable) /* Enable / Disable */
SK_U32 MdReg;
if (pAC->GIni.GIGenesis) {
-
+
XM_IN32(IoC, Port, XM_MODE, &MdReg);
/* enable or disable hashing */
if (Enable) {
@@ -815,9 +814,9 @@ SK_BOOL Enable) /* Enable / Disable */
XM_OUT32(IoC, Port, XM_MODE, MdReg);
}
else {
-
+
GM_IN16(IoC, Port, GM_RX_CTRL, &RcReg);
-
+
/* enable or disable multicast filtering */
if (Enable) {
RcReg |= GM_RXCR_MCF_ENA;
@@ -867,7 +866,7 @@ int Mode) /* Mode is SK_STRIP_FCS_ON/OFF, SK_STRIP_PAD_ON/OFF,
XM_IN16(IoC, Port, XM_RX_CMD, &OldRxCmd);
RxCmd = OldRxCmd;
-
+
switch (Mode & (SK_STRIP_FCS_ON | SK_STRIP_FCS_OFF)) {
case SK_STRIP_FCS_ON:
RxCmd |= XM_RX_STRIP_FCS;
@@ -950,7 +949,7 @@ int Mode) /* Mode is SK_STRIP_FCS_ON/OFF, SK_STRIP_PAD_ON/OFF,
SK_U16 RxCmd;
if ((Mode & (SK_STRIP_FCS_ON | SK_STRIP_FCS_OFF)) != 0) {
-
+
GM_IN16(IoC, Port, GM_RX_CTRL, &OldRxCmd);
RxCmd = OldRxCmd;
@@ -968,7 +967,7 @@ int Mode) /* Mode is SK_STRIP_FCS_ON/OFF, SK_STRIP_PAD_ON/OFF,
}
if ((Mode & (SK_BIG_PK_OK_ON | SK_BIG_PK_OK_OFF)) != 0) {
-
+
GM_IN16(IoC, Port, GM_SERIAL_MODE, &OldRxCmd);
RxCmd = OldRxCmd;
@@ -1003,11 +1002,11 @@ int Port, /* Port Index (MAC_1 + n) */
int Mode) /* Rx Mode */
{
if (pAC->GIni.GIGenesis) {
-
+
SkXmSetRxCmd(pAC, IoC, Port, Mode);
}
else {
-
+
SkGmSetRxCmd(pAC, IoC, Port, Mode);
}
} /* SkMacSetRxCmd */
@@ -1031,7 +1030,7 @@ SK_BOOL Enable) /* Enable / Disable */
SK_U16 Word;
if (pAC->GIni.GIGenesis) {
-
+
XM_IN16(IoC, Port, XM_TX_CMD, &Word);
if (Enable) {
@@ -1044,9 +1043,9 @@ SK_BOOL Enable) /* Enable / Disable */
XM_OUT16(pAC, Port, XM_TX_CMD, Word);
}
else {
-
+
GM_IN16(IoC, Port, GM_TX_CTRL, &Word);
-
+
if (Enable) {
Word &= ~GM_TXCR_CRC_DIS;
}
@@ -1114,7 +1113,7 @@ int Port) /* Port Index (MAC_1 + n) */
SK_U32 MdReg;
if (pAC->GIni.GIGenesis) {
-
+
XM_IN32(IoC, Port, XM_MODE, &MdReg);
XM_OUT32(IoC, Port, XM_MODE, MdReg | XM_MD_FTF);
@@ -1197,18 +1196,18 @@ SK_IOC IoC, /* IO context */
int Port) /* Port Index (MAC_1 + n) */
{
SK_U16 ZeroAddr[4] = {0x0000, 0x0000, 0x0000, 0x0000};
-
+
/* reset the statistics module */
XM_OUT32(IoC, Port, XM_GP_PORT, XM_GP_RES_STAT);
/* disable all XMAC IRQs */
XM_OUT16(IoC, Port, XM_IMSK, 0xffff);
-
+
XM_OUT32(IoC, Port, XM_MODE, 0); /* clear Mode Reg */
-
+
XM_OUT16(IoC, Port, XM_TX_CMD, 0); /* reset TX CMD Reg */
XM_OUT16(IoC, Port, XM_RX_CMD, 0); /* reset RX CMD Reg */
-
+
/* disable all PHY IRQs */
switch (pAC->GIni.GP[Port].PhyType) {
case SK_PHY_BCOM:
@@ -1230,7 +1229,7 @@ int Port) /* Port Index (MAC_1 + n) */
/* clear the Exact Match Address registers */
SkXmClrExactAddr(pAC, IoC, Port, 0, 15);
-
+
/* clear the Source Check Address registers */
XM_OUTHASH(IoC, Port, XM_SRC_CHK, &ZeroAddr);
@@ -1279,9 +1278,9 @@ int Port) /* Port Index (MAC_1 + n) */
}
SK_OUT16(IoC, MR_ADDR(Port, TX_MFF_CTRL1), MFF_SET_MAC_RST);
-
+
SK_IN16(IoC, MR_ADDR(Port, TX_MFF_CTRL1), &Word);
-
+
} while ((Word & MFF_SET_MAC_RST) == 0);
}
@@ -1329,16 +1328,16 @@ int Port) /* Port Index (MAC_1 + n) */
/* disable all GMAC IRQs */
SK_OUT8(IoC, GMAC_IRQ_MSK, 0);
-
+
/* disable all PHY IRQs */
SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_INT_MASK, 0);
-
+
/* clear the Hash Register */
GM_OUTHASH(IoC, Port, GM_MC_ADDR_H1, EmptyHash);
/* Enable Unicast and Multicast filtering */
GM_IN16(IoC, Port, GM_RX_CTRL, &RxCtrl);
-
+
GM_OUT16(IoC, Port, GM_RX_CTRL,
RxCtrl | GM_RXCR_UCF_ENA | GM_RXCR_MCF_ENA);
@@ -1394,17 +1393,17 @@ int Port) /* Port Index (MAC_1 + n) */
SkMacRxTxDisable(pAC, IoC, Port);
if (pAC->GIni.GIGenesis) {
-
+
SkXmSoftRst(pAC, IoC, Port);
}
else {
-
+
SkGmSoftRst(pAC, IoC, Port);
}
/* flush the MAC's Rx and Tx FIFOs */
SkMacFlushTxFifo(pAC, IoC, Port);
-
+
SkMacFlushRxFifo(pAC, IoC, Port);
pPrt->PState = SK_PRT_STOP;
@@ -1426,13 +1425,13 @@ SK_AC *pAC, /* adapter context */
SK_IOC IoC, /* IO context */
int Port) /* Port Index (MAC_1 + n) */
{
-
+
if (pAC->GIni.GIGenesis) {
-
+
SkXmHardRst(pAC, IoC, Port);
}
else {
-
+
SkGmHardRst(pAC, IoC, Port);
}
@@ -1441,7 +1440,6 @@ int Port) /* Port Index (MAC_1 + n) */
} /* SkMacHardRst */
-
/******************************************************************************
*
* SkXmInitMac() - Initialize the XMAC II
@@ -1496,7 +1494,7 @@ int Port) /* Port Index (MAC_1 + n) */
if (pPrt->PhyType != SK_PHY_XMAC) {
SK_IN32(IoC, B2_GP_IO, &Reg);
-
+
if (Port == 0) {
Reg |= (GP_DIR_0 | GP_IO_0); /* set to output */
}
@@ -1516,7 +1514,7 @@ int Port) /* Port Index (MAC_1 + n) */
* Must be done AFTER first access to BCOM chip.
*/
XM_IN16(IoC, Port, XM_MMU_CMD, &SWord);
-
+
XM_OUT16(IoC, Port, XM_MMU_CMD, SWord | XM_MMU_NO_PRE);
if (pPrt->PhyId1 == PHY_BCOM_ID1_C0) {
@@ -1549,7 +1547,7 @@ int Port) /* Port Index (MAC_1 + n) */
* Disable Power Management after reset.
*/
SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_AUX_CTRL, &SWord);
-
+
SkXmPhyWrite(pAC, IoC, Port, PHY_BCOM_AUX_CTRL,
(SK_U16)(SWord | PHY_B_AC_DIS_PM));
@@ -1558,7 +1556,7 @@ int Port) /* Port Index (MAC_1 + n) */
/* Dummy read the Interrupt source register */
XM_IN16(IoC, Port, XM_ISRC, &SWord);
-
+
/*
* The auto-negotiation process starts immediately after
* clearing the reset. The auto-negotiation process should be
@@ -1584,7 +1582,7 @@ int Port) /* Port Index (MAC_1 + n) */
* independent. Remember this when changing.
*/
SK_IN16(IoC, (B2_MAC_2 + Port * 8 + i * 2), &SWord);
-
+
XM_OUT16(IoC, Port, (XM_SA + i * 2), SWord);
}
@@ -1637,7 +1635,7 @@ int Port) /* Port Index (MAC_1 + n) */
*/
SWord |= XM_RX_DIS_CEXT;
}
-
+
XM_OUT16(IoC, Port, XM_RX_CMD, SWord);
/*
@@ -1706,7 +1704,7 @@ int Port) /* Port Index (MAC_1 + n) */
/* Port State: SK_PRT_STOP */
/* Verify that the reset bit is cleared */
SK_IN32(IoC, MR_ADDR(Port, GMAC_CTRL), &DWord);
-
+
if ((DWord & GMC_RST_SET) != 0) {
/* PState does not match HW state */
SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E006, SKERR_HWI_E006MSG);
@@ -1745,11 +1743,11 @@ int Port) /* Port Index (MAC_1 + n) */
/* Dummy read the Interrupt source register */
SK_IN16(IoC, GMAC_IRQ_SRC, &SWord);
-
+
#ifndef VCPU
/* read Id from PHY */
SkGmPhyRead(pAC, IoC, Port, PHY_MARV_ID1, &pPrt->PhyId1);
-
+
SkGmInitPhyMarv(pAC, IoC, Port, SK_FALSE);
#endif /* VCPU */
}
@@ -1770,7 +1768,7 @@ int Port) /* Port Index (MAC_1 + n) */
case SK_LSPEED_10MBPS:
break;
}
-
+
/* duplex settings */
if (pPrt->PLinkMode != SK_LMODE_HALF) {
/* set full duplex */
@@ -1799,7 +1797,7 @@ int Port) /* Port Index (MAC_1 + n) */
/* disable auto-update for speed, duplex and flow-control */
SWord |= GM_GPCR_AU_ALL_DIS;
}
-
+
/* setup General Purpose Control Register */
GM_OUT16(IoC, Port, GM_GP_CTRL, SWord);
@@ -1819,23 +1817,23 @@ int Port) /* Port Index (MAC_1 + n) */
#endif /* VCPU */
SWord = JAM_LEN_VAL(3) | JAM_IPG_VAL(11) | IPG_JAM_DATA(26);
-
+
GM_OUT16(IoC, Port, GM_TX_PARAM, SWord);
/* configure the Serial Mode Register */
#ifdef VCPU
GM_IN16(IoC, Port, GM_SERIAL_MODE, &SWord);
#endif /* VCPU */
-
+
SWord = GM_SMOD_VLAN_ENA | IPG_VAL_FAST_ETH;
if (pAC->GIni.GIPortUsage == SK_JUMBO_LINK) {
/* enable jumbo mode (Max. Frame Length = 9018) */
SWord |= GM_SMOD_JUMBO_ENA;
}
-
+
GM_OUT16(IoC, Port, GM_SERIAL_MODE, SWord);
-
+
/*
* configure the GMACs Station Addresses
* in PROM you can find our addresses at:
@@ -1864,15 +1862,15 @@ int Port) /* Port Index (MAC_1 + n) */
else {
GM_OUT16(IoC, Port, (GM_SRC_ADDR_1L + i * 4), SWord);
}
-#else
+#else
GM_OUT16(IoC, Port, (GM_SRC_ADDR_1L + i * 4), SWord);
#endif /* WA_DEV_16 */
-
+
/* virtual address: will be used for data */
SK_IN16(IoC, (B2_MAC_1 + Port * 8 + i * 2), &SWord);
GM_OUT16(IoC, Port, (GM_SRC_ADDR_2L + i * 4), SWord);
-
+
/* reset Multicast filtering Hash registers 1-3 */
GM_OUT16(IoC, Port, GM_MC_ADDR_H1 + 4*i, 0);
}
@@ -1887,7 +1885,7 @@ int Port) /* Port Index (MAC_1 + n) */
/* read General Purpose Status */
GM_IN16(IoC, Port, GM_GP_STAT, &SWord);
-
+
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("MAC Stat Reg=0x%04X\n", SWord));
@@ -1970,7 +1968,7 @@ int Port) /* Port Index (MAC_1 + n) */
pPrt = &pAC->GIni.GP[Port];
XM_IN16(IoC, Port, XM_MMU_CMD, &Word);
-
+
if (pPrt->PFlowCtrlStatus == SK_FLOW_STAT_NONE ||
pPrt->PFlowCtrlStatus == SK_FLOW_STAT_LOC_SEND) {
@@ -1984,8 +1982,8 @@ int Port) /* Port Index (MAC_1 + n) */
*/
/* Enable Pause Frame Reception */
Word &= ~XM_MMU_IGN_PF;
- }
-
+ }
+
XM_OUT16(IoC, Port, XM_MMU_CMD, Word);
XM_IN32(IoC, Port, XM_MODE, &DWord);
@@ -2025,7 +2023,7 @@ int Port) /* Port Index (MAC_1 + n) */
/* Disable Pause Mode in MAC Rx FIFO */
SK_OUT16(IoC, MR_ADDR(Port, RX_MFF_CTRL1), MFF_DIS_PAUSE);
}
-
+
XM_OUT32(IoC, Port, XM_MODE, DWord);
} /* SkXmInitPauseMd*/
@@ -2052,7 +2050,7 @@ SK_BOOL DoLoop) /* Should a Phy LoopBack be set-up? */
pPrt = &pAC->GIni.GP[Port];
Ctrl = 0;
-
+
/* Auto-negotiation ? */
if (pPrt->PLinkMode == SK_LMODE_HALF || pPrt->PLinkMode == SK_LMODE_FULL) {
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
@@ -2158,7 +2156,7 @@ SK_BOOL DoLoop) /* Should a Phy LoopBack be set-up? */
/* manually Master/Slave ? */
if (pPrt->PMSMode != SK_MS_MODE_AUTO) {
Ctrl2 |= PHY_B_1000C_MSE;
-
+
if (pPrt->PMSMode == SK_MS_MODE_MASTER) {
Ctrl2 |= PHY_B_1000C_MSC;
}
@@ -2191,7 +2189,7 @@ SK_BOOL DoLoop) /* Should a Phy LoopBack be set-up? */
* Set Repeater/DTE bit 10 of the 1000Base-T Control Register
*/
Ctrl2 |= PHY_B_1000C_RD;
-
+
/* Set Full/half duplex capabilities */
switch (pPrt->PLinkMode) {
case SK_LMODE_AUTOHALF:
@@ -2229,21 +2227,21 @@ SK_BOOL DoLoop) /* Should a Phy LoopBack be set-up? */
/* Restart Auto-negotiation */
Ctrl1 |= PHY_CT_ANE | PHY_CT_RE_CFG;
}
-
+
/* Initialize LED register here? */
/* No. Please do it in SkDgXmitLed() (if required) and swap
init order of LEDs and XMAC. (MAl) */
-
+
/* Write 1000Base-T Control Register */
SkXmPhyWrite(pAC, IoC, Port, PHY_BCOM_1000T_CTRL, Ctrl2);
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("1000B-T Ctrl Reg=0x%04X\n", Ctrl2));
-
+
/* Write AutoNeg Advertisement Register */
SkXmPhyWrite(pAC, IoC, Port, PHY_BCOM_AUNE_ADV, Ctrl3);
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("Auto-Neg. Adv. Reg=0x%04X\n", Ctrl3));
-
+
if (DoLoop) {
/* Set the Phy Loopback bit, too */
Ctrl1 |= PHY_CT_LOOP;
@@ -2261,7 +2259,7 @@ SK_BOOL DoLoop) /* Should a Phy LoopBack be set-up? */
/* Configure LED Traffic Mode and Jumbo Frame usage if specified */
SkXmPhyWrite(pAC, IoC, Port, PHY_BCOM_P_EXT_CTRL, Ctrl4);
-
+
/* Write to the Phy control register */
SkXmPhyWrite(pAC, IoC, Port, PHY_BCOM_CTRL, Ctrl1);
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
@@ -2301,7 +2299,7 @@ SK_BOOL DoLoop) /* Should a Phy LoopBack be set-up? */
VCPUprintf(0, "SkGmInitPhyMarv(), Port=%u, DoLoop=%u\n",
Port, DoLoop);
#else /* VCPU */
-
+
pPrt = &pAC->GIni.GP[Port];
/* Auto-negotiation ? */
@@ -2311,24 +2309,24 @@ SK_BOOL DoLoop) /* Should a Phy LoopBack be set-up? */
else {
AutoNeg = SK_TRUE;
}
-
+
if (!DoLoop) {
/* Read Ext. PHY Specific Control */
SkGmPhyRead(pAC, IoC, Port, PHY_MARV_EXT_CTRL, &ExtPhyCtrl);
-
+
ExtPhyCtrl &= ~(PHY_M_EC_M_DSC_MSK | PHY_M_EC_S_DSC_MSK |
PHY_M_EC_MAC_S_MSK);
-
+
ExtPhyCtrl |= PHY_M_EC_M_DSC(1) | PHY_M_EC_S_DSC(1) |
PHY_M_EC_MAC_S(MAC_TX_CLK_25_MHZ);
-
+
SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_EXT_CTRL, ExtPhyCtrl);
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("Ext.PHYCtrl=0x%04X\n", ExtPhyCtrl));
-
+
/* Read PHY Control */
SkGmPhyRead(pAC, IoC, Port, PHY_MARV_CTRL, &PhyCtrl);
-
+
/* Assert software reset */
SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_CTRL,
(SK_U16)(PhyCtrl | PHY_CT_RESET));
@@ -2343,17 +2341,17 @@ SK_BOOL DoLoop) /* Should a Phy LoopBack be set-up? */
if (pPrt->PMSMode != SK_MS_MODE_AUTO) {
/* enable Manual Master/Slave */
C1000BaseT |= PHY_M_1000C_MSE;
-
+
if (pPrt->PMSMode == SK_MS_MODE_MASTER) {
C1000BaseT |= PHY_M_1000C_MSC; /* set it to Master */
}
}
-
+
/* Auto-negotiation ? */
if (!AutoNeg) {
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("InitPhyMarv: no auto-negotiation Port %d\n", Port));
-
+
if (pPrt->PLinkMode == SK_LMODE_FULL) {
/* Set Full Duplex Mode */
PhyCtrl |= PHY_CT_DUP_MD;
@@ -2391,9 +2389,9 @@ SK_BOOL DoLoop) /* Should a Phy LoopBack be set-up? */
else {
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("InitPhyMarv: with auto-negotiation Port %d\n", Port));
-
+
PhyCtrl |= PHY_CT_ANE;
-
+
if (pAC->GIni.GICopperType) {
/* Set Speed capabilities */
switch (pPrt->PLinkSpeed) {
@@ -2433,7 +2431,7 @@ SK_BOOL DoLoop) /* Should a Phy LoopBack be set-up? */
SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_HWI_E015,
SKERR_HWI_E015MSG);
}
-
+
/* Set Auto-negotiation advertisement */
switch (pPrt->PFlowCtrlMode) {
case SK_FLOW_MODE_NONE:
@@ -2454,7 +2452,7 @@ SK_BOOL DoLoop) /* Should a Phy LoopBack be set-up? */
}
}
else { /* special defines for FIBER (88E1011S only) */
-
+
/* Set Full/half duplex capabilities */
switch (pPrt->PLinkMode) {
case SK_LMODE_AUTOHALF:
@@ -2470,7 +2468,7 @@ SK_BOOL DoLoop) /* Should a Phy LoopBack be set-up? */
SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_HWI_E015,
SKERR_HWI_E015MSG);
}
-
+
/* Set Auto-negotiation advertisement */
switch (pPrt->PFlowCtrlMode) {
case SK_FLOW_MODE_NONE:
@@ -2496,30 +2494,30 @@ SK_BOOL DoLoop) /* Should a Phy LoopBack be set-up? */
PhyCtrl |= PHY_CT_RE_CFG;
}
}
-
+
#ifdef VCPU
/*
* E-mail from Gu Lin (08-03-2002):
*/
-
+
/* Program PHY register 30 as 16'h0708 for simulation speed up */
SkGmPhyWrite(pAC, IoC, Port, 30, 0x0708);
-
+
VCpuWait(2000);
#else /* VCPU */
-
+
/* Write 1000Base-T Control Register */
SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_1000T_CTRL, C1000BaseT);
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("1000B-T Ctrl=0x%04X\n", C1000BaseT));
-
+
/* Write AutoNeg Advertisement Register */
SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_AUNE_ADV, AutoNegAdv);
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("Auto-Neg.Ad.=0x%04X\n", AutoNegAdv));
#endif /* VCPU */
-
+
if (DoLoop) {
/* Set the PHY Loopback bit */
PhyCtrl |= PHY_CT_LOOP;
@@ -2574,22 +2572,22 @@ SK_BOOL DoLoop) /* Should a Phy LoopBack be set-up? */
SkGmPhyRead(pAC, IoC, Port, PHY_MARV_CTRL, &PhyCtrl);
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("PHY Ctrl Reg.=0x%04X\n", PhyCtrl));
-
+
/* Read 1000Base-T Control Register */
SkGmPhyRead(pAC, IoC, Port, PHY_MARV_1000T_CTRL, &C1000BaseT);
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("1000B-T Ctrl =0x%04X\n", C1000BaseT));
-
+
/* Read AutoNeg Advertisement Register */
SkGmPhyRead(pAC, IoC, Port, PHY_MARV_AUNE_ADV, &AutoNegAdv);
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("Auto-Neg. Ad.=0x%04X\n", AutoNegAdv));
-
+
/* Read Ext. PHY Specific Control */
SkGmPhyRead(pAC, IoC, Port, PHY_MARV_EXT_CTRL, &ExtPhyCtrl);
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("Ext PHY Ctrl=0x%04X\n", ExtPhyCtrl));
-
+
/* Read PHY Status */
SkGmPhyRead(pAC, IoC, Port, PHY_MARV_STAT, &PhyStat);
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
@@ -2597,7 +2595,7 @@ SK_BOOL DoLoop) /* Should a Phy LoopBack be set-up? */
SkGmPhyRead(pAC, IoC, Port, PHY_MARV_STAT, &PhyStat1);
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("PHY Stat Reg.=0x%04X\n", PhyStat1));
-
+
/* Read PHY Specific Status */
SkGmPhyRead(pAC, IoC, Port, PHY_MARV_PHY_STAT, &PhySpecStat);
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
@@ -2649,7 +2647,7 @@ SK_BOOL DoLoop) /* Should a Phy LoopBack be set-up? */
/* manually Master/Slave ? */
if (pPrt->PMSMode != SK_MS_MODE_AUTO) {
Ctrl2 |= PHY_L_1000C_MSE;
-
+
if (pPrt->PMSMode == SK_MS_MODE_MASTER) {
Ctrl2 |= PHY_L_1000C_MSC;
}
@@ -2718,21 +2716,21 @@ SK_BOOL DoLoop) /* Should a Phy LoopBack be set-up? */
Ctrl1 = PHY_CT_ANE | PHY_CT_RE_CFG;
}
-
+
/* Initialize LED register here ? */
/* No. Please do it in SkDgXmitLed() (if required) and swap
init order of LEDs and XMAC. (MAl) */
-
+
/* Write 1000Base-T Control Register */
SkXmPhyWrite(pAC, IoC, Port, PHY_LONE_1000T_CTRL, Ctrl2);
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("1000B-T Ctrl Reg=0x%04X\n", Ctrl2));
-
+
/* Write AutoNeg Advertisement Register */
SkXmPhyWrite(pAC, IoC, Port, PHY_LONE_AUNE_ADV, Ctrl3);
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("Auto-Neg. Adv. Reg=0x%04X\n", Ctrl3));
-
+
if (DoLoop) {
/* Set the Phy Loopback bit, too */
@@ -2991,7 +2989,7 @@ int Port) /* Port Index (MAC_1 + n) */
01-Sep-2000 RA;:;:
SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_1000T_STAT, &ResAb);
#endif /* 0 */
-
+
SkXmPhyRead(pAC, IoC, Port, PHY_BCOM_AUX_STAT, &AuxStat);
if ((LPAb & PHY_B_AN_RF) != 0) {
@@ -3016,7 +3014,7 @@ int Port) /* Port Index (MAC_1 + n) */
pPrt->PAutoNegFail = SK_TRUE;
return(SK_AND_DUP_CAP);
}
-
+
#if 0
01-Sep-2000 RA;:;:
/* Check Master/Slave resolution */
@@ -3027,7 +3025,7 @@ int Port) /* Port Index (MAC_1 + n) */
pPrt->PMSStatus = SK_MS_STAT_FAULT;
return(SK_AND_OTHER);
}
-
+
pPrt->PMSStatus = ((ResAb & PHY_B_1000S_MSR) != 0) ?
SK_MS_STAT_MASTER : SK_MS_STAT_SLAVE;
#endif /* 0 */
@@ -3084,7 +3082,7 @@ int Port) /* Port Index (MAC_1 + n) */
/* Get PHY parameters */
SkGmPhyRead(pAC, IoC, Port, PHY_MARV_AUNE_LP, &LPAb);
-
+
if ((LPAb & PHY_M_AN_RF) != 0) {
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("AutoNegFail: Remote fault bit set Port %d\n", Port));
@@ -3093,7 +3091,7 @@ int Port) /* Port Index (MAC_1 + n) */
}
SkGmPhyRead(pAC, IoC, Port, PHY_MARV_1000T_STAT, &ResAb);
-
+
/* Check Master/Slave resolution */
if ((ResAb & PHY_B_1000S_MSF) != 0) {
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
@@ -3102,13 +3100,13 @@ int Port) /* Port Index (MAC_1 + n) */
pPrt->PMSStatus = SK_MS_STAT_FAULT;
return(SK_AND_OTHER);
}
-
+
pPrt->PMSStatus = ((ResAb & PHY_B_1000S_MSR) != 0) ?
(SK_U8)SK_MS_STAT_MASTER : (SK_U8)SK_MS_STAT_SLAVE;
-
+
/* Read PHY Specific Status */
SkGmPhyRead(pAC, IoC, Port, PHY_MARV_PHY_STAT, &AuxStat);
-
+
/* Check Speed & Duplex resolved */
if ((AuxStat & PHY_M_PS_SPDUP_RES) == 0) {
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
@@ -3117,14 +3115,14 @@ int Port) /* Port Index (MAC_1 + n) */
pPrt->PLinkModeStatus = SK_LMODE_STAT_UNKNOWN;
return(SK_AND_DUP_CAP);
}
-
+
if ((AuxStat & PHY_M_PS_FULL_DUP) != 0) {
pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOFULL;
}
else {
pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOHALF;
}
-
+
/* Check PAUSE mismatch */
/* We are using IEEE 802.3z/D5.0 Table 37-4 */
if ((AuxStat & PHY_M_PS_PAUSE_MSK) == PHY_M_PS_PAUSE_MSK) {
@@ -3143,7 +3141,7 @@ int Port) /* Port Index (MAC_1 + n) */
/* PAUSE mismatch -> no PAUSE */
pPrt->PFlowCtrlStatus = SK_FLOW_STAT_NONE;
}
-
+
/* set used link speed */
switch ((unsigned)(AuxStat & PHY_M_PS_SPEED_MSK)) {
case (unsigned)PHY_M_PS_SPEED_1000:
@@ -3208,7 +3206,7 @@ int Port) /* Port Index (MAC_1 + n) */
else {
pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOHALF;
}
-
+
/* Check Master/Slave resolution */
if ((ResAb & PHY_L_1000S_MSF) != 0) {
/* Error */
@@ -3261,7 +3259,7 @@ int Port) /* Port Index (MAC_1 + n) */
SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_HWI_E016,
SKERR_HWI_E016MSG);
}
-
+
return(SK_AND_OK);
} /* SkXmAutoNegDoneLone */
@@ -3332,7 +3330,7 @@ int Port) /* Port Index (MAC_1 + n) */
default:
return(SK_AND_OTHER);
}
-
+
if (Rtv != SK_AND_OK) {
return(Rtv);
}
@@ -3341,7 +3339,7 @@ int Port) /* Port Index (MAC_1 + n) */
pPrt->PAutoNegFail = SK_FALSE;
SkMacRxTxEnable(pAC, IoC, Port);
-
+
return(SK_AND_OK);
} /* SkMacAutoNegDone */
@@ -3383,7 +3381,7 @@ int Para) /* Parameter to set: MAC or PHY LoopBack, Duplex Mode */
Word &= ~XM_MMU_GMII_LOOP;
break;
}
-
+
switch (Para & (SK_PHY_FULLD_ON | SK_PHY_FULLD_OFF)) {
case SK_PHY_FULLD_ON:
Word |= XM_MMU_GMII_FD;
@@ -3392,7 +3390,7 @@ int Para) /* Parameter to set: MAC or PHY LoopBack, Duplex Mode */
Word &= ~XM_MMU_GMII_FD;
break;
}
-
+
XM_OUT16(IoC, Port, XM_MMU_CMD, Word | XM_MMU_ENA_RX | XM_MMU_ENA_TX);
/* dummy read to ensure writing */
@@ -3418,7 +3416,7 @@ int Port, /* Port Index (MAC_1 + n) */
int Para) /* Parameter to set: MAC LoopBack, Duplex Mode */
{
SK_U16 Ctrl;
-
+
GM_IN16(IoC, Port, GM_GP_CTRL, &Ctrl);
switch (Para & (SK_MAC_LOOPB_ON | SK_MAC_LOOPB_OFF)) {
@@ -3438,7 +3436,7 @@ int Para) /* Parameter to set: MAC LoopBack, Duplex Mode */
Ctrl &= ~GM_GPCR_DUP_FULL;
break;
}
-
+
GM_OUT16(IoC, Port, GM_GP_CTRL, Ctrl | GM_GPCR_RX_ENA | GM_GPCR_TX_ENA);
/* dummy read to ensure writing */
@@ -3462,11 +3460,11 @@ int Port, /* Port Index (MAC_1 + n) */
int Para)
{
if (pAC->GIni.GIGenesis) {
-
+
SkXmSetRxTxEn(pAC, IoC, Port, Para);
}
else {
-
+
SkGmSetRxTxEn(pAC, IoC, Port, Para);
}
@@ -3511,9 +3509,9 @@ int Port) /* Port Index (MAC_1 + n) */
if (pAC->GIni.GIGenesis) {
/* set Duplex Mode and Pause Mode */
SkXmInitDupMd(pAC, IoC, Port);
-
+
SkXmInitPauseMd(pAC, IoC, Port);
-
+
/*
* Initialize the Interrupt Mask Register. Default IRQs are...
* - Link Asynchronous Event
@@ -3529,23 +3527,23 @@ int Port) /* Port Index (MAC_1 + n) */
/* add IRQ for Receive FIFO Overflow */
IntMask &= ~XM_IS_RXF_OV;
#endif /* DEBUG */
-
+
if (pPrt->PhyType != SK_PHY_XMAC) {
/* disable GP0 interrupt bit */
IntMask |= XM_IS_INP_ASS;
}
XM_OUT16(IoC, Port, XM_IMSK, IntMask);
-
+
/* get MMU Command Reg. */
XM_IN16(IoC, Port, XM_MMU_CMD, &Reg);
-
+
if (pPrt->PhyType != SK_PHY_XMAC &&
(pPrt->PLinkModeStatus == SK_LMODE_STAT_FULL ||
pPrt->PLinkModeStatus == SK_LMODE_STAT_AUTOFULL)) {
/* set to Full Duplex */
Reg |= XM_MMU_GMII_FD;
}
-
+
switch (pPrt->PhyType) {
case SK_PHY_BCOM:
/*
@@ -3568,7 +3566,7 @@ int Port) /* Port Index (MAC_1 + n) */
break;
#endif /* OTHER_PHY */
}
-
+
/* enable Rx/Tx */
XM_OUT16(IoC, Port, XM_MMU_CMD, Reg | XM_MMU_ENA_RX | XM_MMU_ENA_TX);
}
@@ -3585,18 +3583,18 @@ int Port) /* Port Index (MAC_1 + n) */
/* add IRQ for Receive FIFO Overrun */
IntMask |= GM_IS_RX_FF_OR;
#endif /* DEBUG */
-
+
SK_OUT8(IoC, GMAC_IRQ_MSK, (SK_U8)IntMask);
-
+
/* get General Purpose Control */
GM_IN16(IoC, Port, GM_GP_CTRL, &Reg);
-
+
if (pPrt->PLinkModeStatus == SK_LMODE_STAT_FULL ||
pPrt->PLinkModeStatus == SK_LMODE_STAT_AUTOFULL) {
/* set to Full Duplex */
Reg |= GM_GPCR_DUP_FULL;
}
-
+
/* enable Rx/Tx */
GM_OUT16(IoC, Port, GM_GP_CTRL, Reg | GM_GPCR_RX_ENA | GM_GPCR_TX_ENA);
@@ -3605,7 +3603,7 @@ int Port) /* Port Index (MAC_1 + n) */
SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_INT_MASK, PHY_M_DEF_MSK);
#endif /* VCPU */
}
-
+
return(0);
} /* SkMacRxTxEnable */
@@ -3627,16 +3625,16 @@ int Port) /* Port Index (MAC_1 + n) */
SK_U16 Word;
if (pAC->GIni.GIGenesis) {
-
+
XM_IN16(IoC, Port, XM_MMU_CMD, &Word);
-
+
XM_OUT16(IoC, Port, XM_MMU_CMD, Word & ~(XM_MMU_ENA_RX | XM_MMU_ENA_TX));
-
+
/* dummy read to ensure writing */
XM_IN16(IoC, Port, XM_MMU_CMD, &Word);
}
else {
-
+
GM_IN16(IoC, Port, GM_GP_CTRL, &Word);
GM_OUT16(IoC, Port, GM_GP_CTRL, Word & ~(GM_GPCR_RX_ENA | GM_GPCR_TX_ENA));
@@ -3666,10 +3664,10 @@ int Port) /* Port Index (MAC_1 + n) */
pPrt = &pAC->GIni.GP[Port];
if (pAC->GIni.GIGenesis) {
-
+
/* disable all XMAC IRQs */
- XM_OUT16(IoC, Port, XM_IMSK, 0xffff);
-
+ XM_OUT16(IoC, Port, XM_IMSK, 0xffff);
+
/* Disable all PHY interrupts */
switch (pPrt->PhyType) {
case SK_PHY_BCOM:
@@ -3698,7 +3696,7 @@ int Port) /* Port Index (MAC_1 + n) */
else {
/* disable all GMAC IRQs */
SK_OUT8(IoC, GMAC_IRQ_MSK, 0);
-
+
#ifndef VCPU
/* Disable all PHY interrupts */
SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_INT_MASK, 0);
@@ -3813,9 +3811,9 @@ int Port) /* Port Index (MAC_1 + n) */
SK_U16 IStatus2;
pPrt = &pAC->GIni.GP[Port];
-
+
XM_IN16(IoC, Port, XM_ISRC, &IStatus);
-
+
/* LinkPartner Auto-negable? */
if (pPrt->PhyType == SK_PHY_XMAC) {
SkXmAutoNegLipaXmac(pAC, IoC, Port, IStatus);
@@ -3826,7 +3824,7 @@ int Port) /* Port Index (MAC_1 + n) */
XM_IS_RX_PAGE | XM_IS_TX_PAGE |
XM_IS_AND | XM_IS_INP_ASS);
}
-
+
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
("XmacIrq Port %d Isr 0x%04x\n", Port, IStatus));
@@ -3939,12 +3937,12 @@ int Port) /* Port Index (MAC_1 + n) */
SK_U8 IStatus; /* Interrupt status */
pPrt = &pAC->GIni.GP[Port];
-
+
SK_IN8(IoC, GMAC_IRQ_SRC, &IStatus);
-
+
/* LinkPartner Auto-negable? */
SkMacAutoNegLipaPhy(pAC, IoC, Port, IStatus);
-
+
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ,
("GmacIrq Port %d Isr 0x%04x\n", Port, IStatus));
@@ -4044,7 +4042,7 @@ unsigned int Port) /* Port Index (MAC_1 + n) */
do {
XM_IN16(IoC, Port, XM_STAT_CMD, &StatReg);
-
+
if (++WaitIndex > 10) {
SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_HWI_E021, SKERR_HWI_E021MSG);
@@ -4052,7 +4050,7 @@ unsigned int Port) /* Port Index (MAC_1 + n) */
return(1);
}
} while ((StatReg & (XM_SC_SNP_TXC | XM_SC_SNP_RXC)) != 0);
-
+
return(0);
} /* SkXmUpdateStats */
@@ -4096,12 +4094,12 @@ SK_U16 StatAddr, /* MIB counter base address */
SK_U32 *pVal) /* ptr to return statistic value */
{
if ((StatAddr < XM_TXF_OK) || (StatAddr > XM_RXF_MAX_SZ)) {
-
+
SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E022, SKERR_HWI_E022MSG);
-
+
return(1);
}
-
+
XM_IN32(IoC, Port, StatAddr, pVal);
return(0);
@@ -4129,14 +4127,14 @@ SK_U32 *pVal) /* ptr to return statistic value */
{
if ((StatAddr < GM_RXF_UC_OK) || (StatAddr > GM_TXE_FIFO_UR)) {
-
+
SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E022, SKERR_HWI_E022MSG);
-
+
SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL,
("SkGmMacStat: wrong MIB counter 0x%04X\n", StatAddr));
return(1);
}
-
+
GM_IN32(IoC, Port, StatAddr, pVal);
return(0);
@@ -4190,17 +4188,17 @@ unsigned int Port) /* Port Index (MAC_1 + n) */
#ifndef VCPU
/* set MIB Clear Counter Mode */
GM_OUT16(IoC, Port, GM_PHY_ADDR, Reg | GM_PAR_MIB_CLR);
-
+
/* read all MIB Counters with Clear Mode set */
for (i = 0; i < GM_MIB_CNT_SIZE; i++) {
/* the reset is performed only when the lower 16 bits are read */
GM_IN16(IoC, Port, GM_MIB_CNT_BASE + 8*i, &Word);
}
-
+
/* clear MIB Clear Counter Mode */
GM_OUT16(IoC, Port, GM_PHY_ADDR, Reg);
#endif /* !VCPU */
-
+
return(0);
} /* SkGmResetCounter */
@@ -4240,7 +4238,7 @@ SK_U64 *pStatus) /* ptr for return overflow status value */
XM_IN32(IoC, Port, XM_RX_CNT_EV, &RegVal);
Status |= (SK_U64)RegVal << 32;
}
-
+
if ((IStatus & XM_IS_TXC_OV) != 0) {
XM_IN32(IoC, Port, XM_TX_CNT_EV, &RegVal);
@@ -4289,13 +4287,13 @@ SK_U64 *pStatus) /* ptr for return overflow status value */
GM_IN16(IoC, Port, GM_RX_IRQ_SRC, &RegVal);
Status |= (SK_U64)RegVal << 32;
}
-
+
if ((IStatus & GM_IS_TX_CO_OV) != 0) {
/* this register is self-clearing after read */
GM_IN16(IoC, Port, GM_TX_IRQ_SRC, &RegVal);
Status |= (SK_U64)RegVal;
}
-
+
/* this register is self-clearing after read */
GM_IN16(IoC, Port, GM_TR_IRQ_SRC, &RegVal);
/* Rx overflow interrupt register bits (LoByte)*/
@@ -4317,7 +4315,7 @@ SK_U64 *pStatus) /* ptr for return overflow status value */
* gets the results if 'StartTest' is true
*
* NOTE: this test is meaningful only when link is down
- *
+ *
* Returns:
* 0: success
* 1: no YUKON copper
@@ -4336,7 +4334,7 @@ SK_BOOL StartTest) /* flag for start / get result */
pPrt = &pAC->GIni.GP[Port];
if (pPrt->PhyType != SK_PHY_MARV_COPPER) {
-
+
return(1);
}
@@ -4345,7 +4343,7 @@ SK_BOOL StartTest) /* flag for start / get result */
if ((pPrt->PhyId1 & PHY_I1_REV_MSK) < 4) {
/* apply TDR workaround from Marvell */
SkGmPhyWrite(pAC, IoC, Port, 29, 0x001e);
-
+
SkGmPhyWrite(pAC, IoC, Port, 30, 0xcc00);
SkGmPhyWrite(pAC, IoC, Port, 30, 0xc800);
SkGmPhyWrite(pAC, IoC, Port, 30, 0xc400);
@@ -4362,10 +4360,10 @@ SK_BOOL StartTest) /* flag for start / get result */
/* start Cable Diagnostic Test */
SkGmPhyWrite(pAC, IoC, Port, PHY_MARV_CABLE_DIAG,
(SK_U16)(RegVal | PHY_M_CABD_ENA_TEST));
-
+
return(0);
}
-
+
/* Read Cable Diagnostic Reg */
SkGmPhyRead(pAC, IoC, Port, PHY_MARV_CABLE_DIAG, &RegVal);
diff --git a/drivers/sk98lin/uboot_drv.c b/drivers/sk98lin/uboot_drv.c
index ddfa6fb318..263dac8106 100644
--- a/drivers/sk98lin/uboot_drv.c
+++ b/drivers/sk98lin/uboot_drv.c
@@ -106,7 +106,7 @@ static void skge_halt(struct eth_device *dev)
static int skge_send(struct eth_device *dev, volatile void *packet,
- int length)
+ int length)
{
int ret = -1;
struct sk_buff * skb = alloc_skb(length, 0);
diff --git a/drivers/sk98lin/uboot_skb.c b/drivers/sk98lin/uboot_skb.c
index b87ad163f6..3a487a8e3d 100644
--- a/drivers/sk98lin/uboot_skb.c
+++ b/drivers/sk98lin/uboot_skb.c
@@ -69,7 +69,7 @@ struct sk_buff * alloc_skb(u32 size, int dummy)
sk_table[i]->data += 16 - ((u32)sk_table[i]->data & 15);
sk_table[i]->len = size;
-
+
break;
}