Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
via-velocity.c File Reference
#include <linux/module.h>
#include <linux/types.h>
#include <linux/bitops.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/errno.h>
#include <linux/ioport.h>
#include <linux/pci.h>
#include <linux/kernel.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/delay.h>
#include <linux/timer.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/string.h>
#include <linux/wait.h>
#include <linux/io.h>
#include <linux/if.h>
#include <linux/uaccess.h>
#include <linux/proc_fs.h>
#include <linux/inetdevice.h>
#include <linux/reboot.h>
#include <linux/ethtool.h>
#include <linux/mii.h>
#include <linux/in.h>
#include <linux/if_arp.h>
#include <linux/if_vlan.h>
#include <linux/ip.h>
#include <linux/tcp.h>
#include <linux/udp.h>
#include <linux/crc-ccitt.h>
#include <linux/crc32.h>
#include "via-velocity.h"

Go to the source code of this file.

Macros

#define VELOCITY_PARAM(N, D)
 
#define RX_DESC_MIN   64
 
#define RX_DESC_MAX   255
 
#define RX_DESC_DEF   64
 
#define TX_DESC_MIN   16
 
#define TX_DESC_MAX   256
 
#define TX_DESC_DEF   64
 
#define RX_THRESH_MIN   0
 
#define RX_THRESH_MAX   3
 
#define RX_THRESH_DEF   0
 
#define DMA_LENGTH_MIN   0
 
#define DMA_LENGTH_MAX   7
 
#define DMA_LENGTH_DEF   6
 
#define IP_ALIG_DEF   0
 
#define FLOW_CNTL_DEF   1
 
#define FLOW_CNTL_MIN   1
 
#define FLOW_CNTL_MAX   5
 
#define MED_LNK_DEF   0
 
#define MED_LNK_MIN   0
 
#define MED_LNK_MAX   5
 
#define VAL_PKT_LEN_DEF   0
 
#define WOL_OPT_DEF   0
 
#define WOL_OPT_MIN   0
 
#define WOL_OPT_MAX   7
 

Functions

 MODULE_AUTHOR ("VIA Networking Technologies, Inc.")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DESCRIPTION ("VIA Networking Velocity Family Gigabit Ethernet Adapter Driver")
 
 VELOCITY_PARAM (RxDescriptors,"Number of receive descriptors")
 
 VELOCITY_PARAM (TxDescriptors,"Number of transmit descriptors")
 
 VELOCITY_PARAM (rx_thresh,"Receive fifo threshold")
 
 VELOCITY_PARAM (DMA_length,"DMA length")
 
 VELOCITY_PARAM (IP_byte_align,"Enable IP header dword aligned")
 
 VELOCITY_PARAM (flow_control,"Enable flow control ability")
 
 VELOCITY_PARAM (speed_duplex,"Setting the speed and duplex mode")
 
 VELOCITY_PARAM (ValPktLen,"Receiving or Drop invalid 802.3 frame")
 
 VELOCITY_PARAM (wol_opts,"Wake On Lan options")
 
 module_param (rx_copybreak, int, 0644)
 
 MODULE_PARM_DESC (rx_copybreak,"Copy breakpoint for copy-only-tiny-frames")
 
 MODULE_DEVICE_TABLE (pci, velocity_id_table)
 

: property name

: device name

Set a boolean property in the module options. This function does all the verification and checking as well as reporting so that we don't duplicate code for each option.

#define velocity_register_notifier()   do {} while (0)
 
#define velocity_unregister_notifier()   do {} while (0)
 
 module_init (velocity_init_module)
 
 module_exit (velocity_cleanup_module)
 

Macro Definition Documentation

#define DMA_LENGTH_DEF   6

Definition at line 276 of file via-velocity.c.

#define DMA_LENGTH_MAX   7

Definition at line 275 of file via-velocity.c.

#define DMA_LENGTH_MIN   0

Definition at line 274 of file via-velocity.c.

#define FLOW_CNTL_DEF   1

Definition at line 299 of file via-velocity.c.

#define FLOW_CNTL_MAX   5

Definition at line 301 of file via-velocity.c.

#define FLOW_CNTL_MIN   1

Definition at line 300 of file via-velocity.c.

#define IP_ALIG_DEF   0

Definition at line 290 of file via-velocity.c.

#define MED_LNK_DEF   0

Definition at line 312 of file via-velocity.c.

#define MED_LNK_MAX   5

Definition at line 314 of file via-velocity.c.

#define MED_LNK_MIN   0

Definition at line 313 of file via-velocity.c.

#define RX_DESC_DEF   64

Definition at line 255 of file via-velocity.c.

#define RX_DESC_MAX   255

Definition at line 254 of file via-velocity.c.

#define RX_DESC_MIN   64

Definition at line 253 of file via-velocity.c.

#define RX_THRESH_DEF   0

Definition at line 265 of file via-velocity.c.

#define RX_THRESH_MAX   3

Definition at line 264 of file via-velocity.c.

#define RX_THRESH_MIN   0

Definition at line 263 of file via-velocity.c.

#define TX_DESC_DEF   64

Definition at line 260 of file via-velocity.c.

#define TX_DESC_MAX   256

Definition at line 259 of file via-velocity.c.

#define TX_DESC_MIN   16

Definition at line 258 of file via-velocity.c.

#define VAL_PKT_LEN_DEF   0

Definition at line 329 of file via-velocity.c.

#define VELOCITY_PARAM (   N,
  D 
)
Value:
static int N[MAX_UNITS] = OPTION_DEFAULT;\
module_param_array(N, int, NULL, 0); \
MODULE_PARM_DESC(N, D);

Definition at line 248 of file via-velocity.c.

#define velocity_register_notifier ( )    do {} while (0)

Definition at line 3542 of file via-velocity.c.

#define velocity_unregister_notifier ( )    do {} while (0)

Definition at line 3543 of file via-velocity.c.

#define WOL_OPT_DEF   0

Definition at line 336 of file via-velocity.c.

#define WOL_OPT_MAX   7

Definition at line 338 of file via-velocity.c.

#define WOL_OPT_MIN   0

Definition at line 337 of file via-velocity.c.

Function Documentation

MODULE_AUTHOR ( "VIA Networking  Technologies,
Inc."   
)
MODULE_DESCRIPTION ( "VIA Networking Velocity Family Gigabit Ethernet Adapter Driver"  )
MODULE_DEVICE_TABLE ( pci  ,
velocity_id_table   
)
module_exit ( velocity_cleanup_module  )
module_init ( velocity_init_module  )
MODULE_LICENSE ( "GPL"  )
module_param ( rx_copybreak  ,
int  ,
0644   
)
MODULE_PARM_DESC ( rx_copybreak  ,
"Copy breakpoint for copy-only-tiny-frames"   
)
VELOCITY_PARAM ( RxDescriptors  ,
"Number of receive descriptors  
)
VELOCITY_PARAM ( TxDescriptors  ,
"Number of transmit descriptors  
)
VELOCITY_PARAM ( rx_thresh  ,
"Receive fifo threshold  
)
VELOCITY_PARAM ( DMA_length  ,
"DMA length  
)
VELOCITY_PARAM ( IP_byte_align  ,
"Enable IP header dword aligned  
)
VELOCITY_PARAM ( flow_control  ,
"Enable flow control ability"   
)
VELOCITY_PARAM ( speed_duplex  ,
"Setting the speed and duplex mode  
)
VELOCITY_PARAM ( ValPktLen  ,
"Receiving or Drop invalid 802.3 frame  
)
VELOCITY_PARAM ( wol_opts  ,
"Wake On Lan options  
)