Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions
de620.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/string.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/in.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/inet.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <asm/io.h>
#include "de620.h"

Go to the source code of this file.

Data Structures

struct  nic
 

Macros

#define DE620_CLONE   0
 
#define READ_DELAY   100 /* adapter internal read delay in 100ns units */
 
#define WRITE_DELAY   100 /* adapter internal write delay in 100ns units */
 
#define DE620_IO   0x378
 
#define DE620_IRQ   7
 
#define DATA_PORT   (dev->base_addr)
 
#define STATUS_PORT   (dev->base_addr + 1)
 
#define COMMAND_PORT   (dev->base_addr + 2)
 
#define RUNT   60 /* Too small Ethernet packet */
 
#define GIANT   1514 /* largest legal size packet, no fcs */
 
#define SCR_DEF   NIBBLEMODE |INTON | SLEEP | AUTOTX
 
#define TCR_DEF   RXPB /* not used: | TXSUCINT | T16INT */
 
#define DE620_RX_START_PAGE   12 /* 12 pages (=3k) reserved for tx */
 
#define DEF_NIC_CMD   IRQEN | ICEN | DS1
 
#define de620_tx_buffs(dd)   (inb(STATUS_PORT) & (TXBF0 | TXBF1))
 
#define de620_flip_ds(dd)   NIC_Cmd ^= DS0 | DS1; outb(NIC_Cmd, COMMAND_PORT);
 
#define CHECK_MASK   ( 0 | TXSUC | T16 | 0 | RXCRC | RXSHORT | 0 | 0 )
 
#define CHECK_OK   ( 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 )
 
#define sendit(dev, data)   de620_set_register(dev, W_EIP, data | EIPRegister);
 

Typedefs

typedef unsigned char byte
 

Functions

 module_param (bnc, int, 0)
 
 module_param (utp, int, 0)
 
 module_param (io, int, 0)
 
 module_param (irq, int, 0)
 
 module_param (clone, int, 0)
 
 MODULE_PARM_DESC (bnc,"DE-620 set BNC medium (0-1)")
 
 MODULE_PARM_DESC (utp,"DE-620 set UTP medium (0-1)")
 
 MODULE_PARM_DESC (io,"DE-620 I/O base address,required")
 
 MODULE_PARM_DESC (irq,"DE-620 IRQ number,required")
 
 MODULE_PARM_DESC (clone,"Check also for non-D-Link DE-620 clones (0-1)")
 
struct net_device *__init de620_probe (int unit)
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define CHECK_MASK   ( 0 | TXSUC | T16 | 0 | RXCRC | RXSHORT | 0 | 0 )
#define CHECK_OK   ( 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 )
#define COMMAND_PORT   (dev->base_addr + 2)

Definition at line 147 of file de620.c.

#define DATA_PORT   (dev->base_addr)

Definition at line 145 of file de620.c.

#define DE620_CLONE   0

Definition at line 72 of file de620.c.

#define de620_flip_ds (   dd)    NIC_Cmd ^= DS0 | DS1; outb(NIC_Cmd, COMMAND_PORT);

Definition at line 236 of file de620.c.

#define DE620_IO   0x378

Definition at line 138 of file de620.c.

#define DE620_IRQ   7

Definition at line 142 of file de620.c.

#define DE620_RX_START_PAGE   12 /* 12 pages (=3k) reserved for tx */

Definition at line 213 of file de620.c.

#define de620_tx_buffs (   dd)    (inb(STATUS_PORT) & (TXBF0 | TXBF1))

Definition at line 235 of file de620.c.

#define DEF_NIC_CMD   IRQEN | ICEN | DS1

Definition at line 214 of file de620.c.

#define GIANT   1514 /* largest legal size packet, no fcs */

Definition at line 150 of file de620.c.

#define READ_DELAY   100 /* adapter internal read delay in 100ns units */

Definition at line 84 of file de620.c.

#define RUNT   60 /* Too small Ethernet packet */

Definition at line 149 of file de620.c.

#define SCR_DEF   NIBBLEMODE |INTON | SLEEP | AUTOTX

Definition at line 211 of file de620.c.

#define sendit (   dev,
  data 
)    de620_set_register(dev, W_EIP, data | EIPRegister);

Definition at line 884 of file de620.c.

#define STATUS_PORT   (dev->base_addr + 1)

Definition at line 146 of file de620.c.

#define TCR_DEF   RXPB /* not used: | TXSUCINT | T16INT */

Definition at line 212 of file de620.c.

#define WRITE_DELAY   100 /* adapter internal write delay in 100ns units */

Definition at line 88 of file de620.c.

Typedef Documentation

typedef unsigned char byte

Definition at line 129 of file de620.c.

Function Documentation

struct net_device* __init de620_probe ( int  unit)
read

Definition at line 784 of file de620.c.

MODULE_LICENSE ( "GPL"  )
module_param ( bnc  ,
int  ,
 
)
module_param ( utp  ,
int  ,
 
)
module_param ( io  ,
int  ,
 
)
module_param ( irq  ,
int  ,
 
)
module_param ( clone  ,
int  ,
 
)
MODULE_PARM_DESC ( bnc  ,
"DE-620 set BNC medium (0-1)"   
)
MODULE_PARM_DESC ( utp  ,
"DE-620 set UTP medium (0-1)"   
)
MODULE_PARM_DESC ( io  ,
"DE-620 I/O base  address,
required"   
)
MODULE_PARM_DESC ( irq  ,
"DE-620 IRQ  number,
required"   
)
MODULE_PARM_DESC ( clone  ,
"Check also for non-D-Link DE-620 clones (0-1)"   
)