Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
8390.h File Reference
#include <linux/if_ether.h>
#include <linux/ioport.h>
#include <linux/irqreturn.h>
#include <linux/skbuff.h>

Go to the source code of this file.

Data Structures

struct  e8390_pkt_hdr
 
struct  ei_device
 

Macros

#define TX_PAGES   12 /* Two Tx slots */
 
#define ei_debug   1
 
#define MAX_SERVICE   12
 
#define TX_TIMEOUT   (20*HZ/100)
 
#define ei_status   (*(struct ei_device *)netdev_priv(dev))
 
#define E8390_TX_IRQ_MASK   0xa /* For register EN0_ISR */
 
#define E8390_RX_IRQ_MASK   0x5
 
#define E8390_RXCONFIG   0x4 /* EN0_RXCR: broadcasts, no multicast,errors */
 
#define E8390_RXOFF   0x20 /* EN0_RXCR: Accept no packets */
 
#define E8390_TXCONFIG   0x00 /* EN0_TXCR: Normal transmit mode */
 
#define E8390_TXOFF   0x02 /* EN0_TXCR: Transmitter off */
 
#define E8390_STOP   0x01 /* Stop and reset the chip */
 
#define E8390_START   0x02 /* Start the chip, clear reset */
 
#define E8390_TRANS   0x04 /* Transmit a frame */
 
#define E8390_RREAD   0x08 /* Remote read */
 
#define E8390_RWRITE   0x10 /* Remote write */
 
#define E8390_NODMA   0x20 /* Remote DMA */
 
#define E8390_PAGE0   0x00 /* Select page chip registers */
 
#define E8390_PAGE1   0x40 /* using the two high-order bits */
 
#define E8390_PAGE2   0x80 /* Page 3 is invalid. */
 
#define ei_inb(_p)   inb(_p)
 
#define ei_outb(_v, _p)   outb(_v,_p)
 
#define ei_inb_p(_p)   inb(_p)
 
#define ei_outb_p(_v, _p)   outb(_v,_p)
 
#define EI_SHIFT(x)   (x)
 
#define E8390_CMD   EI_SHIFT(0x00) /* The command register (for all pages) */
 
#define EN0_CLDALO   EI_SHIFT(0x01) /* Low byte of current local dma addr RD */
 
#define EN0_STARTPG   EI_SHIFT(0x01) /* Starting page of ring bfr WR */
 
#define EN0_CLDAHI   EI_SHIFT(0x02) /* High byte of current local dma addr RD */
 
#define EN0_STOPPG   EI_SHIFT(0x02) /* Ending page +1 of ring bfr WR */
 
#define EN0_BOUNDARY   EI_SHIFT(0x03) /* Boundary page of ring bfr RD WR */
 
#define EN0_TSR   EI_SHIFT(0x04) /* Transmit status reg RD */
 
#define EN0_TPSR   EI_SHIFT(0x04) /* Transmit starting page WR */
 
#define EN0_NCR   EI_SHIFT(0x05) /* Number of collision reg RD */
 
#define EN0_TCNTLO   EI_SHIFT(0x05) /* Low byte of tx byte count WR */
 
#define EN0_FIFO   EI_SHIFT(0x06) /* FIFO RD */
 
#define EN0_TCNTHI   EI_SHIFT(0x06) /* High byte of tx byte count WR */
 
#define EN0_ISR   EI_SHIFT(0x07) /* Interrupt status reg RD WR */
 
#define EN0_CRDALO   EI_SHIFT(0x08) /* low byte of current remote dma address RD */
 
#define EN0_RSARLO   EI_SHIFT(0x08) /* Remote start address reg 0 */
 
#define EN0_CRDAHI   EI_SHIFT(0x09) /* high byte, current remote dma address RD */
 
#define EN0_RSARHI   EI_SHIFT(0x09) /* Remote start address reg 1 */
 
#define EN0_RCNTLO   EI_SHIFT(0x0a) /* Remote byte count reg WR */
 
#define EN0_RCNTHI   EI_SHIFT(0x0b) /* Remote byte count reg WR */
 
#define EN0_RSR   EI_SHIFT(0x0c) /* rx status reg RD */
 
#define EN0_RXCR   EI_SHIFT(0x0c) /* RX configuration reg WR */
 
