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

Go to the source code of this file.

Data Structures

struct  i596_reg
 
struct  i596_tbd
 
struct  i596_cmd
 
struct  tx_cmd
 
struct  tdr_cmd
 
struct  mc_cmd
 
struct  sa_cmd
 
struct  cf_cmd
 
struct  i596_rfd
 
struct  i596_rbd
 
struct  i596_scb
 
struct  i596_iscp
 
struct  i596_scp
 
struct  i596_private
 

Macros

#define DRV_NAME   "82596"
 
#define DEB_INIT   0x0001
 
#define DEB_PROBE   0x0002
 
#define DEB_SERIOUS   0x0004
 
#define DEB_ERRORS   0x0008
 
#define DEB_MULTI   0x0010
 
#define DEB_TDR   0x0020
 
#define DEB_OPEN   0x0040
 
#define DEB_RESET   0x0080
 
#define DEB_ADDCMD   0x0100
 
#define DEB_STATUS   0x0200
 
#define DEB_STARTTX   0x0400
 
#define DEB_RXADDR   0x0800
 
#define DEB_TXADDR   0x1000
 
#define DEB_RXFRAME   0x2000
 
#define DEB_INTS   0x4000
 
#define DEB_STRUCT   0x8000
 
#define DEB_ANY   0xffff
 
#define DEB(x, y)   if (i596_debug & (x)) y
 
#define WSWAPrfd(x)   ((struct i596_rfd *)((long)x))
 
#define WSWAPrbd(x)   ((struct i596_rbd *)((long)x))
 
#define WSWAPiscp(x)   ((struct i596_iscp *)((long)x))
 
#define WSWAPscb(x)   ((struct i596_scb *)((long)x))
 
#define WSWAPcmd(x)   ((struct i596_cmd *)((long)x))
 
#define WSWAPtbd(x)   ((struct i596_tbd *)((long)x))
 
#define WSWAPchar(x)   ((char *)((long)x))
 
#define ISCP_BUSY   0x0001
 
#define MACH_IS_APRICOT   1
 
#define PORT_RESET   0x00 /* reset 82596 */
 
#define PORT_SELFTEST   0x01 /* selftest */
 
#define PORT_ALTSCP   0x02 /* alternate SCB address */
 
#define PORT_ALTDUMP   0x03 /* Alternate DUMP address */
 
#define PKT_BUF_SZ   1536
 
#define MAX_MC_CNT   64
 
#define I596_TOTAL_SIZE   17
 
#define I596_NULL   ((void *)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_C   0x8000 /* Set to 0 after execution */
 
#define STAT_B   0x4000 /* Command being executed */
 
#define STAT_OK   0x2000 /* Command executed ok */
 
#define STAT_A   0x1000 /* Command aborted */
 
#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 TX_TIMEOUT   (HZ/20)
 
#define EOF   0x8000
 
#define SIZE_MASK   0x3fff
 
#define TX_RING_SIZE   64
 
#define RX_RING_SIZE   16
 

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 ("Richard Hirst")
 
 MODULE_DESCRIPTION ("i82596 driver")
 
 MODULE_LICENSE ("GPL")
 
 module_param (i596_debug, int, 0)
 
 MODULE_PARM_DESC (i596_debug,"i82596 debug mask")
 
struct net_device *__init i82596_probe (int unit)
 

Macro Definition Documentation

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

Definition at line 169 of file 82596.c.

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

Definition at line 173 of file 82596.c.

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

Definition at line 171 of file 82596.c.

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

Definition at line 170 of file 82596.c.

#define CUC_ABORT   0x0400

Definition at line 188 of file 82596.c.

#define CUC_RESUME   0x0200

Definition at line 186 of file 82596.c.

#define CUC_START   0x0100

Definition at line 185 of file 82596.c.

#define CUC_SUSPEND   0x0300

Definition at line 187 of file 82596.c.

#define DEB (   x,
  y 
)    if (i596_debug & (x)) y

Definition at line 89 of file 82596.c.

#define DEB_ADDCMD   0x0100

Definition at line 78 of file 82596.c.

#define DEB_ANY   0xffff

Definition at line 86 of file 82596.c.

#define DEB_ERRORS   0x0008

Definition at line 73 of file 82596.c.

#define DEB_INIT   0x0001

Definition at line 70 of file 82596.c.

#define DEB_INTS   0x4000

Definition at line 84 of file 82596.c.

#define DEB_MULTI   0x0010

