Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
acenic.c File Reference
#include <linux/module.h>
#include <linux/moduleparam.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/skbuff.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/mm.h>
#include <linux/highmem.h>
#include <linux/sockios.h>
#include <linux/firmware.h>
#include <linux/slab.h>
#include <linux/prefetch.h>
#include <linux/if_vlan.h>
#include <net/sock.h>
#include <net/ip.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/byteorder.h>
#include <asm/uaccess.h>
#include "acenic.h"

Go to the source code of this file.

Macros

#define DRV_NAME   "acenic"
 
#define ACE_IS_TIGON_I(ap)   (ap->version == 1)
 
#define ACE_TX_RING_ENTRIES(ap)   ap->tx_ring_entries
 
#define PCI_VENDOR_ID_ALTEON   0x12ae
 
#define PCI_DEVICE_ID_ALTEON_ACENIC_FIBRE   0x0001
 
#define PCI_DEVICE_ID_ALTEON_ACENIC_COPPER   0x0002
 
#define PCI_DEVICE_ID_3COM_3C985   0x0001
 
#define PCI_VENDOR_ID_NETGEAR   0x1385
 
#define PCI_DEVICE_ID_NETGEAR_GA620   0x620a
 
#define PCI_DEVICE_ID_NETGEAR_GA620T   0x630a
 
#define PCI_DEVICE_ID_FARALLON_PN9000SX   0x1a
 
#define PCI_DEVICE_ID_FARALLON_PN9100T   0xfa
 
#define PCI_VENDOR_ID_SGI   0x10a9
 
#define PCI_DEVICE_ID_SGI_ACENIC   0x0009
 
#define ace_sync_irq(irq)   synchronize_irq(irq)
 
#define offset_in_page(ptr)   ((unsigned long)(ptr) & ~PAGE_MASK)
 
#define ACE_MAX_MOD_PARMS   8
 
#define BOARD_IDX_STATIC   0
 
#define BOARD_IDX_OVERFLOW   -1
 
#define MAX_TEXT_LEN   96*1024
 
#define MAX_RODATA_LEN   8*1024
 
#define MAX_DATA_LEN   2*1024
 
#define tigon2FwReleaseLocal   0
 
#define RX_RING_SIZE   72
 
#define RX_MINI_SIZE   64
 
#define RX_JUMBO_SIZE   48
 
#define RX_PANIC_STD_THRES   16
 
#define RX_PANIC_STD_REFILL   (3*RX_PANIC_STD_THRES)/2
 
#define RX_LOW_STD_THRES   (3*RX_RING_SIZE)/4
 
#define RX_PANIC_MINI_THRES   12
 
#define RX_PANIC_MINI_REFILL   (3*RX_PANIC_MINI_THRES)/2
 
#define RX_LOW_MINI_THRES   (3*RX_MINI_SIZE)/4
 
#define RX_PANIC_JUMBO_THRES   6
 
#define RX_PANIC_JUMBO_REFILL   (3*RX_PANIC_JUMBO_THRES)/2
 
#define RX_LOW_JUMBO_THRES   (3*RX_JUMBO_SIZE)/4
 
#define ACE_MINI_SIZE   100
 
#define ACE_MINI_BUFSIZE   ACE_MINI_SIZE
 
#define ACE_STD_BUFSIZE   (ACE_STD_MTU + ETH_HLEN + 4)
 
#define ACE_JUMBO_BUFSIZE   (ACE_JUMBO_MTU + ETH_HLEN + 4)
 
#define DEF_TX_COAL   400 /* 996 */
 
#define DEF_TX_MAX_DESC   60 /* was 40 */
 
#define DEF_RX_COAL   120 /* 1000 */
 
#define DEF_RX_MAX_DESC   25
 
#define DEF_TX_RATIO   21 /* 24 */
 
#define DEF_JUMBO_TX_COAL   20
 
#define DEF_JUMBO_TX_MAX_DESC   60
 
#define DEF_JUMBO_RX_COAL   30
 
#define DEF_JUMBO_RX_MAX_DESC   6
 
#define DEF_JUMBO_TX_RATIO   21
 
#define TX_COAL_INTS_ONLY   1 /* worth it */
 
#define DEF_TRACE   0
 
#define DEF_STAT   (2 * TICKS_PER_SEC)
 

