Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
s2io.c File Reference
#include <linux/module.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/ioport.h>
#include <linux/pci.h>
#include <linux/dma-mapping.h>
#include <linux/kernel.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/mdio.h>
#include <linux/skbuff.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/stddef.h>
#include <linux/ioctl.h>
#include <linux/timex.h>
#include <linux/ethtool.h>
#include <linux/workqueue.h>
#include <linux/if_vlan.h>
#include <linux/ip.h>
#include <linux/tcp.h>
#include <linux/uaccess.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <linux/prefetch.h>
#include <net/tcp.h>
#include <asm/div64.h>
#include <asm/irq.h>
#include "s2io.h"
#include "s2io-regs.h"

Go to the source code of this file.

Macros

#define pr_fmt(fmt)   KBUILD_MODNAME ": " fmt
 
#define DRV_VERSION   "2.0.26.28"
 
#define CARDS_WITH_FAULTY_LINK_INDICATORS(dev_type, subid)
 
#define LINK_IS_UP(val64)
 
#define S2IO_XENA_STAT_LEN   ARRAY_SIZE(ethtool_xena_stats_keys)
 
#define S2IO_ENHANCED_STAT_LEN   ARRAY_SIZE(ethtool_enhanced_stats_keys)
 
#define S2IO_DRIVER_STAT_LEN   ARRAY_SIZE(ethtool_driver_stats_keys)
 
#define XFRAME_I_STAT_LEN   (S2IO_XENA_STAT_LEN + S2IO_DRIVER_STAT_LEN)
 
#define XFRAME_II_STAT_LEN   (XFRAME_I_STAT_LEN + S2IO_ENHANCED_STAT_LEN)
 
#define XFRAME_I_STAT_STRINGS_LEN   (XFRAME_I_STAT_LEN * ETH_GSTRING_LEN)
 
#define XFRAME_II_STAT_STRINGS_LEN   (XFRAME_II_STAT_LEN * ETH_GSTRING_LEN)
 
#define S2IO_TEST_LEN   ARRAY_SIZE(s2io_gstrings)
 
#define S2IO_STRINGS_LEN   (S2IO_TEST_LEN * ETH_GSTRING_LEN)
 
#define S2IO_TIMER_CONF(timer, handle, arg, exp)
 
#define END_SIGN   0x0
 
#define TXD_MEM_PAGE_CNT(len, per_each)   ((len+per_each - 1) / per_each)
 
#define NEC_VENID   0x1033
 
#define NEC_DEVID   0x0125
 
#define LINK_UP_DOWN_INTERRUPT   1
 
#define MAC_RMAC_ERR_TIMER   2
 
#define S2IO_DEV_ID   5
 

Functions

 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION (DRV_VERSION)
 
 S2IO_PARM_INT (tx_fifo_num, FIFO_DEFAULT_NUM)
 
 S2IO_PARM_INT (rx_ring_num, 1)
 
 S2IO_PARM_INT (multiq, 0)
 
 S2IO_PARM_INT (rx_ring_mode, 1)
 
 S2IO_PARM_INT (use_continuous_tx_intrs, 1)
 
 S2IO_PARM_INT (rmac_pause_time, 0x100)
 
 S2IO_PARM_INT (mc_pause_threshold_q0q3, 187)
 
 S2IO_PARM_INT (mc_pause_threshold_q4q7, 187)
 
 S2IO_PARM_INT (shared_splits, 0)
 
 S2IO_PARM_INT (tmac_util_period, 5)
 
 S2IO_PARM_INT (rmac_util_period, 5)
 
 S2IO_PARM_INT (l3l4hdr_size, 128)
 
 S2IO_PARM_INT (tx_steering_type, TX_DEFAULT_STEERING)
 
 S2IO_PARM_INT (rxsync_frequency, 3)
 
 S2IO_PARM_INT (intr_type, 2)
 
 S2IO_PARM_INT (lro_max_pkts, 0xFFFF)
 
 S2IO_PARM_INT (indicate_max_pkts, 0)
 
 S2IO_PARM_INT (napi, 1)
 
 S2IO_PARM_INT (ufo, 0)
 
 S2IO_PARM_INT (vlan_tag_strip, NO_STRIP_IN_PROMISC)
 
 module_param_array (tx_fifo_len, uint, NULL, 0)
 
 module_param_array (rx_ring_sz, uint, NULL, 0)
 
 module_param_array (rts_frm_len, uint, NULL, 0)
 
 MODULE_DEVICE_TABLE (pci, s2io_tbl)
 
 module_init (s2io_starter)
 
 module_exit (s2io_closer)
 

Macro Definition Documentation

#define CARDS_WITH_FAULTY_LINK_INDICATORS (   dev_type,
  subid 
)
Value:
((((subid >= 0x600B) && (subid <= 0x600D)) || \
((subid >= 0x640B) && (subid <= 0x640D))) ? 1 : 0) : 0

Definition at line 115 of file s2io.c.

#define DRV_VERSION   "2.0.26.28"

Definition at line 91 of file s2io.c.

#define END_SIGN   0x0

Definition at line 363 of file s2io.c.

