Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations
lib82596.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/types.h>
#include <linux/bitops.h>
#include <linux/dma-mapping.h>
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/gfp.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_dma
 
struct  i596_private
 

Macros

#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 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 ISCP_BUSY   0x0001
 
#define I596_NULL   ((u32)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   32
 
#define RX_RING_SIZE   16
 
#define virt_to_dma(lp, v)   ((lp)->dma_addr + (dma_addr_t)((unsigned long)(v)-(unsigned long)((lp)->dma)))
 

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
}
 

Macro Definition Documentation

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

Definition at line 139 of file lib82596.c.

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

Definition at line 143 of file lib82596.c.

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

Definition at line 141 of file lib82596.c.

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

Definition at line 140 of file lib82596.c.

#define CUC_ABORT   0x0400

Definition at line 158 of file lib82596.c.

#define CUC_RESUME   0x0200

Definition at line 156 of file lib82596.c.

#define CUC_START   0x0100

Definition at line 155 of file lib82596.c.

#define CUC_SUSPEND   0x0300

Definition at line 157 of file lib82596.c.

#define DEB (   x,
  y 
)    if (i596_debug & (x)) { y; }

Definition at line 111 of file lib82596.c.

#define DEB_ADDCMD   0x0100

Definition at line 100 of file lib82596.c.

#define DEB_ANY   0xffff

Definition at line 108 of file lib82596.c.

#define DEB_ERRORS   0x0008

Definition at line 95 of file lib82596.c.

#define DEB_INIT   0x0001

Definition at line 92 of file lib82596.c.

#define DEB_INTS   0x4000

Definition at line 106 of file lib82596.c.

#define DEB_MULTI   0x0010

Definition at line 96 of file lib82596.c.

#define DEB_OPEN   0x0040

Definition at line 98 of file lib82596.c.

#define DEB_PROBE   0x0002

Definition at line 93 of file lib82596.c.

#define DEB_RESET   0x0080

Definition at line 99 of file lib82596.c.

#define DEB_RXADDR   0x0800

Definition at line 103 of file lib82596.c.

#define DEB_RXFRAME   0x2000

Definition at line 105 of file lib82596.c.

#define DEB_SERIOUS   0x0004

Definition at line 94 of file lib82596.c.

#define DEB_STARTTX   0x0400

Definition at line 102 of file lib82596.c.

#define DEB_STATUS   0x0200

Definition at line 101 of file lib82596.c.

#define DEB_STRUCT   0x8000

Definition at line 107 of file lib82596.c.

#define DEB_TDR   0x0020

Definition at line 97 of file lib82596.c.

#define DEB_TXADDR   0x1000

Definition at line 104 of file lib82596.c.

#define EOF   0x8000

Definition at line 173 of file lib82596.c.

#define I596_NULL   ((u32)0xffffffff)

Definition at line 137 of file lib82596.c.

#define ISCP_BUSY   0x0001

Definition at line 135 of file lib82596.c.

#define MAX_MC_CNT   64

Definition at line 133 of file lib82596.c.

#define PKT_BUF_SZ   1536

Definition at line 132 of file lib82596.c.

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

Definition at line 123 of file lib82596.c.

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

Definition at line 122 of file lib82596.c.

#define PORT_RESET   0x00 /* reset 82596 */

Definition at line 120 of file lib82596.c.

#define PORT_SELFTEST   0x01 /* selftest */

Definition at line 121 of file lib82596.c.

#define RX_ABORT   0x0040

Definition at line 162 of file lib82596.c.

#define RX_RESUME   0x0020

Definition at line 160 of file lib82596.c.

#define RX_RING_SIZE   16

Definition at line 273 of file lib82596.c.

#define RX_START   0x0010

Definition at line 159 of file lib82596.c.

#define RX_SUSPEND   0x0030

Definition at line 161 of file lib82596.c.

#define SIZE_MASK   0x3fff

Definition at line 174 of file lib82596.c.

#define STAT_A   0x1000 /* Command aborted */

Definition at line 153 of file lib82596.c.

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

Definition at line 151 of file lib82596.c.

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

Definition at line 150 of file lib82596.c.

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

Definition at line 152 of file lib82596.c.

#define TX_RING_SIZE   32

Definition at line 272 of file lib82596.c.

#define TX_TIMEOUT   (HZ/20)

Definition at line 164 of file lib82596.c.

#define virt_to_dma (   lp,
  v 
)    ((lp)->dma_addr + (dma_addr_t)((unsigned long)(v)-(unsigned long)((lp)->dma)))

Definition at line 459 of file lib82596.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 145 of file lib82596.c.