Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions
lp486e.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/ioport.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/bitops.h>
#include <asm/io.h>
#include <asm/dma.h>

Go to the source code of this file.

Data Structures

struct  i596_cmd
 
struct  i596_tbd
 
struct  tx_cmd
 
struct  i596_rfd
 
struct  i596_rbd
 
struct  i596_scb
 
struct  i596_iscp
 
struct  i596_scp
 
struct  i596_dump
 
struct  i596_private
 

Macros

#define DRV_NAME   "lp486e"
 
#define LOG_SRCDST   0x80000000
 
#define LOG_STATINT   0x40000000
 
#define LOG_STARTINT   0x20000000
 
#define i596_debug   debug
 
#define LP486E_TOTAL_SIZE   16
 
#define I596_NULL   (0xffffffff)
 
#define CMD_EOL   0x8000 /* The last command of the list, stop. */
 
#define CMD_SUSP   0x4000 /* Suspend after doing cmd. */
 
#define CMD_INTR   0x2000 /* Interrupt after doing cmd. */
 
#define CMD_FLEX   0x0008 /* Enable flexible memory model */
 
#define STAT_CX
 
#define STAT_FR   0x4000 /* The RU finished receiving a frame */
 
#define STAT_CNA   0x2000 /* The CU left the active state */
 
#define STAT_RNR   0x1000 /* The RU left the active state */
 
#define STAT_ACK   (STAT_CX | STAT_FR | STAT_CNA | STAT_RNR)
 
#define STAT_CUS
 
#define STAT_RUS
 
#define STAT_T   0x0008 /* Bus throttle timers loaded */
 
#define STAT_ZERO   0x0807 /* Always zero */
 
#define ACK_CX   0x8000
 
#define ACK_FR   0x4000
 
#define ACK_CNA   0x2000
 
#define ACK_RNR   0x1000
 
#define CUC_START   0x0100
 
#define CUC_RESUME   0x0200
 
#define CUC_SUSPEND   0x0300
 
#define CUC_ABORT   0x0400
 
#define RX_START   0x0010
 
#define RX_RESUME   0x0020
 
#define RX_SUSPEND   0x0030
 
#define RX_ABORT   0x0040
 
#define CMD_STAT_C   0x8000 /* CU command complete */
 
#define CMD_STAT_B   0x4000 /* CU command in progress */
 
#define CMD_STAT_OK   0x2000 /* CU command completed without errors */
 
#define CMD_STAT_A   0x1000 /* CU command abnormally terminated */
 
#define EOF   0x8000
 
#define SIZE_MASK   0x3fff
 
#define RFD_STAT_C   0x8000 /* Frame reception complete */
 
#define RFD_STAT_B   0x4000 /* Frame reception in progress */
 
#define RFD_STAT_OK   0x2000 /* Frame received without errors */
 
#define RFD_STATUS   0x1fff
 
#define RFD_LENGTH_ERR   0x1000
 
#define RFD_CRC_ERR   0x0800
 
#define RFD_ALIGN_ERR   0x0400
 
#define RFD_NOBUFS_ERR   0x0200
 
#define RFD_DMA_ERR   0x0100 /* DMA overrun failure to acquire system bus */
 
#define RFD_SHORT_FRAME_ERR   0x0080
 
#define RFD_NOEOP_ERR   0x0040
 
#define RFD_TRUNC_ERR   0x0020
 
#define RFD_MULTICAST
 
#define RFD_COLLISION   0x0001
 
#define RBD_EL   0x8000
 
#define RBD_P   0x4000
 
#define RBD_SIZEMASK   0x3fff
 
#define RBD_EOF   0x8000
 
#define RBD_F   0x4000
 
#define RX_RING_SIZE   64
 
#define RX_SKBSIZE   (ETH_FRAME_LEN+10)
 
#define RX_RBD_SIZE   32
 
#define PORT_RESET   0x00 /* reset 82596 */
 
#define PORT_SELFTEST   0x01 /* selftest */
 
#define PORT_ALTSCP   0x02 /* alternate SCB address */
 
#define PORT_DUMP   0x03 /* dump */
 
#define IOADDR   0xcb0 /* real constant */
 
#define IRQ   10 /* default IRQ - can be changed by ECU */
 

Typedefs

typedef u32 phys_addr
 

Enumerations