#define EN0_TXCR   EI_SHIFT(0x0d) /* TX configuration reg WR */
 
#define EN0_COUNTER0   EI_SHIFT(0x0d) /* Rcv alignment error counter RD */
 
#define EN0_DCFG   EI_SHIFT(0x0e) /* Data configuration reg WR */
 
#define EN0_COUNTER1   EI_SHIFT(0x0e) /* Rcv CRC error counter RD */
 
#define EN0_IMR   EI_SHIFT(0x0f) /* Interrupt mask reg WR */
 
#define EN0_COUNTER2   EI_SHIFT(0x0f) /* Rcv missed frame error counter RD */
 
#define ENISR_RX   0x01 /* Receiver, no error */
 
#define ENISR_TX   0x02 /* Transmitter, no error */
 
#define ENISR_RX_ERR   0x04 /* Receiver, with error */
 
#define ENISR_TX_ERR   0x08 /* Transmitter, with error */
 
#define ENISR_OVER   0x10 /* Receiver overwrote the ring */
 
#define ENISR_COUNTERS   0x20 /* Counters need emptying */
 
#define ENISR_RDC   0x40 /* remote dma complete */
 
#define ENISR_RESET   0x80 /* Reset completed */
 
#define ENISR_ALL   0x3f /* Interrupts we will enable */
 
#define ENDCFG_WTS   0x01 /* word transfer mode selection */
 
#define ENDCFG_BOS   0x02 /* byte order selection */
 
#define EN1_PHYS   EI_SHIFT(0x01) /* This board's physical enet addr RD WR */
 
#define EN1_PHYS_SHIFT(i)   EI_SHIFT(i+1) /* Get and set mac address */
 
#define EN1_CURPAG   EI_SHIFT(0x07) /* Current memory page RD WR */
 
#define EN1_MULT   EI_SHIFT(0x08) /* Multicast filter mask array (8 bytes) RD WR */
 
#define EN1_MULT_SHIFT(i)   EI_SHIFT(8+i) /* Get and set multicast filter */
 
#define ENRSR_RXOK   0x01 /* Received a good packet */
 
#define ENRSR_CRC   0x02 /* CRC error */
 
#define ENRSR_FAE   0x04 /* frame alignment error */
 
#define ENRSR_FO   0x08 /* FIFO overrun */
 
#define ENRSR_MPA   0x10 /* missed pkt */
 
#define ENRSR_PHY   0x20 /* physical/multicast address */
 
#define ENRSR_DIS   0x40 /* receiver disable. set in monitor mode */
 
#define ENRSR_DEF   0x80 /* deferring */
 
#define ENTSR_PTX   0x01 /* Packet transmitted without error */
 
#define ENTSR_ND   0x02 /* The transmit wasn't deferred. */
 
#define ENTSR_COL   0x04 /* The transmit collided at least once. */
 
#define ENTSR_ABT   0x08 /* The transmit collided 16 times, and was deferred. */
 
#define ENTSR_CRS   0x10 /* The carrier sense was lost. */
 
#define ENTSR_FU   0x20 /* A "FIFO underrun" occurred during transmit. */
 
#define ENTSR_CDH   0x40 /* The collision detect "heartbeat" signal was lost. */
 
#define ENTSR_OWC   0x80 /* There was an out-of-window collision. */
 

Functions

void NS8390_init (struct net_device *dev, int startp)
 
int ei_open (struct net_device *dev)
 
int ei_close (struct net_device *dev)
 
irqreturn_t ei_interrupt (int irq, void *dev_id)
 
void ei_tx_timeout (struct net_device *dev)
 
netdev_tx_t ei_start_xmit (struct sk_buff *skb, struct net_device *dev)
 
void ei_set_multicast_list (struct net_device *dev)
 
struct net_device_statsei_get_stats (struct net_device *dev)
 
struct net_device__alloc_ei_netdev (int size)
 
void NS8390p_init (struct net_device *dev, int startp)
 
int eip_open (struct net_device *dev)
 
int eip_close (struct net_device *dev)
 
irqreturn_t eip_interrupt (int irq, void *dev_id)
 
void eip_tx_timeout (struct net_device *dev)
 
netdev_tx_t eip_start_xmit (struct sk_buff *skb, struct net_device *dev)
 
void eip_set_multicast_list (struct net_device *dev)
 
