Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
typhoon.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/errno.h>
#include <linux/ioport.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/ethtool.h>
#include <linux/if_vlan.h>
#include <linux/crc32.h>
#include <linux/bitops.h>
#include <asm/processor.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include <linux/in6.h>
#include <linux/dma-mapping.h>
#include <linux/firmware.h>
#include "typhoon.h"

Go to the source code of this file.

Data Structures

struct  typhoon_card_info
 
struct  typhoon_shared
 
struct  rxbuff_ent
 
struct  typhoon
 

Macros

#define TXHI_ENTRIES   2
 
#define TXLO_ENTRIES   128
 
#define RX_ENTRIES   32
 
#define COMMAND_ENTRIES   16
 
#define RESPONSE_ENTRIES   32
 
#define COMMAND_RING_SIZE   (COMMAND_ENTRIES * sizeof(struct cmd_desc))
 
#define RESPONSE_RING_SIZE   (RESPONSE_ENTRIES * sizeof(struct resp_desc))
 
#define RXFREE_ENTRIES   128
 
#define RXENT_ENTRIES   (RXFREE_ENTRIES - 1)
 
#define TX_TIMEOUT   (2*HZ)
 
#define PKT_BUF_SZ   1536
 
#define FIRMWARE_NAME   "3com/typhoon.bin"
 
#define pr_fmt(fmt)   KBUILD_MODNAME " " fmt
 
#define TYPHOON_CRYPTO_NONE   0x00
 
#define TYPHOON_CRYPTO_DES   0x01
 
#define TYPHOON_CRYPTO_3DES   0x02
 
#define TYPHOON_CRYPTO_VARIABLE   0x04
 
#define TYPHOON_FIBER   0x08
 
#define TYPHOON_WAKEUP_NEEDS_RESET   0x10
 
#define __3xp_aligned   ____cacheline_aligned
 
#define typhoon_post_pci_writes(x)   do { if(likely(use_mmio)) ioread32(x+TYPHOON_REG_HEARTBEAT); } while(0)
 
#define TYPHOON_UDELAY   50
 
#define TYPHOON_RESET_TIMEOUT_SLEEP   (6 * HZ)
 
#define TYPHOON_RESET_TIMEOUT_NOSLEEP   ((6 * 1000000) / TYPHOON_UDELAY)
 
#define TYPHOON_WAIT_TIMEOUT   ((1000000 / 2) / TYPHOON_UDELAY)
 
#define NETIF_F_TSO   0
 
#define skb_tso_size(x)   0
 
#define TSO_NUM_DESCRIPTORS   0
 
#define TSO_OFFLOAD_ON   0
 
#define shared_offset(x)   offsetof(struct typhoon_shared, x)
 

Enumerations

enum  typhoon_cards {
  TYPHOON_TX = 0, TYPHOON_TX95, TYPHOON_TX97, TYPHOON_SVR,
  TYPHOON_SVR95, TYPHOON_SVR97, TYPHOON_TXM, TYPHOON_BSVR,
  TYPHOON_FX95, TYPHOON_FX97, TYPHOON_FX95SVR, TYPHOON_FX97SVR,
  TYPHOON_FXM
}
 
enum  completion_wait_values { NoWait = 0, WaitNoSleep, WaitSleep }
 
enum  state_values { Sleeping = 0, Running }
 

Functions

 MODULE_AUTHOR ("David Dillow <[email protected]>")
 
 MODULE_VERSION ("1.0")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_FIRMWARE (FIRMWARE_NAME)
 
 MODULE_DESCRIPTION ("3Com Typhoon Family (3C990, 3CR990, and variants)")
 
 MODULE_PARM_DESC (rx_copybreak,"Packets smaller than this are copied and ""the buffer given back to the NIC. Default ""is 200.")
 
 MODULE_PARM_DESC (use_mmio,"Use MMIO (1) or PIO(0) to access the NIC. ""Default is to try MMIO and fallback to PIO.")
 
 module_param (rx_copybreak, int, 0)
 
 module_param (use_mmio, int, 0)
 
 MODULE_DEVICE_TABLE (pci, typhoon_pci_tbl)
 
 module_init (typhoon_init)
 
 module_exit (typhoon_cleanup)
 

Variables

struct typhoon_shared __packed
 

Macro Definition Documentation

#define __3xp_aligned   ____cacheline_aligned

Definition at line 241 of file typhoon.c.

#define COMMAND_ENTRIES   16

Definition at line 78 of file typhoon.c.

#define COMMAND_RING_SIZE   (COMMAND_ENTRIES * sizeof(struct cmd_desc))

Definition at line 81 of file typhoon.c.

#define FIRMWARE_NAME   "3com/typhoon.bin"