enum  commands {
  CmdNOp = 0, CmdSASetup = 1, CmdConfigure = 2, CmdMulticastList = 3,
  CmdTx = 4, CmdTDR = 5, CmdDump = 6, CmdDiagnose = 7,
  CmdNOp = 0, CmdSASetup = 1, CmdConfigure = 2, CmdMulticastList = 3,
  CmdTx = 4, CmdTDR = 5, CmdDump = 6, CmdDiagnose = 7,
  CmdNOp = 0, CmdSASetup = 1, CmdConfigure = 2, CmdMulticastList = 3,
  CmdTx = 4, CmdTDR = 5, CmdDump = 6, CmdDiagnose = 7,
  CmdNOP = 0, CmdIASetup = 1, CmdConfigure = 2, CmdMulticastList = 3,
  CmdTx = 4, CmdTDR = 5, CmdDump = 6, CmdDiagnose = 7
}
 

Functions

 MODULE_AUTHOR ("Ard van Breemen <[email protected]>")
 
 MODULE_DESCRIPTION ("Intel Panther onboard i82596 driver")
 
 MODULE_LICENSE ("GPL")
 
 module_param (debug, int, 0)
 
 module_param (options, int, 0)
 
 module_param (full_duplex, int, 0)
 
 module_init (lp486e_init_module)
 
 module_exit (lp486e_cleanup_module)
 

Macro Definition Documentation

#define ACK_CNA   0x2000

Definition at line 179 of file lp486e.c.

#define ACK_CX   0x8000

Definition at line 177 of file lp486e.c.

#define ACK_FR   0x4000

Definition at line 178 of file lp486e.c.

#define ACK_RNR   0x1000

Definition at line 180 of file lp486e.c.

#define CMD_EOL   0x8000 /* The last command of the list, stop. */

Definition at line 96 of file lp486e.c.

#define CMD_FLEX   0x0008 /* Enable flexible memory model */

Definition at line 100 of file lp486e.c.

#define CMD_INTR   0x2000 /* Interrupt after doing cmd. */

Definition at line 98 of file lp486e.c.

#define CMD_STAT_A   0x1000 /* CU command abnormally terminated */

Definition at line 208 of file lp486e.c.

#define CMD_STAT_B   0x4000 /* CU command in progress */

Definition at line 206 of file lp486e.c.

#define CMD_STAT_C   0x8000 /* CU command complete */

Definition at line 205 of file lp486e.c.

#define CMD_STAT_OK   0x2000 /* CU command completed without errors */

Definition at line 207 of file lp486e.c.

#define CMD_SUSP   0x4000 /* Suspend after doing cmd. */

Definition at line 97 of file lp486e.c.

#define CUC_ABORT   0x0400

Definition at line 185 of file lp486e.c.

#define CUC_RESUME   0x0200

Definition at line 183 of file lp486e.c.

#define CUC_START   0x0100

Definition at line 182 of file lp486e.c.

#define CUC_SUSPEND   0x0300

Definition at line 184 of file lp486e.c.

#define DRV_NAME   "lp486e"

Definition at line 76 of file lp486e.c.

#define EOF   0x8000

Definition at line 216 of file lp486e.c.

#define i596_debug   debug

Definition at line 83 of file lp486e.c.

#define I596_NULL   (0xffffffff)

Definition at line 94 of file lp486e.c.

#define IOADDR   0xcb0 /* real constant */

Definition at line 485 of file lp486e.c.

#define IRQ   10 /* default IRQ - can be changed by ECU */

Definition at line 486 of file lp486e.c.

#define LOG_SRCDST   0x80000000

Definition at line 79 of file lp486e.c.

#define LOG_STARTINT   0x20000000

Definition at line 81 of file lp486e.c.

#define LOG_STATINT   0x40000000

Definition at line 80 of file lp486e.c.

#define LP486E_TOTAL_SIZE   16

Definition at line 92 of file lp486e.c.

#define PORT_ALTSCP   0x02 /* alternate SCB address */

Definition at line 482 of file lp486e.c.

#define PORT_DUMP   0x03 /* dump */

Definition at line 483 of file lp486e.c.

#define PORT_RESET   0x00 /* reset 82596 */

Definition at line 480 of file lp486e.c.

#define PORT_SELFTEST   0x01 /* selftest */

Definition at line 481 of file lp486e.c.

#define RBD_EL   0x8000

Definition at line 261 of file lp486e.c.

#define RBD_EOF   0x8000

Definition at line 264 of file lp486e.c.

#define RBD_F   0x4000

Definition at line 265 of file lp486e.c.

#define RBD_P   0x4000

Definition at line 262 of file lp486e.c.

#define RBD_SIZEMASK   0x3fff

Definition at line 263 of file lp486e.c.

#define RFD_ALIGN_ERR   0x0400

Definition at line 241 of file lp486e.c.

#define RFD_COLLISION   0x0001

Definition at line 248 of file lp486e.c.

#define RFD_CRC_ERR   0x0800

