Commit 4d5d6f8e authored by Mirko Lindner's avatar Mirko Lindner Committed by Stephen Hemminger

[netdrvr sk98lin] small updates


Patch 1/5 (Update to version 6.17)
* Add: Better parameter check
* Add: UDP and TCP HW Csum changes
* Add: Interrupt Moderation infos
parent 827a0c52
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* *
* Name: skdrv1st.h * Name: skdrv1st.h
* Project: GEnesis, PCI Gigabit Ethernet Adapter * Project: GEnesis, PCI Gigabit Ethernet Adapter
* Version: $Revision: 1.15 $ * Version: $Revision: 1.1 $
* Date: $Date: 2003/07/17 14:54:09 $ * Date: $Date: 2003/07/21 07:22:43 $
* Purpose: First header file for driver and all other modules * Purpose: First header file for driver and all other modules
* *
******************************************************************************/ ******************************************************************************/
...@@ -26,6 +26,9 @@ ...@@ -26,6 +26,9 @@
* History: * History:
* *
* $Log: skdrv1st.h,v $ * $Log: skdrv1st.h,v $
* Revision 1.1 2003/07/21 07:22:43 rroesler
* Fix: Re-Enter after CVS crash
*
* Revision 1.15 2003/07/17 14:54:09 rroesler * Revision 1.15 2003/07/17 14:54:09 rroesler
* Fix: Corrected SK_PNMI_READ macros to copy right amount of bytes * Fix: Corrected SK_PNMI_READ macros to copy right amount of bytes
* *
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* *
* Name: skdrv2nd.h * Name: skdrv2nd.h
* Project: GEnesis, PCI Gigabit Ethernet Adapter * Project: GEnesis, PCI Gigabit Ethernet Adapter
* Version: $Revision: 1.19 $ * Version: $Revision: 1.3 $
* Date: $Date: 2003/07/07 09:53:10 $ * Date: $Date: 2003/08/12 16:51:18 $
* Purpose: Second header file for driver and all other modules * Purpose: Second header file for driver and all other modules
* *
******************************************************************************/ ******************************************************************************/
...@@ -26,6 +26,16 @@ ...@@ -26,6 +26,16 @@
* History: * History:
* *
* $Log: skdrv2nd.h,v $ * $Log: skdrv2nd.h,v $
* Revision 1.3 2003/08/12 16:51:18 mlindner
* Fix: UDP and TCP Proto checks
* Fix: UDP header offset
*
* Revision 1.2 2003/08/07 10:50:54 mlindner
* Add: Speed and HW-Csum support for Yukon Lite chipset
*
* Revision 1.1 2003/07/21 07:25:29 rroesler
* Fix: Re-Enter after CVS crash
*
* Revision 1.19 2003/07/07 09:53:10 rroesler * Revision 1.19 2003/07/07 09:53:10 rroesler
* Fix: Removed proprietary RxTx defines and used the ones from skgehw.h instead * Fix: Removed proprietary RxTx defines and used the ones from skgehw.h instead
* *
...@@ -315,12 +325,13 @@ struct s_IOCTL { ...@@ -315,12 +325,13 @@ struct s_IOCTL {
#define C_OFFSET_IPHEADER C_LEN_ETHERMAC_HEADER #define C_OFFSET_IPHEADER C_LEN_ETHERMAC_HEADER
#define C_OFFSET_IPHEADER_IPPROTO 9 #define C_OFFSET_IPHEADER_IPPROTO 9
#define C_OFFSET_TCPHEADER_TCPCS 16 #define C_OFFSET_TCPHEADER_TCPCS 16
#define C_OFFSET_UDPHEADER_UDPCS 6
#define C_OFFSET_IPPROTO ( (C_LEN_ETHERMAC_HEADER) + \ #define C_OFFSET_IPPROTO ( (C_LEN_ETHERMAC_HEADER) + \
(C_OFFSET_IPHEADER_IPPROTO) ) (C_OFFSET_IPHEADER_IPPROTO) )
#define C_PROTO_ID_UDP 6 /* refer to RFC 790 or Stevens' */ #define C_PROTO_ID_UDP 17 /* refer to RFC 790 or Stevens' */
#define C_PROTO_ID_TCP 17 /* TCP/IP illustrated for details */ #define C_PROTO_ID_TCP 6 /* TCP/IP illustrated for details */
/* TX and RX descriptors *****************************************************/ /* TX and RX descriptors *****************************************************/
...@@ -390,6 +401,7 @@ struct s_TxD { ...@@ -390,6 +401,7 @@ struct s_TxD {
typedef struct s_DevNet DEV_NET; typedef struct s_DevNet DEV_NET;
struct s_DevNet { struct s_DevNet {
struct proc_dir_entry *proc;
int PortNr; int PortNr;
int NetNr; int NetNr;
int Mtu; int Mtu;
...@@ -550,6 +562,10 @@ struct s_AC { ...@@ -550,6 +562,10 @@ struct s_AC {
/* Only for tests */ /* Only for tests */
int PortUp; int PortUp;
int PortDown; int PortDown;
int ChipsetType; /* Chipset family type
* 0 == Genesis family support
* 1 == Yukon family support
*/
}; };
......
...@@ -722,15 +722,14 @@ typedef struct s_GeInit { ...@@ -722,15 +722,14 @@ typedef struct s_GeInit {
/* /*
* Error numbers and messages for skxmac2.c and skgeinit.c * Error numbers and messages for skxmac2.c and skgeinit.c
*/ */
#define SKERR_HWI_E001 (SK_ERRBASE_HWINIT) #define SKERR_HWI_E001 (SK_ERRBASE_HWINIT)
#define SKERR_HWI_E001MSG "SkXmClrExactAddr() has got invalid parameters" #define SKERR_HWI_E001MSG "SkXmClrExactAddr() has got illegal parameters"
#define SKERR_HWI_E002 (SKERR_HWI_E001+1) #define SKERR_HWI_E002 (SKERR_HWI_E001+1)
#define SKERR_HWI_E002MSG "SkGeInit(): Level 1 call missing" #define SKERR_HWI_E002MSG "SkGeInit(): Level 1 call missing"
#define SKERR_HWI_E003 (SKERR_HWI_E002+1) #define SKERR_HWI_E003 (SKERR_HWI_E002+1)
#define SKERR_HWI_E003MSG "SkGeInit() called with invalid init Level" #define SKERR_HWI_E003MSG "SkGeInit() called with illegal init Level"
#define SKERR_HWI_E004 (SKERR_HWI_E003+1) #define SKERR_HWI_E004 (SKERR_HWI_E003+1)
#define SKERR_HWI_E004MSG "SkGeInitPort(): Queue Size invalid configured" #define SKERR_HWI_E004MSG "SkGeInitPort(): Queue Size illegal configured"
#define SKERR_HWI_E005 (SKERR_HWI_E004+1) #define SKERR_HWI_E005 (SKERR_HWI_E004+1)
#define SKERR_HWI_E005MSG "SkGeInitPort(): cannot init running ports" #define SKERR_HWI_E005MSG "SkGeInitPort(): cannot init running ports"
#define SKERR_HWI_E006 (SKERR_HWI_E005+1) #define SKERR_HWI_E006 (SKERR_HWI_E005+1)
...@@ -752,21 +751,21 @@ typedef struct s_GeInit { ...@@ -752,21 +751,21 @@ typedef struct s_GeInit {
#define SKERR_HWI_E014 (SKERR_HWI_E013+1) #define SKERR_HWI_E014 (SKERR_HWI_E013+1)
#define SKERR_HWI_E014MSG "SkGeInitPort(): unknown GIPortUsage specified" #define SKERR_HWI_E014MSG "SkGeInitPort(): unknown GIPortUsage specified"
#define SKERR_HWI_E015 (SKERR_HWI_E014+1) #define SKERR_HWI_E015 (SKERR_HWI_E014+1)
#define SKERR_HWI_E015MSG "Invalid Link mode parameter" #define SKERR_HWI_E015MSG "Illegal Link mode parameter"
#define SKERR_HWI_E016 (SKERR_HWI_E015+1) #define SKERR_HWI_E016 (SKERR_HWI_E015+1)
#define SKERR_HWI_E016MSG "Invalid Flow control mode parameter" #define SKERR_HWI_E016MSG "Illegal Flow control mode parameter"
#define SKERR_HWI_E017 (SKERR_HWI_E016+1) #define SKERR_HWI_E017 (SKERR_HWI_E016+1)
#define SKERR_HWI_E017MSG "Invalid value specified for GIPollTimerVal" #define SKERR_HWI_E017MSG "Illegal value specified for GIPollTimerVal"
#define SKERR_HWI_E018 (SKERR_HWI_E017+1) #define SKERR_HWI_E018 (SKERR_HWI_E017+1)
#define SKERR_HWI_E018MSG "FATAL: SkGeStopPort() does not terminate (Tx)" #define SKERR_HWI_E018MSG "FATAL: SkGeStopPort() does not terminate (Tx)"
#define SKERR_HWI_E019 (SKERR_HWI_E018+1) #define SKERR_HWI_E019 (SKERR_HWI_E018+1)
#define SKERR_HWI_E019MSG "Invalid Speed parameter" #define SKERR_HWI_E019MSG "Illegal Speed parameter"
#define SKERR_HWI_E020 (SKERR_HWI_E019+1) #define SKERR_HWI_E020 (SKERR_HWI_E019+1)
#define SKERR_HWI_E020MSG "Invalid Master/Slave parameter" #define SKERR_HWI_E020MSG "Illegal Master/Slave parameter"
#define SKERR_HWI_E021 (SKERR_HWI_E020+1) #define SKERR_HWI_E021 (SKERR_HWI_E020+1)
#define SKERR_HWI_E021MSG "MacUpdateStats(): cannot update statistic counter" #define SKERR_HWI_E021MSG "MacUpdateStats(): cannot update statistic counter"
#define SKERR_HWI_E022 (SKERR_HWI_E021+1) #define SKERR_HWI_E022 (SKERR_HWI_E021+1)
#define SKERR_HWI_E022MSG "MacStatistic(): invalid statistic base address" #define SKERR_HWI_E022MSG "MacStatistic(): illegal statistic base address"
#define SKERR_HWI_E023 (SKERR_HWI_E022+1) #define SKERR_HWI_E023 (SKERR_HWI_E022+1)
#define SKERR_HWI_E023MSG "SkGeInitPort(): Transmit Queue Size too small" #define SKERR_HWI_E023MSG "SkGeInitPort(): Transmit Queue Size too small"
#define SKERR_HWI_E024 (SKERR_HWI_E023+1) #define SKERR_HWI_E024 (SKERR_HWI_E023+1)
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* *
* Name: sktypes.h * Name: sktypes.h
* Project: GEnesis, PCI Gigabit Ethernet Adapter * Project: GEnesis, PCI Gigabit Ethernet Adapter
* Version: $Revision: 1.3 $ * Version: $Revision: 1.1 $
* Date: $Date: 2003/02/25 14:16:40 $ * Date: $Date: 2003/07/21 07:26:01 $
* Purpose: Define data types for Linux * Purpose: Define data types for Linux
* *
******************************************************************************/ ******************************************************************************/
...@@ -26,6 +26,9 @@ ...@@ -26,6 +26,9 @@
* History: * History:
* *
* $Log: sktypes.h,v $ * $Log: sktypes.h,v $
* Revision 1.1 2003/07/21 07:26:01 rroesler
* Fix: Re-Enter after CVS crash
*
* Revision 1.3 2003/02/25 14:16:40 mlindner * Revision 1.3 2003/02/25 14:16:40 mlindner
* Fix: Copyright statement * Fix: Copyright statement
* *
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* *
* Name: version.h * Name: version.h
* Project: GEnesis, PCI Gigabit Ethernet Adapter * Project: GEnesis, PCI Gigabit Ethernet Adapter
* Version: $Revision: 1.4 $ * Version: $Revision: 1.2 $
* Date: $Date: 2003/02/25 14:16:40 $ * Date: $Date: 2003/08/13 12:01:01 $
* Purpose: SK specific Error log support * Purpose: SK specific Error log support
* *
******************************************************************************/ ******************************************************************************/
...@@ -25,6 +25,12 @@ ...@@ -25,6 +25,12 @@
* *
* History: * History:
* $Log: skversion.h,v $ * $Log: skversion.h,v $
* Revision 1.2 2003/08/13 12:01:01 mlindner
* Add: Changes for Lint
*
* Revision 1.1 2003/07/24 09:29:56 rroesler
* Fix: Re-Enter after CVS crash
*
* Revision 1.4 2003/02/25 14:16:40 mlindner * Revision 1.4 2003/02/25 14:16:40 mlindner
* Fix: Copyright statement * Fix: Copyright statement
* *
...@@ -42,13 +48,15 @@ ...@@ -42,13 +48,15 @@
******************************************************************************/ ******************************************************************************/
#ifdef lint
static const char SysKonnectFileId[] = "@(#) (C) SysKonnect GmbH."; static const char SysKonnectFileId[] = "@(#) (C) SysKonnect GmbH.";
static const char SysKonnectBuildNumber[] = static const char SysKonnectBuildNumber[] =
"@(#)SK-BUILD: 6.14 PL: 01"; "@(#)SK-BUILD: 6.17 PL: 01";
#endif /* !defined(lint) */
#define BOOT_STRING "sk98lin: Network Device Driver v6.14\n" \ #define BOOT_STRING "sk98lin: Network Device Driver v6.17\n" \
"(C)Copyright 1999-2003 Marvell(R)." "(C)Copyright 1999-2003 Marvell(R)."
#define VER_STRING "6.14" #define VER_STRING "6.17"
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
* *
* Name: skdim.c * Name: skdim.c
* Project: GEnesis, PCI Gigabit Ethernet Adapter * Project: GEnesis, PCI Gigabit Ethernet Adapter
* Version: $Revision: 1.4 $ * Version: $Revision: 1.2 $
* Date: $Date: 2003/07/07 09:45:47 $ * Date: $Date: 2003/08/21 12:35:05 $
* Purpose: All functions to maintain interrupt moderation * Purpose: All functions to maintain interrupt moderation
* *
******************************************************************************/ ******************************************************************************/
...@@ -26,6 +26,12 @@ ...@@ -26,6 +26,12 @@
* History: * History:
* *
* $Log: skdim.c,v $ * $Log: skdim.c,v $
* Revision 1.2 2003/08/21 12:35:05 mlindner
* Fix: Corrected CPU detection and compile errors on single CPU machines
*
* Revision 1.1 2003/07/18 13:39:55 rroesler
* Fix: Re-enter after CVS crash
*
* Revision 1.4 2003/07/07 09:45:47 rroesler * Revision 1.4 2003/07/07 09:45:47 rroesler
* Fix: Compiler warnings corrected * Fix: Compiler warnings corrected
* *
...@@ -56,7 +62,7 @@ ...@@ -56,7 +62,7 @@
#ifndef lint #ifndef lint
static const char SysKonnectFileId[] = static const char SysKonnectFileId[] =
"@(#) $Id: skdim.c,v 1.4 2003/07/07 09:45:47 rroesler Exp $ (C) SysKonnect."; "@(#) $Id: skdim.c,v 1.2 2003/08/21 12:35:05 mlindner Exp $ (C) SysKonnect.";
#endif #endif
#define __SKADDR_C #define __SKADDR_C
...@@ -312,6 +318,12 @@ GetCurrentSystemLoad(SK_AC *pAC) { ...@@ -312,6 +318,12 @@ GetCurrentSystemLoad(SK_AC *pAC) {
unsigned int TotalTime = 0; unsigned int TotalTime = 0;
unsigned int UsedTime = 0; unsigned int UsedTime = 0;
unsigned int SystemLoad = 0; unsigned int SystemLoad = 0;
#ifdef CONFIG_SMP
unsigned int SKNumCpus = smp_num_cpus;
#else
unsigned int SKNumCpus = 1;
#endif
/* unsigned int NbrCpu = 0; */ /* unsigned int NbrCpu = 0; */
/* /*
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment