Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
atl2.c File Reference
#include <linux/atomic.h>
#include <linux/crc32.h>
#include <linux/dma-mapping.h>
#include <linux/etherdevice.h>
#include <linux/ethtool.h>
#include <linux/hardirq.h>
#include <linux/if_vlan.h>
#include <linux/in.h>
#include <linux/interrupt.h>
#include <linux/ip.h>
#include <linux/irqflags.h>
#include <linux/irqreturn.h>
#include <linux/mii.h>
#include <linux/net.h>
#include <linux/netdevice.h>
#include <linux/pci.h>
#include <linux/pci_ids.h>
#include <linux/pm.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/string.h>
#include <linux/tcp.h>
#include <linux/timer.h>
#include <linux/types.h>
#include <linux/workqueue.h>
#include "atl2.h"

Go to the source code of this file.

Data Structures

struct  atl2_option
 

Macros

#define ATL2_DRV_VERSION   "2.2.3"
 
#define MY_ADV_MASK
 
#define ATL2_REGS_LEN   42
 
#define LBYTESWAP(a)
 
#define LONGSWAP(a)   ((LBYTESWAP(a) << 16) | (LBYTESWAP(a) >> 16))
 
#define SHORTSWAP(a)   (((a) << 8) | ((a) >> 8))
 
#define CUSTOM_SPI_CS_SETUP   2
 
#define CUSTOM_SPI_CLK_HI   2
 
#define CUSTOM_SPI_CLK_LO   2
 
#define CUSTOM_SPI_CS_HOLD   2
 
#define CUSTOM_SPI_CS_HI   3
 
#define ATL2_MAX_NIC   4
 
#define OPTION_UNSET   -1
 
#define OPTION_DISABLED   0
 
#define OPTION_ENABLED   1
 
#define ATL2_PARAM_INIT   {[0 ... ATL2_MAX_NIC] = OPTION_UNSET}
 
#define ATL2_PARAM(X, desc)
 
#define ATL2_MIN_TX_MEMSIZE   4 /* 4KB */
 
#define ATL2_MAX_TX_MEMSIZE   64 /* 64KB */
 
#define ATL2_DEFAULT_TX_MEMSIZE   8 /* 8KB */
 
#define ATL2_MIN_RXD_COUNT   16
 
#define ATL2_MAX_RXD_COUNT   512
 
#define ATL2_DEFAULT_RXD_COUNT   64
 
#define INT_MOD_DEFAULT_CNT   100 /* 200us */
 
#define INT_MOD_MAX_CNT   65000
 
#define INT_MOD_MIN_CNT   50
 
#define AUTONEG_ADV_DEFAULT   0x2F
 
#define AUTONEG_ADV_MASK   0x2F
 
#define FLOW_CONTROL_DEFAULT   FLOW_CONTROL_FULL
 
#define FLASH_VENDOR_DEFAULT   0
 
#define FLASH_VENDOR_MIN   0
 
#define FLASH_VENDOR_MAX   2
 

Functions

 MODULE_AUTHOR ("Atheros Corporation <[email protected]>, Chris Snook <[email protected]>")
 
 MODULE_DESCRIPTION ("Atheros Fast Ethernet Network Driver")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION (ATL2_DRV_VERSION)
 
 MODULE_DEVICE_TABLE (pci, atl2_pci_tbl)
 
 module_init (atl2_init_module)
 
 module_exit (atl2_exit_module)
 
 ATL2_PARAM (TxMemSize,"Bytes of Transmit Memory")
 
 ATL2_PARAM (RxMemBlock,"Number of receive memory block")
 
 ATL2_PARAM (MediaType,"MediaType Select")
 
 ATL2_PARAM (IntModTimer,"Interrupt Moderator Timer")
 
 ATL2_PARAM (FlashVendor,"SPI Flash Vendor")
 

Macro Definition Documentation

#define ATL2_DEFAULT_RXD_COUNT   64

Definition at line 2876 of file atl2.c.

#define ATL2_DEFAULT_TX_MEMSIZE   8 /* 8KB */

Definition at line 2866 of file atl2.c.

#define ATL2_DRV_VERSION   "2.2.3"

Definition at line 52 of file atl2.c.

#define ATL2_MAX_NIC   4

Definition at line 2825 of file atl2.c.

#define ATL2_MAX_RXD_COUNT   512

