Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
3c509.c File Reference
#include <linux/module.h>
#include <linux/isa.h>
#include <linux/pnp.h>
#include <linux/string.h>
#include <linux/interrupt.h>
#include <linux/errno.h>
#include <linux/in.h>
#include <linux/ioport.h>
#include <linux/init.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/pm.h>
#include <linux/skbuff.h>
#include <linux/delay.h>
#include <linux/spinlock.h>
#include <linux/ethtool.h>
#include <linux/device.h>
#include <linux/eisa.h>
#include <linux/bitops.h>
#include <asm/uaccess.h>
#include <asm/io.h>
#include <asm/irq.h>

Go to the source code of this file.

Data Structures

struct  el3_private
 

Macros

#define DRV_NAME   "3c509"
 
#define DRV_VERSION   "1.20"
 
#define DRV_RELDATE   "04Feb2008"
 
#define TX_TIMEOUT   (400*HZ/1000)
 
#define EL3_MAX_CARDS   8
 
#define EL3_DATA   0x00
 
#define EL3_CMD   0x0e
 
#define EL3_STATUS   0x0e
 
#define EEPROM_READ   0x80
 
#define EL3_IO_EXTENT   16
 
#define EL3WINDOW(win_num)   outw(SelectWindow + (win_num), ioaddr + EL3_CMD)
 
#define TX_FIFO   0x00
 
#define RX_FIFO   0x00
 
#define RX_STATUS   0x08
 
#define TX_STATUS   0x0B
 
#define TX_FREE   0x0C /* Remaining free bytes in Tx buffer. */
 
#define WN0_CONF_CTRL   0x04 /* Window 0: Configuration control register */
 
#define WN0_ADDR_CONF   0x06 /* Window 0: Address configuration register */
 
#define WN0_IRQ   0x08 /* Window 0: Set IRQ line in bits 12-15. */
 
#define WN4_MEDIA   0x0A /* Window 4: Various transcvr/media bits. */
 
#define MEDIA_TP   0x00C0 /* Enable link beat and jabber for 10baseT. */
 
#define WN4_NETDIAG   0x06 /* Window 4: Net diagnostic */
 
#define FD_ENABLE   0x8000 /* Enable full-duplex ("external loopback") */
 
#define SKB_QUEUE_SIZE   64
 
#define el3_suspend   NULL
 
#define el3_resume   NULL
 

Enumerations

enum  c509cmd {
  TotalReset = 0<<11, SelectWindow = 1<<11, StartCoax = 2<<11, RxDisable = 3<<11,
  RxEnable = 4<<11, RxReset = 5<<11, RxDiscard = 8<<11, TxEnable = 9<<11,
  TxDisable = 10<<11, TxReset = 11<<11, FakeIntr = 12<<11, AckIntr = 13<<11,
  SetIntrEnb = 14<<11, SetStatusEnb = 15<<11, SetRxFilter = 16<<11, SetRxThreshold = 17<<11,
  SetTxThreshold = 18<<11, SetTxStart = 19<<11, StatsEnable = 21<<11, StatsDisable = 22<<11,
  StopCoax = 23<<11, PowerUp = 27<<11, PowerDown = 28<<11, PowerAuto = 29<<11,
  TotalReset = 0<<11, SelectWindow = 1<<11, StartCoax = 2<<11, RxDisable = 3<<11,
  RxEnable = 4<<11, RxReset = 5<<11, RxDiscard = 8<<11, TxEnable = 9<<11,
  TxDisable = 10<<11, TxReset = 11<<11, FakeIntr = 12<<11, AckIntr = 13<<11,
  SetIntrEnb = 14<<11, SetStatusEnb = 15<<11, SetRxFilter = 16<<11, SetRxThreshold = 17<<11,
  SetTxThreshold = 18<<11, SetTxStart = 19<<11, StatsEnable = 21<<11, StatsDisable = 22<<11,
  StopCoax = 23<<11
}
 
enum  c509status {
  IntLatch = 0x0001, AdapterFailure = 0x0002, TxComplete = 0x0004, TxAvailable = 0x0008,
  RxComplete = 0x0010, RxEarly = 0x0020, IntReq = 0x0040, StatsFull = 0x0080,
  CmdBusy = 0x1000, IntLatch = 0x0001, AdapterFailure = 0x0002, TxComplete = 0x0004,
  TxAvailable = 0x0008, RxComplete = 0x0010, RxEarly = 0x0020, IntReq = 0x0040,
  StatsFull = 0x0080, CmdBusy = 0x1000
}
 
enum  RxFilter {
  RxStation = 1, RxMulticast = 2, RxBroadcast = 4, RxProm = 8,
  RxStation = 1, RxMulticast = 2, RxBroadcast = 4, RxProm = 8,
  RxStation = 1, RxMulticast = 2, RxBroadcast = 4, RxProm = 8,
  RxStation = 1, RxMulticast = 2, RxBroadcast = 4, RxProm = 8,
  RxStation = 1, RxMulticast = 2, RxBroadcast = 4, RxProm = 8
}
 
enum  el3_cardtype { EL3_ISA, EL3_PNP, EL3_EISA }
 

Functions

 module_param (debug, int, 0)
 
 module_param_array (irq, int, NULL, 0)
 
 module_param (max_interrupt_work, int, 0)
 
 MODULE_PARM_DESC (debug,"debug level (0-6)")
 
 MODULE_PARM_DESC (irq,"IRQ number(s) (assigned)")
 
 MODULE_PARM_DESC (max_interrupt_work,"maximum events handled per interrupt")
 
 MODULE_DESCRIPTION ("3Com Etherlink III (3c509, 3c509B, 3c529, 3c579) ethernet driver")
 
 MODULE_LICENSE ("GPL")
 
 module_init (el3_init_module)
 
 module_exit (el3_cleanup_module)
 

