Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

etherh.c File Reference

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/interrupt.h>
#include <linux/ptrace.h>
#include <linux/ioport.h>
#include <linux/in.h>
#include <linux/malloc.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/skbuff.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <asm/system.h>
#include <asm/bitops.h>
#include <asm/ecard.h>
#include <asm/io.h>
#include <asm/irq.h>
#include "../../net/8390.h"

Include dependency graph for etherh.c:

Go to the source code of this file.

Defines

#define NET_DEBUG   0
#define DEBUG_INIT   2
#define ETHERH500_DATAPORT   0x200
#define ETHERH500_NS8390   0x000
#define ETHERH500_CTRLPORT   0x200
#define ETHERH600_DATAPORT   16
#define ETHERH600_NS8390   0x200
#define ETHERH600_CTRLPORT   0x080
#define ETHERH_CP_IE   1
#define ETHERH_CP_IF   2
#define ETHERH_CP_HEARTBEAT   2
#define ETHERH_TX_START_PAGE   1
#define ETHERH_STOP_PAGE   0x7f

Functions

 MODULE_AUTHOR ("Russell King")
 MODULE_DESCRIPTION ("i3 EtherH driver")
 __initfunc (static int etherh_addr(char *addr, struct expansion_card *ec))
static void etherh_setif (struct device *dev)
static int etherh_getifstat (struct device *dev)
static void etherh_reset (struct device *dev)
static void etherh_block_output (struct device *dev, int count, const unsigned char *buf, int start_page)
static void etherh_block_input (struct device *dev, int count, struct sk_buff *skb, int ring_offset)
static void etherh_get_header (struct device *dev, struct e8390_pkt_hdr *hdr, int ring_page)
static int etherh_open (struct device *dev)
static int etherh_close (struct device *dev)
 __initfunc (static int etherh_probe1(struct device *dev))
static void etherh_irq_enable (ecard_t *ec, int irqnr)
static void etherh_irq_disable (ecard_t *ec, int irqnr)
 __initfunc (static void etherh_initdev(ecard_t *ec, struct device *dev))
 __initfunc (int etherh_probe(struct device *dev))

Variables

static unsigned int net_debug = NET_DEBUG
static const card_ids __init etherh_cids []
static char * version = "etherh [500/600/600A] ethernet driver (c) 1998 R.M.King v1.05\n"
static expansioncard_ops_t etherh_ops


Define Documentation

#define DEBUG_INIT   2
 

Definition at line 51 of file etherh.c.

Referenced by __initfunc().

#define ETHERH500_CTRLPORT   0x200
 

Definition at line 68 of file etherh.c.

Referenced by __initfunc().

#define ETHERH500_DATAPORT   0x200
 

Definition at line 66 of file etherh.c.

Referenced by __initfunc().

#define ETHERH500_NS8390   0x000
 

Definition at line 67 of file etherh.c.

Referenced by __initfunc().

#define ETHERH600_CTRLPORT   0x080
 

Definition at line 72 of file etherh.c.

Referenced by __initfunc().

#define ETHERH600_DATAPORT   16
 

Definition at line 70 of file etherh.c.

Referenced by __initfunc().

#define ETHERH600_NS8390   0x200
 

Definition at line 71 of file etherh.c.

Referenced by __initfunc().

#define ETHERH_CP_HEARTBEAT   2
 

Definition at line 76 of file etherh.c.

Referenced by etherh_getifstat().

#define ETHERH_CP_IE   1
 

Definition at line 74 of file etherh.c.

Referenced by etherh_irq_disable(), and etherh_irq_enable().

#define ETHERH_CP_IF   2
 

Definition at line 75 of file etherh.c.

Referenced by etherh_setif().

#define ETHERH_STOP_PAGE   0x7f
 

Definition at line 79 of file etherh.c.

Referenced by __initfunc().

#define ETHERH_TX_START_PAGE   1
 

Definition at line 78 of file etherh.c.

Referenced by __initfunc().

#define NET_DEBUG   0
 

Definition at line 50 of file etherh.c.


Function Documentation

__initfunc int   etherh_probe(struct device *dev)  ) 
 

Definition at line 499 of file etherh.c.

References ec, ecard_find(), ecard_startfind(), ENODEV, and etherh_cids.

Here is the call graph for this function:

__initfunc static void   etherh_initdev(ecard_t *ec, struct device *dev)  ) 
 

Definition at line 466 of file etherh.c.

References ecard_address(), ecard_claim, ECARD_FAST, ECARD_IOC, ECARD_MEMC, ETHERH500_CTRLPORT, ETHERH500_DATAPORT, ETHERH500_NS8390, ETHERH600_CTRLPORT, ETHERH600_DATAPORT, ETHERH600_NS8390, long, printk, PROD_I3_ETHERLAN500, PROD_I3_ETHERLAN600, and PROD_I3_ETHERLAN600A.

Here is the call graph for this function:

__initfunc static int   etherh_probe1(struct device *dev)  ) 
 

Definition at line 355 of file etherh.c.