#define LINK_IS_UP (   val64)
Value:
ADAPTER_STATUS_RMAC_LOCAL_FAULT)))

Definition at line 120 of file s2io.c.

#define LINK_UP_DOWN_INTERRUPT   1

Definition at line 1832 of file s2io.c.

#define MAC_RMAC_ERR_TIMER   2

Definition at line 1833 of file s2io.c.

#define NEC_DEVID   0x0125

Definition at line 1039 of file s2io.c.

#define NEC_VENID   0x1033

Definition at line 1038 of file s2io.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME ": " fmt

Definition at line 55 of file s2io.c.

#define S2IO_DEV_ID   5

read_eeprom - reads 4 bytes of data from user given offset. : private member of the device structure, which is a pointer to the s2io_nic structure. : offset at which the data must be written : Its an output parameter where the data read at the given offset is stored. Description: Will read 4 bytes of data from the user given offset and return the read data. NOTE: Will allow to read only part of the EEPROM visible through the I2C bus. Return value: -1 on failure and 0 on success.

Definition at line 5608 of file s2io.c.

#define S2IO_DRIVER_STAT_LEN   ARRAY_SIZE(ethtool_driver_stats_keys)

Definition at line 330 of file s2io.c.

#define S2IO_ENHANCED_STAT_LEN   ARRAY_SIZE(ethtool_enhanced_stats_keys)

Definition at line 329 of file s2io.c.

#define S2IO_STRINGS_LEN   (S2IO_TEST_LEN * ETH_GSTRING_LEN)

Definition at line 339 of file s2io.c.

#define S2IO_TEST_LEN   ARRAY_SIZE(s2io_gstrings)

Definition at line 338 of file s2io.c.

#define S2IO_TIMER_CONF (   timer,
  handle,
  arg,
  exp 
)
Value:
timer.function = handle; \
timer.data = (unsigned long)arg; \
mod_timer(&timer, (jiffies + exp)) \

Definition at line 341 of file s2io.c.

#define S2IO_XENA_STAT_LEN   ARRAY_SIZE(ethtool_xena_stats_keys)

Definition at line 328 of file s2io.c.

#define TXD_MEM_PAGE_CNT (   len,
  per_each 
)    ((len+per_each - 1) / per_each)

Definition at line 502 of file s2io.c.

#define XFRAME_I_STAT_LEN   (S2IO_XENA_STAT_LEN + S2IO_DRIVER_STAT_LEN)

Definition at line 332 of file s2io.c.

#define XFRAME_I_STAT_STRINGS_LEN   (XFRAME_I_STAT_LEN * ETH_GSTRING_LEN)

Definition at line 335 of file s2io.c.

#define XFRAME_II_STAT_LEN   (XFRAME_I_STAT_LEN + S2IO_ENHANCED_STAT_LEN)

Definition at line 333 of file s2io.c.

#define XFRAME_II_STAT_STRINGS_LEN   (XFRAME_II_STAT_LEN * ETH_GSTRING_LEN)

Definition at line 336 of file s2io.c.

Function Documentation

MODULE_DEVICE_TABLE ( pci  ,
s2io_tbl   
)
module_exit ( s2io_closer  )
module_init ( s2io_starter  )
MODULE_LICENSE ( "GPL"  )
module_param_array ( tx_fifo_len  ,
uint  ,
NULL  ,
 
)
module_param_array ( rx_ring_sz  ,
uint  ,
NULL  ,
 
)
module_param_array ( rts_frm_len  ,
uint  ,
NULL  ,
 
)
MODULE_VERSION ( DRV_VERSION  )
S2IO_PARM_INT ( tx_fifo_num  ,
FIFO_DEFAULT_NUM   
)
S2IO_PARM_INT ( rx_ring_num  ,
 
)
S2IO_PARM_INT ( multiq  ,
 
)
S2IO_PARM_INT ( rx_ring_mode  ,
 
)
S2IO_PARM_INT ( use_continuous_tx_intrs  ,
 
)
S2IO_PARM_INT ( rmac_pause_time  ,
0x100   
)
S2IO_PARM_INT ( mc_pause_threshold_q0q3  ,
187   
)
S2IO_PARM_INT ( mc_pause_threshold_q4q7  ,
187   
)
S2IO_PARM_INT ( shared_splits  ,
 
)
S2IO_PARM_INT ( tmac_util_period  ,
 
)
S2IO_PARM_INT ( rmac_util_period  ,
 
)
S2IO_PARM_INT ( l3l4hdr_size  ,
128   
)
S2IO_PARM_INT ( tx_steering_type  ,
TX_DEFAULT_STEERING   
)
S2IO_PARM_INT ( rxsync_frequency  ,
 
)
S2IO_PARM_INT ( intr_type  ,
 
)
S2IO_PARM_INT ( lro_max_pkts  ,
0xFFFF   
)
S2IO_PARM_INT ( indicate_max_pkts  ,
 
)
S2IO_PARM_INT ( napi  ,
 
)
S2IO_PARM_INT ( ufo  ,
 
)
S2IO_PARM_INT ( vlan_tag_strip  ,
NO_STRIP_IN_PROMISC   
)