Definition at line 97 of file typhoon.c.

#define NETIF_F_TSO   0

Definition at line 329 of file typhoon.c.

#define PKT_BUF_SZ   1536

Definition at line 96 of file typhoon.c.

#define pr_fmt (   fmt)    KBUILD_MODNAME " " fmt

Definition at line 99 of file typhoon.c.

#define RESPONSE_ENTRIES   32

Definition at line 79 of file typhoon.c.

#define RESPONSE_RING_SIZE   (RESPONSE_ENTRIES * sizeof(struct resp_desc))

Definition at line 82 of file typhoon.c.

#define RX_ENTRIES   32

Definition at line 77 of file typhoon.c.

#define RXENT_ENTRIES   (RXFREE_ENTRIES - 1)

Definition at line 89 of file typhoon.c.

#define RXFREE_ENTRIES   128

Definition at line 88 of file typhoon.c.

#define shared_offset (   x)    offsetof(struct typhoon_shared, x)

Definition at line 1176 of file typhoon.c.

#define skb_tso_size (   x)    0

Definition at line 330 of file typhoon.c.

#define TSO_NUM_DESCRIPTORS   0

Definition at line 331 of file typhoon.c.

#define TSO_OFFLOAD_ON   0

Definition at line 332 of file typhoon.c.

#define TX_TIMEOUT   (2*HZ)

Definition at line 94 of file typhoon.c.

#define TXHI_ENTRIES   2

Definition at line 75 of file typhoon.c.

#define TXLO_ENTRIES   128

Definition at line 76 of file typhoon.c.

#define TYPHOON_CRYPTO_3DES   0x02

Definition at line 158 of file typhoon.c.

#define TYPHOON_CRYPTO_DES   0x01

Definition at line 157 of file typhoon.c.

#define TYPHOON_CRYPTO_NONE   0x00

Definition at line 156 of file typhoon.c.

#define TYPHOON_CRYPTO_VARIABLE   0x04

Definition at line 159 of file typhoon.c.

#define TYPHOON_FIBER   0x08

Definition at line 160 of file typhoon.c.

#define typhoon_post_pci_writes (   x)    do { if(likely(use_mmio)) ioread32(x+TYPHOON_REG_HEARTBEAT); } while(0)

Definition at line 314 of file typhoon.c.

#define TYPHOON_RESET_TIMEOUT_NOSLEEP   ((6 * 1000000) / TYPHOON_UDELAY)

Definition at line 321 of file typhoon.c.

#define TYPHOON_RESET_TIMEOUT_SLEEP   (6 * HZ)

Definition at line 320 of file typhoon.c.

#define TYPHOON_UDELAY   50

Definition at line 319 of file typhoon.c.

#define TYPHOON_WAIT_TIMEOUT   ((1000000 / 2) / TYPHOON_UDELAY)

Definition at line 322 of file typhoon.c.

#define TYPHOON_WAKEUP_NEEDS_RESET   0x10

Definition at line 161 of file typhoon.c.

Enumeration Type Documentation

Enumerator:
NoWait 
WaitNoSleep 
WaitSleep 

Definition at line 299 of file typhoon.c.

Enumerator:
Sleeping 
Running 

Definition at line 307 of file typhoon.c.

Enumerator:
TYPHOON_TX 
TYPHOON_TX95 
TYPHOON_TX97 
TYPHOON_SVR 
TYPHOON_SVR95 
TYPHOON_SVR97 
TYPHOON_TXM 
TYPHOON_BSVR 
TYPHOON_FX95 
TYPHOON_FX97 
TYPHOON_FX95SVR 
TYPHOON_FX97SVR 
TYPHOON_FXM 

Definition at line 163 of file typhoon.c.

Function Documentation

MODULE_AUTHOR ( "David Dillow <[email protected]>"  )
MODULE_DESCRIPTION ( "3Com Typhoon Family (3C990, 3CR990, and variants)"  )
MODULE_DEVICE_TABLE ( pci  ,
typhoon_pci_tbl   
)
module_exit ( typhoon_cleanup  )
MODULE_FIRMWARE ( FIRMWARE_NAME  )
module_init ( typhoon_init  )
MODULE_LICENSE ( "GPL"  )
module_param ( rx_copybreak  ,
int  ,
 
)
module_param ( use_mmio  ,
int  ,
 
)
MODULE_PARM_DESC ( rx_copybreak  ,
"Packets smaller than this are copied and ""the buffer given back to the NIC. Default ""is 200."   
)
MODULE_PARM_DESC ( use_mmio  ,
"Use MMIO (1) or PIO(0) to access the NIC. ""Default is to try MMIO and fallback to PIO."   
)
MODULE_VERSION ( "1.0"  )

Variable Documentation