References addr, DEBUG_INIT, E8390_CMD, E8390_NODMA, E8390_PAGE0, E8390_PAGE1, E8390_STOP, ei_status, EN0_COUNTER0, ENODEV, ENOMEM, ethdev_init(), etherh_block_input(), etherh_block_output(), etherh_close(), etherh_get_header(), etherh_getifstat(), etherh_open(), etherh_reset(), etherh_setif(), ETHERH_STOP_PAGE, ETHERH_TX_START_PAGE, i, inb, mdelay, net_debug, NS8390_init(), outb, printk, PROD_I3_ETHERLAN500, PROD_I3_ETHERLAN600, PROD_I3_ETHERLAN600A, request_region, tmp, TX_PAGES, version, version_printed, and xff.

Here is the call graph for this function:

__initfunc static int   etherh_addr(char *addr, struct expansion_card *ec)  ) 
 

Definition at line 87 of file etherh.c.

References in_chunk_dir::d, ecard_readchunk(), ENODEV, i, s, simple_strtoul(), strchr, and x10.

Here is the call graph for this function:

static void etherh_block_input struct device *  dev,
int  count,
struct sk_buff skb,
int  ring_offset
[static]
 

Definition at line 244 of file etherh.c.

References addr, buf, sk_buff::data, E8390_CMD, E8390_NODMA, E8390_PAGE0, E8390_RREAD, E8390_START, ei_status, EN0_ISR, EN0_RCNTHI, EN0_RCNTLO, EN0_RSARHI, EN0_RSARLO, ENISR_RDC, inb, insb, insw, outb, and printk.

Referenced by __initfunc().

static void etherh_block_output struct device *  dev,
int  count,
const unsigned char *  buf,
int  start_page
[static]
 

Definition at line 186 of file etherh.c.

References addr, dma_start, E8390_CMD, E8390_NODMA, E8390_PAGE0, E8390_RREAD, E8390_RWRITE, E8390_START, ei_status, EN0_ISR, EN0_RCNTHI, EN0_RCNTLO, EN0_RSARHI, EN0_RSARLO, ENISR_RDC, etherh_reset(), HZ, inb, jiffies, NS8390_init(), outb, outsb, outsw, printk, udelay, x00, and x42.

Referenced by __initfunc().

Here is the call graph for this function:

static int etherh_close struct device *  dev  )  [static]
 

Definition at line 343 of file etherh.c.

References ei_close(), free_irq(), and MOD_DEC_USE_COUNT.

Referenced by __initfunc().

Here is the call graph for this function:

static void etherh_get_header struct device *  dev,
struct e8390_pkt_hdr hdr,
int  ring_page
[static]
 

Definition at line 284 of file etherh.c.

References addr, E8390_CMD, E8390_NODMA, E8390_PAGE0, E8390_RREAD, E8390_START, ei_status, EN0_ISR, EN0_RCNTHI, EN0_RCNTLO, EN0_RSARHI, EN0_RSARLO, ENISR_RDC, insb, insw, outb, and printk.

Referenced by __initfunc().

static int etherh_getifstat struct device *  dev  )  [static]
 

Definition at line 143 of file etherh.c.

References ei_status, EN0_RCNTHI, ETHERH_CP_HEARTBEAT, inb, PROD_I3_ETHERLAN500, PROD_I3_ETHERLAN600, and PROD_I3_ETHERLAN600A.

Referenced by __initfunc().

static void etherh_irq_disable ecard_t ec,
int  irqnr
[static]
 

Definition at line 451 of file etherh.c.

References ETHERH_CP_IE, inb, expansion_card::irq_data, and outb.

static void etherh_irq_enable ecard_t ec,
int  irqnr
[static]
 

Definition at line 445 of file etherh.c.

References ETHERH_CP_IE, inb, expansion_card::irq_data, and outb.

static int etherh_open struct device *  dev  )  [static]
 

Definition at line 325 of file etherh.c.

References EAGAIN, ei_interrupt(), ei_open(), etherh_reset(), MOD_DEC_USE_COUNT, MOD_INC_USE_COUNT, and request_irq().

Referenced by __initfunc().

Here is the call graph for this function:

static void etherh_reset struct device *  dev  )  [static]
 

Definition at line 175 of file etherh.c.

References E8390_NODMA, E8390_PAGE0, E8390_STOP, etherh_setif(), and outb_p.

Referenced by __initfunc(), etherh_block_output(), and etherh_open().

Here is the call graph for this function:

static void etherh_setif struct device *  dev  )  [static]
 

Definition at line 107 of file etherh.c.

References addr, ei_status, EN0_RCNTHI, ETHERH_CP_IF, inb, outb, PROD_I3_ETHERLAN500, PROD_I3_ETHERLAN600, PROD_I3_ETHERLAN600A, restore_flags, save_flags_cli, and xf8.

Referenced by __initfunc(), and etherh_reset().

MODULE_AUTHOR "Russell King"   ) 
 

MODULE_DESCRIPTION "i3 EtherH driver  ) 
 


Variable Documentation

const card_ids __init etherh_cids[] [static]
 

Initial value:

Definition at line 54 of file etherh.c.

Referenced by __initfunc().

expansioncard_ops_t etherh_ops [static]
 

Initial value:

 {
        etherh_irq_enable,
        etherh_irq_disable,
        NULL,
        NULL,
        NULL,
        NULL
}

Definition at line 457 of file etherh.c.

unsigned int net_debug = NET_DEBUG [static]
 

Definition at line 53 of file etherh.c.

char* version = "etherh [500/600/600A] ethernet driver (c) 1998 R.M.King v1.05\n" [static]
 

Definition at line 64 of file etherh.c.