Definition at line 240 of file lp486e.c.

#define RFD_DMA_ERR   0x0100 /* DMA overrun failure to acquire system bus */

Definition at line 243 of file lp486e.c.

#define RFD_LENGTH_ERR   0x1000

Definition at line 239 of file lp486e.c.

#define RFD_MULTICAST
Value:
0x0002 /* 0: destination had our address
1: destination was broadcast/multicast */

Definition at line 247 of file lp486e.c.

#define RFD_NOBUFS_ERR   0x0200

Definition at line 242 of file lp486e.c.

#define RFD_NOEOP_ERR   0x0040

Definition at line 245 of file lp486e.c.

#define RFD_SHORT_FRAME_ERR   0x0080

Definition at line 244 of file lp486e.c.

#define RFD_STAT_B   0x4000 /* Frame reception in progress */

Definition at line 236 of file lp486e.c.

#define RFD_STAT_C   0x8000 /* Frame reception complete */

Definition at line 235 of file lp486e.c.

#define RFD_STAT_OK   0x2000 /* Frame received without errors */

Definition at line 237 of file lp486e.c.

#define RFD_STATUS   0x1fff

Definition at line 238 of file lp486e.c.

#define RFD_TRUNC_ERR   0x0020

Definition at line 246 of file lp486e.c.

#define RX_ABORT   0x0040

Definition at line 190 of file lp486e.c.

#define RX_RBD_SIZE   32

Definition at line 281 of file lp486e.c.

#define RX_RESUME   0x0020

Definition at line 188 of file lp486e.c.

#define RX_RING_SIZE   64

Definition at line 279 of file lp486e.c.

#define RX_SKBSIZE   (ETH_FRAME_LEN+10)

Definition at line 280 of file lp486e.c.

#define RX_START   0x0010

Definition at line 187 of file lp486e.c.

#define RX_SUSPEND   0x0030

Definition at line 189 of file lp486e.c.

#define SIZE_MASK   0x3fff

Definition at line 217 of file lp486e.c.

#define STAT_ACK   (STAT_CX | STAT_FR | STAT_CNA | STAT_RNR)

Definition at line 123 of file lp486e.c.

#define STAT_CNA   0x2000 /* The CU left the active state */

Definition at line 121 of file lp486e.c.

#define STAT_CUS
Value:
0x0700 /* Status of CU: 0: idle, 1: suspended,
2: active, 3-7: unused */

Definition at line 124 of file lp486e.c.

#define STAT_CX
Value:
0x8000 /* The CU finished executing a command
with the Interrupt bit set */

Definition at line 119 of file lp486e.c.

#define STAT_FR   0x4000 /* The RU finished receiving a frame */

Definition at line 120 of file lp486e.c.

#define STAT_RNR   0x1000 /* The RU left the active state */

Definition at line 122 of file lp486e.c.

#define STAT_RUS
Value:
0x00f0 /* Status of RU: 0: idle, 1: suspended,
2: no resources, 4: ready,
10: no resources due to no more RBDs,
12: no more RBDs, other: unused */

Definition at line 125 of file lp486e.c.

#define STAT_T   0x0008 /* Bus throttle timers loaded */

Definition at line 126 of file lp486e.c.

#define STAT_ZERO   0x0807 /* Always zero */

Definition at line 127 of file lp486e.c.

Typedef Documentation

Definition at line 192 of file lp486e.c.

Enumeration Type Documentation

enum commands
Enumerator:
CmdNOp 
CmdSASetup 
CmdConfigure 
CmdMulticastList 
CmdTx 
CmdTDR 
CmdDump 
CmdDiagnose 
CmdNOp 
CmdSASetup 
CmdConfigure 
CmdMulticastList 
CmdTx 
CmdTDR 
CmdDump 
CmdDiagnose 
CmdNOp 
CmdSASetup 
CmdConfigure 
CmdMulticastList 
CmdTx 
CmdTDR 
CmdDump 
CmdDiagnose 
CmdNOP 
CmdIASetup 
CmdConfigure 
CmdMulticastList 
CmdTx 
CmdTDR 
CmdDump 
CmdDiagnose 

Definition at line 102 of file lp486e.c.

Function Documentation

MODULE_AUTHOR ( "Ard van Breemen <[email protected]>"  )
MODULE_DESCRIPTION ( "Intel Panther onboard i82596 driver )
module_exit ( lp486e_cleanup_module  )
module_init ( lp486e_init_module  )
MODULE_LICENSE ( "GPL"  )
module_param ( debug  ,
int  ,
 
)
module_param ( options  ,
int  ,
 
)
module_param ( full_duplex  ,
int  ,
 
)