struct net_device_statseip_get_stats (struct net_device *dev)
 
struct net_device__alloc_eip_netdev (int size)
 

Variables

struct net_device_ops ei_netdev_ops
 
struct net_device_ops eip_netdev_ops
 

Macro Definition Documentation

#define E8390_CMD   EI_SHIFT(0x00) /* The command register (for all pages) */

Definition at line 159 of file 8390.h.

#define E8390_NODMA   0x20 /* Remote DMA */

Definition at line 137 of file 8390.h.

#define E8390_PAGE0   0x00 /* Select page chip registers */

Definition at line 138 of file 8390.h.

#define E8390_PAGE1   0x40 /* using the two high-order bits */

Definition at line 139 of file 8390.h.

#define E8390_PAGE2   0x80 /* Page 3 is invalid. */

Definition at line 140 of file 8390.h.

#define E8390_RREAD   0x08 /* Remote read */

Definition at line 135 of file 8390.h.

#define E8390_RWRITE   0x10 /* Remote write */

Definition at line 136 of file 8390.h.

#define E8390_RX_IRQ_MASK   0x5

Definition at line 117 of file 8390.h.

#define E8390_RXCONFIG   0x4 /* EN0_RXCR: broadcasts, no multicast,errors */

Definition at line 123 of file 8390.h.

#define E8390_RXOFF   0x20 /* EN0_RXCR: Accept no packets */

Definition at line 124 of file 8390.h.

#define E8390_START   0x02 /* Start the chip, clear reset */

Definition at line 133 of file 8390.h.

#define E8390_STOP   0x01 /* Stop and reset the chip */

Definition at line 132 of file 8390.h.

#define E8390_TRANS   0x04 /* Transmit a frame */

Definition at line 134 of file 8390.h.

#define E8390_TX_IRQ_MASK   0xa /* For register EN0_ISR */

Definition at line 116 of file 8390.h.

#define E8390_TXCONFIG   0x00 /* EN0_TXCR: Normal transmit mode */

Definition at line 127 of file 8390.h.

#define E8390_TXOFF   0x02 /* EN0_TXCR: Transmitter off */

Definition at line 128 of file 8390.h.

#define ei_debug   1

Definition at line 27 of file 8390.h.

#define ei_inb (   _p)    inb(_p)

Definition at line 149 of file 8390.h.

#define ei_inb_p (   _p)    inb(_p)

Definition at line 151 of file 8390.h.

#define ei_outb (   _v,
  _p 
)    outb(_v,_p)

Definition at line 150 of file 8390.h.

#define ei_outb_p (   _v,
  _p 
)    outb(_v,_p)

Definition at line 152 of file 8390.h.

#define EI_SHIFT (   x)    (x)

Definition at line 156 of file 8390.h.

#define ei_status   (*(struct ei_device *)netdev_priv(dev))

Definition at line 113 of file 8390.h.

#define EN0_BOUNDARY   EI_SHIFT(0x03) /* Boundary page of ring bfr RD WR */

Definition at line 165 of file 8390.h.

#define EN0_CLDAHI   EI_SHIFT(0x02) /* High byte of current local dma addr RD */

Definition at line 163 of file 8390.h.

#define EN0_CLDALO   EI_SHIFT(0x01) /* Low byte of current local dma addr RD */

Definition at line 161 of file 8390.h.

#define EN0_COUNTER0   EI_SHIFT(0x0d) /* Rcv alignment error counter RD */

Definition at line 182 of file 8390.h.

#define EN0_COUNTER1   EI_SHIFT(0x0e) /* Rcv CRC error counter RD */

Definition at line 184 of file 8390.h.

#define EN0_COUNTER2   EI_SHIFT(0x0f) /* Rcv missed frame error counter RD */

Definition at line 186 of file 8390.h.

#define EN0_CRDAHI   EI_SHIFT(0x09) /* high byte, current remote dma address RD */

Definition at line 175 of file 8390.h.

#define EN0_CRDALO   EI_SHIFT(0x08) /* low byte of current remote dma address RD */

Definition at line 173 of file 8390.h.

#define EN0_DCFG   EI_SHIFT(0x0e) /* Data configuration reg WR */

Definition at line 183 of file 8390.h.

#define EN0_FIFO   EI_SHIFT(0x06) /* FIFO RD */