Definition at line 74 of file 82596.c.

#define DEB_OPEN   0x0040

Definition at line 76 of file 82596.c.

#define DEB_PROBE   0x0002

Definition at line 71 of file 82596.c.

#define DEB_RESET   0x0080

Definition at line 77 of file 82596.c.

#define DEB_RXADDR   0x0800

Definition at line 81 of file 82596.c.

#define DEB_RXFRAME   0x2000

Definition at line 83 of file 82596.c.

#define DEB_SERIOUS   0x0004

Definition at line 72 of file 82596.c.

#define DEB_STARTTX   0x0400

Definition at line 80 of file 82596.c.

#define DEB_STATUS   0x0200

Definition at line 79 of file 82596.c.

#define DEB_STRUCT   0x8000

Definition at line 85 of file 82596.c.

#define DEB_TDR   0x0020

Definition at line 75 of file 82596.c.

#define DEB_TXADDR   0x1000

Definition at line 82 of file 82596.c.

#define DRV_NAME   "82596"

Definition at line 65 of file 82596.c.

#define EOF   0x8000

Definition at line 203 of file 82596.c.

#define I596_NULL   ((void *)0xffffffff)

Definition at line 167 of file 82596.c.

#define I596_TOTAL_SIZE   17

Definition at line 165 of file 82596.c.

#define ISCP_BUSY   0x0001

Definition at line 132 of file 82596.c.

#define MACH_IS_APRICOT   1

Definition at line 133 of file 82596.c.

#define MAX_MC_CNT   64

Definition at line 163 of file 82596.c.

#define PKT_BUF_SZ   1536

Definition at line 162 of file 82596.c.

#define PORT_ALTDUMP   0x03 /* Alternate DUMP address */

Definition at line 145 of file 82596.c.

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

Definition at line 144 of file 82596.c.

#define PORT_RESET   0x00 /* reset 82596 */

Definition at line 142 of file 82596.c.

#define PORT_SELFTEST   0x01 /* selftest */

Definition at line 143 of file 82596.c.

#define RX_ABORT   0x0040

Definition at line 192 of file 82596.c.

#define RX_RESUME   0x0020

Definition at line 190 of file 82596.c.

#define RX_RING_SIZE   16

Definition at line 285 of file 82596.c.

#define RX_START   0x0010

Definition at line 189 of file 82596.c.

#define RX_SUSPEND   0x0030

Definition at line 191 of file 82596.c.

#define SIZE_MASK   0x3fff

Definition at line 204 of file 82596.c.

#define STAT_A   0x1000 /* Command aborted */

Definition at line 183 of file 82596.c.

#define STAT_B   0x4000 /* Command being executed */

Definition at line 181 of file 82596.c.

#define STAT_C   0x8000 /* Set to 0 after execution */

Definition at line 180 of file 82596.c.

#define STAT_OK   0x2000 /* Command executed ok */

Definition at line 182 of file 82596.c.

#define TX_RING_SIZE   64

Definition at line 284 of file 82596.c.

#define TX_TIMEOUT   (HZ/20)

Definition at line 194 of file 82596.c.

#define WSWAPchar (   x)    ((char *)((long)x))

Definition at line 131 of file 82596.c.

#define WSWAPcmd (   x)    ((struct i596_cmd *)((long)x))

Definition at line 129 of file 82596.c.

#define WSWAPiscp (   x)    ((struct i596_iscp *)((long)x))

Definition at line 127 of file 82596.c.

#define WSWAPrbd (   x)    ((struct i596_rbd *)((long)x))

Definition at line 126 of file 82596.c.

#define WSWAPrfd (   x)    ((struct i596_rfd *)((long)x))

Definition at line 125 of file 82596.c.

#define WSWAPscb (   x)    ((struct i596_scb *)((long)x))

Definition at line 128 of file 82596.c.

#define WSWAPtbd (   x)    ((struct i596_tbd *)((long)x))

Definition at line 130 of file 82596.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 175 of file 82596.c.

Function Documentation

struct net_device* __init i82596_probe ( int  unit)
read

Definition at line 1153 of file 82596.c.

MODULE_AUTHOR ( "Richard Hirst"  )
MODULE_DESCRIPTION ( "i82596 driver )
MODULE_LICENSE ( "GPL"  )
module_param ( i596_debug  ,
int  ,
 
)
MODULE_PARM_DESC ( i596_debug  ,
"i82596 debug mask  
)