* Name: skge.c
* Project: GEnesis, PCI Gigabit Ethernet Adapter
* Version: $Revision: 1.46 $
- * Date: $Date: 2003/02/25 14:16:36 $
+ * Date: $Date: 2003/02/25 14:16:36 $
* Purpose: The main driver source module
*
******************************************************************************/
#if 0
#include <linux/module.h>
#include <linux/init.h>
-#include <linux/proc_fs.h>
+#include <linux/proc_fs.h>
#endif
#include "h/skdrv1st.h"
#include "h/skdrv2nd.h"
/*****************************************************************************
*
- * skge_probe - find all SK-98xx adapters
+ * skge_probe - find all SK-98xx adapters
*
* Description:
* This function scans the PCI bus for SK-98xx adapters. Resources for
dev->set_mac_address = &SkGeSetMacAddr;
dev->do_ioctl = &SkGeIoctl;
dev->change_mtu = &SkGeChangeMtu;
- dev->flags &= ~IFF_RUNNING;
+ dev->flags &= ~IFF_RUNNING;
#endif
#ifdef SK_ZEROCOPY
dev->set_mac_address = &SkGeSetMacAddr;
dev->do_ioctl = &SkGeIoctl;
dev->change_mtu = &SkGeChangeMtu;
- dev->flags &= ~IFF_RUNNING;
+ dev->flags &= ~IFF_RUNNING;
#endif
#ifdef SK_ZEROCOPY
/*****************************************************************************
*
- * FreeResources - release resources allocated for adapter
+ * FreeResources - release resources allocated for adapter
*
* Description:
* This function releases the IRQ, unmaps the IO and
/*****************************************************************************
*
- * skge_init_module - module initialization function
+ * skge_init_module - module initialization function
*
* Description:
* Very simple, only call skge_probe and return approriate result.
/*****************************************************************************
*
- * skge_cleanup_module - module unload function
+ * skge_cleanup_module - module unload function
*
* Description:
* Disable adapter if it is still running, free resources,
/*****************************************************************************
*
- * SkGeBoardInit - do level 0 and 1 initialization
+ * SkGeBoardInit - do level 0 and 1 initialization
*
* Description:
* This function prepares the board hardware for running. The desriptor
/*****************************************************************************
*
- * BoardAllocMem - allocate the memory for the descriptor rings
+ * BoardAllocMem - allocate the memory for the descriptor rings
*
* Description:
* This function allocates the memory for all descriptor rings.
/*****************************************************************************
*
- * BoardInitMem - initiate the descriptor rings
+ * BoardInitMem - initiate the descriptor rings
*
* Description:
* This function sets the descriptor rings up in memory.
/*****************************************************************************
*
- * SetupRing - create one descriptor ring
+ * SetupRing - create one descriptor ring
*
* Description:
* This function creates one descriptor ring in the given memory area.
/*****************************************************************************
*
- * PortReInitBmu - re-initiate the descriptor rings for one port
+ * PortReInitBmu - re-initiate the descriptor rings for one port
*
* Description:
* This function reinitializes the descriptor rings of one port
/*****************************************************************************
*
- * SkGeXmit - Linux frame transmit function
+ * SkGeXmit - Linux frame transmit function
*
* Description:
* The system calls this function to send frames onto the wire.
/*****************************************************************************
*
- * XmitFrame - fill one socket buffer into the transmit ring
+ * XmitFrame - fill one socket buffer into the transmit ring
*
* Description:
* This function puts a message into the transmit descriptor ring
* < 0 - on failure: other problems ( -> return failure to upper layers)
*/
static int XmitFrame(
-SK_AC *pAC, /* pointer to adapter context */
+SK_AC *pAC, /* pointer to adapter context */
TX_PORT *pTxPort, /* pointer to struct of port to send to */
struct sk_buff *pMessage) /* pointer to send-message */
{
/*****************************************************************************
*
- * XmitFrameSG - fill one socket buffer into the transmit ring
+ * XmitFrameSG - fill one socket buffer into the transmit ring
* (use SG and TCP/UDP hardware checksumming)
*
* Description:
*/
#if 0
static int XmitFrameSG(
-SK_AC *pAC, /* pointer to adapter context */
+SK_AC *pAC, /* pointer to adapter context */
TX_PORT *pTxPort, /* pointer to struct of port to send to */
struct sk_buff *pMessage) /* pointer to send-message */
{
- int i;
+ int i;
int BytesSend;
int hlength;
int protocol;
/*****************************************************************************
*
- * FreeTxDescriptors - release descriptors from the descriptor ring
+ * FreeTxDescriptors - release descriptors from the descriptor ring
*
* Description:
* This function releases descriptors from a transmit ring if they
/*****************************************************************************
*
- * FillRxRing - fill the receive ring with valid descriptors
+ * FillRxRing - fill the receive ring with valid descriptors
*
* Description:
* This function fills the receive ring descriptors with data
/*****************************************************************************
*
- * FillRxDescriptor - fill one buffer into the receive ring
+ * FillRxDescriptor - fill one buffer into the receive ring
*
* Description:
* The function allocates a new receive buffer and
/*****************************************************************************
*
- * ReQueueRxBuffer - fill one buffer back into the receive ring
+ * ReQueueRxBuffer - fill one buffer back into the receive ring
*
* Description:
* Fill a given buffer back into the rx ring. The buffer
/*****************************************************************************
*
- * ReceiveIrq - handle a receive IRQ
+ * ReceiveIrq - handle a receive IRQ
*
* Description:
* This function is called when a receive IRQ is set.
unsigned int ForRlmt;
SK_BOOL IsBc;
SK_BOOL IsMc;
-SK_BOOL IsBadFrame; /* Bad frame */
+SK_BOOL IsBadFrame; /* Bad frame */
SK_U32 FrameStat;
unsigned short Csum1;
/*****************************************************************************
*
- * ClearAndStartRx - give a start receive command to BMU, clear IRQ
+ * ClearAndStartRx - give a start receive command to BMU, clear IRQ
*
* Description:
* This function sends a start command and a clear interrupt
/*****************************************************************************
*
- * ClearTxIrq - give a clear transmit IRQ command to BMU
+ * ClearTxIrq - give a clear transmit IRQ command to BMU
*
* Description:
* This function sends a clear tx IRQ command for one
/*****************************************************************************
*
- * ClearRxRing - remove all buffers from the receive ring
+ * ClearRxRing - remove all buffers from the receive ring
*
* Description:
* This function removes all receive buffers from the ring.
#if 0
/*****************************************************************************
*
- * SetQueueSizes - configure the sizes of rx and tx queues
+ * SetQueueSizes - configure the sizes of rx and tx queues
*
* Description:
* This function assigns the sizes for active and passive port
/*****************************************************************************
*
- * SkGeSetMacAddr - Set the hardware MAC address
+ * SkGeSetMacAddr - Set the hardware MAC address
*
* Description:
* This function sets the MAC address used by the adapter.
/*****************************************************************************
*
- * SkGeSetRxMode - set receive mode
+ * SkGeSetRxMode - set receive mode
*
* Description:
* This function sets the receive mode of an adapter. The adapter
/*****************************************************************************
*
- * SkGeChangeMtu - set the MTU to another value
+ * SkGeChangeMtu - set the MTU to another value
*
* Description:
* This function sets is called whenever the MTU size is changed
SK_AC *pAC;
unsigned long Flags;
int i;
-SK_EVPARA EvPara;
+SK_EVPARA EvPara;
SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,
("SkGeChangeMtu starts now...\n"));
/*****************************************************************************
*
- * SkGeStats - return ethernet device statistics
+ * SkGeStats - return ethernet device statistics
*
* Description:
* This function return statistic data about the ethernet device
/*****************************************************************************
*
- * SkGeIoctl - IO-control function
+ * SkGeIoctl - IO-control function
*
* Description:
* This function is called if an ioctl is issued on the device.
/*****************************************************************************
*
- * SkGeIocMib - handle a GetMib, SetMib- or PresetMib-ioctl message
+ * SkGeIocMib - handle a GetMib, SetMib- or PresetMib-ioctl message
*
* Description:
* This function reads/writes the MIB data using PNMI (Private Network
/*****************************************************************************
*
- * GetConfiguration - read configuration information
+ * GetConfiguration - read configuration information
*
* Description:
* This function reads per-adapter configuration information from
/* settings for port A */
/* settings link speed */
- LinkSpeed = SK_LSPEED_AUTO; /* default: do auto select */
+ LinkSpeed = SK_LSPEED_AUTO; /* default: do auto select */
if (Speed_A != NULL && pAC->Index<SK_MAX_CARD_PARAM &&
Speed_A[pAC->Index] != NULL) {
if (strcmp(Speed_A[pAC->Index],"")==0) {
/* settings for port B */
/* settings link speed */
- LinkSpeed = SK_LSPEED_AUTO; /* default: do auto select */
+ LinkSpeed = SK_LSPEED_AUTO; /* default: do auto select */
if (Speed_B != NULL && pAC->Index<SK_MAX_CARD_PARAM &&
Speed_B[pAC->Index] != NULL) {
if (strcmp(Speed_B[pAC->Index],"")==0) {
/*****************************************************************************
*
- * ProductStr - return a adapter identification string from vpd
+ * ProductStr - return a adapter identification string from vpd
*
* Description:
* This function reads the product name string from the vpd area