Functions

 MODULE_DEVICE_TABLE (pci, acenic_pci_tbl)
 
 MODULE_AUTHOR ("Jes Sorensen <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DESCRIPTION ("AceNIC/3C985/GA620 Gigabit Ethernet driver")
 
 MODULE_FIRMWARE ("acenic/tg1.bin")
 
 MODULE_FIRMWARE ("acenic/tg2.bin")
 
 module_param_array_named (link, link_state, int, NULL, 0)
 
 module_param_array (trace, int, NULL, 0)
 
 module_param_array (tx_coal_tick, int, NULL, 0)
 
 module_param_array (max_tx_desc, int, NULL, 0)
 
 module_param_array (rx_coal_tick, int, NULL, 0)
 
 module_param_array (max_rx_desc, int, NULL, 0)
 
 module_param_array (tx_ratio, int, NULL, 0)
 
 MODULE_PARM_DESC (link,"AceNIC/3C985/NetGear link state")
 
 MODULE_PARM_DESC (trace,"AceNIC/3C985/NetGear firmware trace level")
 
 MODULE_PARM_DESC (tx_coal_tick,"AceNIC/3C985/GA620 max clock ticks to wait from first tx descriptor arrives")
 
 MODULE_PARM_DESC (max_tx_desc,"AceNIC/3C985/GA620 max number of transmit descriptors to wait")
 
 MODULE_PARM_DESC (rx_coal_tick,"AceNIC/3C985/GA620 max clock ticks to wait from first rx descriptor arrives")
 
 MODULE_PARM_DESC (max_rx_desc,"AceNIC/3C985/GA620 max number of receive descriptors to wait")
 
 MODULE_PARM_DESC (tx_ratio,"AceNIC/3C985/GA620 ratio of NIC memory used for TX/RX descriptors (range 0-63)")
 
 module_init (acenic_init)
 
 module_exit (acenic_exit)
 

Macro Definition Documentation

#define ACE_IS_TIGON_I (   ap)    (ap->version == 1)

Definition at line 95 of file acenic.c.

#define ACE_JUMBO_BUFSIZE   (ACE_JUMBO_MTU + ETH_HLEN + 4)

Definition at line 354 of file acenic.c.

#define ACE_MAX_MOD_PARMS   8

Definition at line 166 of file acenic.c.

#define ACE_MINI_BUFSIZE   ACE_MINI_SIZE

Definition at line 352 of file acenic.c.

#define ACE_MINI_SIZE   100

Definition at line 350 of file acenic.c.

#define ACE_STD_BUFSIZE   (ACE_STD_MTU + ETH_HLEN + 4)

Definition at line 353 of file acenic.c.

#define ace_sync_irq (   irq)    synchronize_irq(irq)

Definition at line 160 of file acenic.c.

#define ACE_TX_RING_ENTRIES (   ap)    ap->tx_ring_entries

Definition at line 96 of file acenic.c.

#define BOARD_IDX_OVERFLOW   -1

Definition at line 168 of file acenic.c.

#define BOARD_IDX_STATIC   0

Definition at line 167 of file acenic.c.

#define DEF_JUMBO_RX_COAL   30

Definition at line 372 of file acenic.c.

#define DEF_JUMBO_RX_MAX_DESC   6

Definition at line 373 of file acenic.c.

#define DEF_JUMBO_TX_COAL   20

Definition at line 370 of file acenic.c.

#define DEF_JUMBO_TX_MAX_DESC   60

Definition at line 371 of file acenic.c.

#define DEF_JUMBO_TX_RATIO   21

Definition at line 374 of file acenic.c.

#define DEF_RX_COAL   120 /* 1000 */

Definition at line 366 of file acenic.c.

#define DEF_RX_MAX_DESC   25

Definition at line 367 of file acenic.c.

#define DEF_STAT   (2 * TICKS_PER_SEC)

Definition at line 393 of file acenic.c.

#define DEF_TRACE   0

Definition at line 392 of file acenic.c.

#define DEF_TX_COAL   400 /* 996 */

Definition at line 364 of file acenic.c.

#define DEF_TX_MAX_DESC   60 /* was 40 */

Definition at line 365 of file acenic.c.

#define DEF_TX_RATIO   21 /* 24 */

Definition at line 368 of file acenic.c.

#define DRV_NAME   "acenic"

Definition at line 87 of file acenic.c.

#define MAX_DATA_LEN   2*1024

Definition at line 177 of file acenic.c.

#define MAX_RODATA_LEN   8*1024

Definition at line 176 of file acenic.c.

#define MAX_TEXT_LEN   96*1024

Definition at line 175 of file acenic.c.

#define offset_in_page (   ptr)    ((unsigned long)(ptr) & ~PAGE_MASK)

Definition at line 163 of file acenic.c.

#define PCI_DEVICE_ID_3COM_3C985   0x0001

Definition at line 107 of file acenic.c.

#define PCI_DEVICE_ID_ALTEON_ACENIC_COPPER   0x0002

Definition at line 104 of file acenic.c.

#define PCI_DEVICE_ID_ALTEON_ACENIC_FIBRE   0x0001

Definition at line 103 of file acenic.c.

#define PCI_DEVICE_ID_FARALLON_PN9000SX   0x1a

Definition at line 123 of file acenic.c.

#define PCI_DEVICE_ID_FARALLON_PN9100T   0xfa

Definition at line 126 of file acenic.c.

#define PCI_DEVICE_ID_NETGEAR_GA620   0x620a

Definition at line 111 of file acenic.c.

#define PCI_DEVICE_ID_NETGEAR_GA620T   0x630a

Definition at line 114 of file acenic.c.

#define PCI_DEVICE_ID_SGI_ACENIC   0x0009

Definition at line 132 of file acenic.c.

#define PCI_VENDOR_ID_ALTEON   0x12ae

Definition at line 100 of file acenic.c.

#define PCI_VENDOR_ID_NETGEAR   0x1385

Definition at line 110 of file acenic.c.

#define PCI_VENDOR_ID_SGI   0x10a9

Definition at line 129 of file acenic.c.

#define RX_JUMBO_SIZE   48

Definition at line 333 of file acenic.c.

#define RX_LOW_JUMBO_THRES   (3*RX_JUMBO_SIZE)/4

Definition at line 343 of file acenic.c.

#define RX_LOW_MINI_THRES   (3*RX_MINI_SIZE)/4

Definition at line 340 of file acenic.c.

#define RX_LOW_STD_THRES   (3*RX_RING_SIZE)/4

Definition at line 337 of file acenic.c.

#define RX_MINI_SIZE   64

Definition at line 332 of file acenic.c.

#define RX_PANIC_JUMBO_REFILL   (3*RX_PANIC_JUMBO_THRES)/2

Definition at line 342 of file acenic.c.

#define RX_PANIC_JUMBO_THRES   6

Definition at line 341 of file acenic.c.

#define RX_PANIC_MINI_REFILL   (3*RX_PANIC_MINI_THRES)/2

Definition at line 339 of file acenic.c.

#define RX_PANIC_MINI_THRES   12

Definition at line 338 of file acenic.c.

#define RX_PANIC_STD_REFILL   (3*RX_PANIC_STD_THRES)/2

Definition at line 336 of file acenic.c.

#define RX_PANIC_STD_THRES   16

Definition at line 335 of file acenic.c.

#define RX_RING_SIZE   72

Definition at line 331 of file acenic.c.

#define tigon2FwReleaseLocal   0

Definition at line 180 of file acenic.c.

#define TX_COAL_INTS_ONLY   1 /* worth it */

Definition at line 384 of file acenic.c.

Function Documentation

MODULE_AUTHOR ( "Jes Sorensen <[email protected]>"  )
MODULE_DESCRIPTION ( "AceNIC/3C985/GA620 Gigabit Ethernet driver"  )
MODULE_DEVICE_TABLE ( pci  ,
acenic_pci_tbl   
)
module_exit ( acenic_exit  )
MODULE_FIRMWARE ( "acenic/tg1.bin"  )
MODULE_FIRMWARE ( "acenic/tg2.bin"  )
module_init ( acenic_init  )
MODULE_LICENSE ( "GPL"  )
module_param_array ( trace  ,
int  ,
NULL  ,
 
)
module_param_array ( tx_coal_tick  ,
int  ,
NULL  ,
 
)
module_param_array ( max_tx_desc  ,
int  ,
NULL  ,
 
)
module_param_array ( rx_coal_tick  ,
int  ,
NULL  ,
 
)
module_param_array ( max_rx_desc  ,
int  ,
NULL  ,
 
)
module_param_array ( tx_ratio  ,
int  ,
NULL  ,
 
)
module_param_array_named ( link  ,
link_state  ,
int  ,
NULL  ,
 
)
MODULE_PARM_DESC ( link  ,
"AceNIC/3C985/NetGear link state"   
)
MODULE_PARM_DESC ( trace  ,
"AceNIC/3C985/NetGear firmware trace level"   
)
MODULE_PARM_DESC ( tx_coal_tick  ,
"AceNIC/3C985/GA620 max clock ticks to wait from first tx descriptor arrives"   
)
MODULE_PARM_DESC ( max_tx_desc  ,
"AceNIC/3C985/GA620 max number of transmit descriptors to wait"   
)
MODULE_PARM_DESC ( rx_coal_tick  ,
"AceNIC/3C985/GA620 max clock ticks to wait from first rx descriptor arrives"   
)
MODULE_PARM_DESC ( max_rx_desc  ,
"AceNIC/3C985/GA620 max number of receive descriptors to wait"   
)
MODULE_PARM_DESC ( tx_ratio  ,
"AceNIC/3C985/GA620 ratio of NIC memory used for TX/RX descriptors (range 0-63)"   
)