Definition at line 170 of file 8390.h.

#define EN0_IMR   EI_SHIFT(0x0f) /* Interrupt mask reg WR */

Definition at line 185 of file 8390.h.

#define EN0_ISR   EI_SHIFT(0x07) /* Interrupt status reg RD WR */

Definition at line 172 of file 8390.h.

#define EN0_NCR   EI_SHIFT(0x05) /* Number of collision reg RD */

Definition at line 168 of file 8390.h.

#define EN0_RCNTHI   EI_SHIFT(0x0b) /* Remote byte count reg WR */

Definition at line 178 of file 8390.h.

#define EN0_RCNTLO   EI_SHIFT(0x0a) /* Remote byte count reg WR */

Definition at line 177 of file 8390.h.

#define EN0_RSARHI   EI_SHIFT(0x09) /* Remote start address reg 1 */

Definition at line 176 of file 8390.h.

#define EN0_RSARLO   EI_SHIFT(0x08) /* Remote start address reg 0 */

Definition at line 174 of file 8390.h.

#define EN0_RSR   EI_SHIFT(0x0c) /* rx status reg RD */

Definition at line 179 of file 8390.h.

#define EN0_RXCR   EI_SHIFT(0x0c) /* RX configuration reg WR */

Definition at line 180 of file 8390.h.

#define EN0_STARTPG   EI_SHIFT(0x01) /* Starting page of ring bfr WR */

Definition at line 162 of file 8390.h.

#define EN0_STOPPG   EI_SHIFT(0x02) /* Ending page +1 of ring bfr WR */

Definition at line 164 of file 8390.h.

#define EN0_TCNTHI   EI_SHIFT(0x06) /* High byte of tx byte count WR */

Definition at line 171 of file 8390.h.

#define EN0_TCNTLO   EI_SHIFT(0x05) /* Low byte of tx byte count WR */

Definition at line 169 of file 8390.h.

#define EN0_TPSR   EI_SHIFT(0x04) /* Transmit starting page WR */

Definition at line 167 of file 8390.h.

#define EN0_TSR   EI_SHIFT(0x04) /* Transmit status reg RD */

Definition at line 166 of file 8390.h.

#define EN0_TXCR   EI_SHIFT(0x0d) /* TX configuration reg WR */

Definition at line 181 of file 8390.h.

#define EN1_CURPAG   EI_SHIFT(0x07) /* Current memory page RD WR */

Definition at line 206 of file 8390.h.

#define EN1_MULT   EI_SHIFT(0x08) /* Multicast filter mask array (8 bytes) RD WR */

Definition at line 207 of file 8390.h.

#define EN1_MULT_SHIFT (   i)    EI_SHIFT(8+i) /* Get and set multicast filter */

Definition at line 208 of file 8390.h.

#define EN1_PHYS   EI_SHIFT(0x01) /* This board's physical enet addr RD WR */

Definition at line 204 of file 8390.h.

#define EN1_PHYS_SHIFT (   i)    EI_SHIFT(i+1) /* Get and set mac address */

Definition at line 205 of file 8390.h.

#define ENDCFG_BOS   0x02 /* byte order selection */

Definition at line 201 of file 8390.h.

#define ENDCFG_WTS   0x01 /* word transfer mode selection */

Definition at line 200 of file 8390.h.

#define ENISR_ALL   0x3f /* Interrupts we will enable */

Definition at line 197 of file 8390.h.

#define ENISR_COUNTERS   0x20 /* Counters need emptying */

Definition at line 194 of file 8390.h.

#define ENISR_OVER   0x10 /* Receiver overwrote the ring */

Definition at line 193 of file 8390.h.

#define ENISR_RDC   0x40 /* remote dma complete */

Definition at line 195 of file 8390.h.

#define ENISR_RESET   0x80 /* Reset completed */

Definition at line 196 of file 8390.h.

#define ENISR_RX   0x01 /* Receiver, no error */

Definition at line 189 of file 8390.h.

#define ENISR_RX_ERR   0x04 /* Receiver, with error */

Definition at line 191 of file 8390.h.

#define ENISR_TX   0x02 /* Transmitter, no error */

Definition at line 190 of file 8390.h.

#define ENISR_TX_ERR   0x08 /* Transmitter, with error */

Definition at line 192 of file 8390.h.