Macro Definition Documentation

#define DRV_NAME   "3c509"

Definition at line 62 of file 3c509.c.

#define DRV_RELDATE   "04Feb2008"

Definition at line 64 of file 3c509.c.

#define DRV_VERSION   "1.20"

Definition at line 63 of file 3c509.c.

#define EEPROM_READ   0x80

Definition at line 116 of file 3c509.c.

#define EL3_CMD   0x0e

Definition at line 114 of file 3c509.c.

#define EL3_DATA   0x00

Definition at line 113 of file 3c509.c.

#define EL3_IO_EXTENT   16

Definition at line 118 of file 3c509.c.

#define EL3_MAX_CARDS   8

Definition at line 107 of file 3c509.c.

#define el3_resume   NULL

Definition at line 208 of file 3c509.c.

#define EL3_STATUS   0x0e

Definition at line 115 of file 3c509.c.

#define el3_suspend   NULL

Definition at line 207 of file 3c509.c.

#define EL3WINDOW (   win_num)    outw(SelectWindow + (win_num), ioaddr + EL3_CMD)

Definition at line 120 of file 3c509.c.

#define FD_ENABLE   0x8000 /* Enable full-duplex ("external loopback") */

Definition at line 157 of file 3c509.c.

#define MEDIA_TP   0x00C0 /* Enable link beat and jabber for 10baseT. */

Definition at line 155 of file 3c509.c.

#define RX_FIFO   0x00

Definition at line 146 of file 3c509.c.

#define RX_STATUS   0x08

Definition at line 147 of file 3c509.c.

#define SKB_QUEUE_SIZE   64

Definition at line 163 of file 3c509.c.

#define TX_FIFO   0x00

Definition at line 145 of file 3c509.c.

#define TX_FREE   0x0C /* Remaining free bytes in Tx buffer. */

Definition at line 149 of file 3c509.c.

#define TX_STATUS   0x0B

Definition at line 148 of file 3c509.c.

#define TX_TIMEOUT   (400*HZ/1000)

Definition at line 69 of file 3c509.c.

#define WN0_ADDR_CONF   0x06 /* Window 0: Address configuration register */

Definition at line 152 of file 3c509.c.

#define WN0_CONF_CTRL   0x04 /* Window 0: Configuration control register */

Definition at line 151 of file 3c509.c.

#define WN0_IRQ   0x08 /* Window 0: Set IRQ line in bits 12-15. */

Definition at line 153 of file 3c509.c.

#define WN4_MEDIA   0x0A /* Window 4: Various transcvr/media bits. */

Definition at line 154 of file 3c509.c.

#define WN4_NETDIAG   0x06 /* Window 4: Net diagnostic */

Definition at line 156 of file 3c509.c.

Enumeration Type Documentation

enum c509cmd
Enumerator:
TotalReset 
SelectWindow 
StartCoax 
RxDisable 
RxEnable 
RxReset 
RxDiscard 
TxEnable 
TxDisable 
TxReset 
FakeIntr 
AckIntr 
SetIntrEnb 
SetStatusEnb 
SetRxFilter 
SetRxThreshold 
SetTxThreshold 
SetTxStart 
StatsEnable 
StatsDisable 
StopCoax 
PowerUp 
PowerDown 
PowerAuto 
TotalReset 
SelectWindow 
StartCoax 
RxDisable 
RxEnable 
RxReset 
RxDiscard 
TxEnable 
TxDisable 
TxReset 
FakeIntr 
AckIntr 
SetIntrEnb 
SetStatusEnb 
SetRxFilter 
SetRxThreshold 
SetTxThreshold 
SetTxStart 
StatsEnable 
StatsDisable 
StopCoax 

Definition at line 125 of file 3c509.c.

enum c509status
Enumerator:
IntLatch 
AdapterFailure 
TxComplete 
TxAvailable 
RxComplete 
RxEarly 
IntReq 
StatsFull 
CmdBusy 
IntLatch 
AdapterFailure 
TxComplete 
TxAvailable 
RxComplete 
RxEarly 
IntReq 
StatsFull 
CmdBusy 

Definition at line 135 of file 3c509.c.

Enumerator:
EL3_ISA 
EL3_PNP 
EL3_EISA 

Definition at line 165 of file 3c509.c.

enum RxFilter
Enumerator:
RxStation 
RxMulticast 
RxBroadcast 
RxProm 
RxStation 
RxMulticast 
RxBroadcast 
RxProm 
RxStation 
RxMulticast 
RxBroadcast 
RxProm 
RxStation 
RxMulticast 
RxBroadcast 
RxProm 
RxStation 
RxMulticast 
RxBroadcast 
RxProm 

Definition at line 141 of file 3c509.c.

Function Documentation

MODULE_DESCRIPTION ( "3Com Etherlink III (3c509, 3c509B, 3c529, 3c579) ethernet driver"  )
module_exit ( el3_cleanup_module  )
module_init ( el3_init_module  )
MODULE_LICENSE ( "GPL"  )
module_param ( debug  ,
int  ,
 
)
module_param ( max_interrupt_work  ,
int  ,
 
)
module_param_array ( irq  ,
int  ,
NULL  ,
 
)
MODULE_PARM_DESC ( debug  ,
"debug level (0-6)"   
)
MODULE_PARM_DESC ( irq  ,
"IRQ number(s) (assigned)"   
)
MODULE_PARM_DESC ( max_interrupt_work  ,
"maximum events handled per interrupt  
)