Definition at line 2875 of file atl2.c.

#define ATL2_MAX_TX_MEMSIZE   64 /* 64KB */

Definition at line 2865 of file atl2.c.

#define ATL2_MIN_RXD_COUNT   16

Definition at line 2874 of file atl2.c.

#define ATL2_MIN_TX_MEMSIZE   4 /* 4KB */

Definition at line 2864 of file atl2.c.

#define ATL2_PARAM (   X,
  desc 
)
Value:
static const int __devinitconst X[ATL2_MAX_NIC + 1] = ATL2_PARAM_INIT; \
MODULE_PARM(X, "1-" __MODULE_STRING(ATL2_MAX_NIC) "i"); \
MODULE_PARM_DESC(X, desc);

Definition at line 2847 of file atl2.c.

#define ATL2_PARAM_INIT   {[0 ... ATL2_MAX_NIC] = OPTION_UNSET}

Definition at line 2835 of file atl2.c.

#define ATL2_REGS_LEN   42
#define AUTONEG_ADV_DEFAULT   0x2F

Definition at line 2912 of file atl2.c.

#define AUTONEG_ADV_MASK   0x2F

Definition at line 2913 of file atl2.c.

#define CUSTOM_SPI_CLK_HI   2

Definition at line 2183 of file atl2.c.

#define CUSTOM_SPI_CLK_LO   2

Definition at line 2184 of file atl2.c.

#define CUSTOM_SPI_CS_HI   3

Definition at line 2186 of file atl2.c.

#define CUSTOM_SPI_CS_HOLD   2

Definition at line 2185 of file atl2.c.

#define CUSTOM_SPI_CS_SETUP   2

Definition at line 2182 of file atl2.c.

#define FLASH_VENDOR_DEFAULT   0

Definition at line 2916 of file atl2.c.

#define FLASH_VENDOR_MAX   2

Definition at line 2918 of file atl2.c.

#define FLASH_VENDOR_MIN   0

Definition at line 2917 of file atl2.c.

#define FLOW_CONTROL_DEFAULT   FLOW_CONTROL_FULL

Definition at line 2914 of file atl2.c.

#define INT_MOD_DEFAULT_CNT   100 /* 200us */

Definition at line 2898 of file atl2.c.

#define INT_MOD_MAX_CNT   65000

Definition at line 2899 of file atl2.c.

#define INT_MOD_MIN_CNT   50

Definition at line 2900 of file atl2.c.

#define LBYTESWAP (   a)
Value:
((((a) & 0x00ff00ff) << 8) | \
(((a) & 0xff00ff00) >> 8))

Definition at line 2124 of file atl2.c.

#define LONGSWAP (   a)    ((LBYTESWAP(a) << 16) | (LBYTESWAP(a) >> 16))

Definition at line 2126 of file atl2.c.

#define MY_ADV_MASK
Value:
ADVERTISE_10_FULL | \
ADVERTISE_100_HALF| \
ADVERTISE_100_FULL)
#define OPTION_DISABLED   0

Definition at line 2828 of file atl2.c.

#define OPTION_ENABLED   1

Definition at line 2829 of file atl2.c.

#define OPTION_UNSET   -1

Definition at line 2827 of file atl2.c.

#define SHORTSWAP (   a)    (((a) << 8) | ((a) >> 8))

Definition at line 2127 of file atl2.c.

Function Documentation

ATL2_PARAM ( TxMemSize  ,
"Bytes of Transmit Memory  
)
ATL2_PARAM ( RxMemBlock  ,
"Number of receive memory block  
)
ATL2_PARAM ( MediaType  ,
"MediaType Select"   
)
ATL2_PARAM ( IntModTimer  ,
"Interrupt Moderator Timer  
)
ATL2_PARAM ( FlashVendor  ,
"SPI Flash Vendor"   
)
MODULE_AUTHOR ( "Atheros Corporation <[email protected] ,
Chris Snook< csnook @redhat.com >"   
)
MODULE_DESCRIPTION ( "Atheros Fast Ethernet Network Driver"  )
MODULE_DEVICE_TABLE ( pci  ,
atl2_pci_tbl   
)
module_exit ( atl2_exit_module  )
module_init ( atl2_init_module  )
MODULE_LICENSE ( "GPL"  )
MODULE_VERSION ( ATL2_DRV_VERSION  )