#define ENRSR_CRC   0x02 /* CRC error */

Definition at line 212 of file 8390.h.

#define ENRSR_DEF   0x80 /* deferring */

Definition at line 218 of file 8390.h.

#define ENRSR_DIS   0x40 /* receiver disable. set in monitor mode */

Definition at line 217 of file 8390.h.

#define ENRSR_FAE   0x04 /* frame alignment error */

Definition at line 213 of file 8390.h.

#define ENRSR_FO   0x08 /* FIFO overrun */

Definition at line 214 of file 8390.h.

#define ENRSR_MPA   0x10 /* missed pkt */

Definition at line 215 of file 8390.h.

#define ENRSR_PHY   0x20 /* physical/multicast address */

Definition at line 216 of file 8390.h.

#define ENRSR_RXOK   0x01 /* Received a good packet */

Definition at line 211 of file 8390.h.

#define ENTSR_ABT   0x08 /* The transmit collided 16 times, and was deferred. */

Definition at line 224 of file 8390.h.

#define ENTSR_CDH   0x40 /* The collision detect "heartbeat" signal was lost. */

Definition at line 227 of file 8390.h.

#define ENTSR_COL   0x04 /* The transmit collided at least once. */

Definition at line 223 of file 8390.h.

#define ENTSR_CRS   0x10 /* The carrier sense was lost. */

Definition at line 225 of file 8390.h.

#define ENTSR_FU   0x20 /* A "FIFO underrun" occurred during transmit. */

Definition at line 226 of file 8390.h.

#define ENTSR_ND   0x02 /* The transmit wasn't deferred. */

Definition at line 222 of file 8390.h.

#define ENTSR_OWC   0x80 /* There was an out-of-window collision. */

Definition at line 228 of file 8390.h.

#define ENTSR_PTX   0x01 /* Packet transmitted without error */

Definition at line 221 of file 8390.h.

#define MAX_SERVICE   12

Definition at line 108 of file 8390.h.

#define TX_PAGES   12 /* Two Tx slots */

Definition at line 15 of file 8390.h.

#define TX_TIMEOUT   (20*HZ/100)

Definition at line 111 of file 8390.h.

Function Documentation

struct net_device* __alloc_ei_netdev ( int  size)
read

Definition at line 74 of file 8390.c.

struct net_device* __alloc_eip_netdev ( int  size)
read

Definition at line 79 of file 8390p.c.

int ei_close ( struct net_device dev)

Definition at line 14 of file 8390.c.

struct net_device_stats* ei_get_stats ( struct net_device dev)
read

Definition at line 26 of file 8390.c.

irqreturn_t ei_interrupt ( int  irq,
void dev_id 
)

Definition at line 44 of file 8390.c.

int ei_open ( struct net_device dev)

Definition at line 8 of file 8390.c.

void ei_set_multicast_list ( struct net_device dev)

Definition at line 32 of file 8390.c.

netdev_tx_t ei_start_xmit ( struct sk_buff skb,
struct net_device dev 
)

Definition at line 20 of file 8390.c.

void ei_tx_timeout ( struct net_device dev)

Definition at line 38 of file 8390.c.

int eip_close ( struct net_device dev)

Definition at line 19 of file 8390p.c.

struct net_device_stats* eip_get_stats ( struct net_device dev)
read

Definition at line 31 of file 8390p.c.

irqreturn_t eip_interrupt ( int  irq,
void dev_id 
)

Definition at line 49 of file 8390p.c.

int eip_open ( struct net_device dev)

Definition at line 13 of file 8390p.c.

void eip_set_multicast_list ( struct net_device dev)

Definition at line 37 of file 8390p.c.

netdev_tx_t eip_start_xmit ( struct sk_buff skb,
struct net_device dev 
)

Definition at line 25 of file 8390p.c.

void eip_tx_timeout ( struct net_device dev)

Definition at line 43 of file 8390p.c.

void NS8390_init ( struct net_device dev,
int  startp 
)

Definition at line 83 of file 8390.c.

void NS8390p_init ( struct net_device dev,
int  startp 
)

Definition at line 88 of file 8390p.c.

Variable Documentation

struct net_device_ops ei_netdev_ops

Definition at line 58 of file 8390.c.

struct net_device_ops eip_netdev_ops

Definition at line 63 of file 8390p.c.