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

ne2k-pci.c File Reference

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/pci.h>
#include <linux/init.h>
#include <asm/system.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include "8390.h"

Include dependency graph for ne2k-pci.c:

Go to the source code of this file.

Defines

#define MAX_UNITS   6
#define USE_LONGIO
#define ne2k_flags   reg0
#define NE_BASE   (dev->base_addr)
#define NE_CMD   0x00
#define NE_DATAPORT   0x10
#define NE_RESET   0x1f
#define NE_IO_EXTENT   0x20
#define NESM_START_PG   0x40
#define NESM_STOP_PG   0x80

Enumerations

enum  {
  ONLY_16BIT_IO = 8, ONLY_32BIT_IO = 4, FORCE_FDX = 0x20, REALTEK_FDX = 0x40,
  HOLTEK_FDX = 0x80, STOP_PG_0x60 = 0x100
}

Functions

 MODULE_AUTHOR ("Donald Becker / Paul Gortmaker")
 MODULE_DESCRIPTION ("PCI NE2000 clone driver")
 MODULE_PARM (debug,"i")
 MODULE_PARM (options,"1-"__MODULE_STRING(MAX_UNITS)"i")
 MODULE_PARM (full_duplex,"1-"__MODULE_STRING(MAX_UNITS)"i")
int ne2k_pci_probe (struct device *dev)
static struct device * ne2k_pci_probe1 (struct device *dev, long ioaddr, int irq, int chip_idx)
static int ne2k_pci_open (struct device *dev)
static int ne2k_pci_close (struct device *dev)
static void ne2k_pci_reset_8390 (struct device *dev)
static void ne2k_pci_get_8390_hdr (struct device *dev, struct e8390_pkt_hdr *hdr, int ring_page)
static void ne2k_pci_block_input (struct device *dev, int count, struct sk_buff *skb, int ring_offset)
static void ne2k_pci_block_output (struct device *dev, const int count, const unsigned char *buf, const int start_page)
 __initfunc (int ne2k_pci_probe(struct device *dev))
 __initfunc (static struct device *ne2k_pci_probe1(struct device *dev, long ioaddr, int irq, int chip_idx))

Variables

static const char * version
static int debug = 1
static int full_duplex [MAX_UNITS] = {0, }
static int options [MAX_UNITS] = {0, }
struct {
   unsigned short   vendor
   unsigned short   dev_id
   char *   name
   int   flags
__initdata []
static struct ne2k_pci_cardne2k_card_list = NULL


Define Documentation

#define MAX_UNITS   6
 

Definition at line 65 of file ne2k-pci.c.

#define ne2k_flags   reg0
 

Definition at line 89 of file ne2k-pci.c.

#define NE_BASE   (dev->base_addr)
 

Definition at line 120 of file ne2k-pci.c.

#define NE_CMD   0x00
 

Definition at line 121 of file ne2k-pci.c.

#define NE_DATAPORT   0x10
 

Definition at line 122 of file ne2k-pci.c.

#define NE_IO_EXTENT   0x20
 

Definition at line 124 of file ne2k-pci.c.

#define NE_RESET   0x1f
 

Definition at line 123 of file ne2k-pci.c.

#define NESM_START_PG   0x40
 

Definition at line 126 of file ne2k-pci.c.

#define NESM_STOP_PG   0x80
 

Definition at line 127 of file ne2k-pci.c.

#define USE_LONGIO
 

Definition at line 79 of file ne2k-pci.c.


Enumeration Type Documentation

anonymous enum
 

Enumeration values:
ONLY_16BIT_IO 
ONLY_32BIT_IO 
FORCE_FDX 
REALTEK_FDX 
HOLTEK_FDX 
STOP_PG_0x60 

Definition at line 90 of file ne2k-pci.c.


Function Documentation

__initfunc static struct device *  ne2k_pci_probe1(struct device *dev,long ioaddr, int irq, int chip_idx)  ) 
 

Definition at line 287 of file ne2k-pci.c.

References E8390_CMD, E8390_NODMA, E8390_PAGE0, E8390_PAGE1, E8390_RREAD, E8390_RXOFF, E8390_START, E8390_STOP, E8390_TXOFF, ei_status, EN0_COUNTER0, EN0_DCFG, EN0_IMR, EN0_ISR, EN0_RCNTHI, EN0_RCNTLO, EN0_RSARHI, EN0_RSARLO, EN0_RXCR, EN0_TXCR, ENISR_RESET, ethdev_init(), FORCE_FDX, full_duplex, i, inb, init_etherdev(), inl, jiffies, le32_to_cpu, load_8390_module, MAX_UNITS, ne2k_pci_block_input(), ne2k_pci_block_output(), ne2k_pci_close(), ne2k_pci_get_8390_hdr(), ne2k_pci_open(), ne2k_pci_reset_8390(), NE_DATAPORT, NE_IO_EXTENT, NE_RESET, NESM_START_PG, NESM_STOP_PG, NS8390_init(), offset, ONLY_32BIT_IO, outb, printk, request_region, STOP_PG_0x60, TX_PAGES, u32, value, xff, and xFF.

Here is the call graph for this function:

__initfunc int   ne2k_pci_probe(struct device *dev)  ) 
 

Definition at line 210 of file ne2k-pci.c.

References cards_found, check_region, ne2k_pci_card::dev, ENODEV, i, KERN_ERR, KERN_INFO, KERN_WARNING, kmalloc(), name, ne2k_pci_probe1(), NE_IO_EXTENT, ne2k_pci_card::next, NR_IRQS, NULL, PCI_BASE_ADDRESS_IO_MASK, PCI_CLASS_NETWORK_ETHERNET, PCI_COMMAND, PCI_COMMAND_IO, ne2k_pci_card::pci_dev, pci_find_class(), pci_irq_line, pci_present, pci_read_config_word, pci_write_config_word, pdev, printk, u16, vendor, version, and version_printed.

Here is the call graph for this function:

MODULE_AUTHOR "Donald Becker / Paul Gortmaker"   ) 
 

MODULE_DESCRIPTION "PCI NE2000 clone driver  ) 
 

MODULE_PARM full_duplex  ,
"1-"__MODULE_STRING(MAX_UNITS)"i" 
 

MODULE_PARM options  ,
"1-"__MODULE_STRING(MAX_UNITS)"i" 
 

MODULE_PARM debug  ,
"i" 
 

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

Definition at line 522 of file ne2k-pci.c.

References buf, sk_buff::data, E8390_NODMA, E8390_PAGE0, E8390_RREAD, E8390_START, ei_status, EN0_ISR, EN0_RCNTHI, EN0_RCNTLO, EN0_RSARHI, EN0_RSARLO, ENISR_RDC, inb, insl, insw, inw, le16_to_cpu, NE_BASE, NE_CMD, NE_DATAPORT, ONLY_16BIT_IO, ONLY_32BIT_IO, outb, printk, u16, x01, and xff.

Referenced by __initfunc().

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

Definition at line 566 of file ne2k-pci.c.

References cpu_to_le16, dma_start, E8390_NODMA, E8390_PAGE0, E8390_RREAD, E8390_RWRITE, E8390_START, ei_status, EN0_ISR, EN0_RCNTHI, EN0_RCNTLO, EN0_RSARHI, EN0_RSARLO, ENISR_RDC, inb, jiffies, ne2k_pci_reset_8390(), NE_BASE, NE_CMD, NE_DATAPORT, NS8390_init(), ONLY_16BIT_IO, ONLY_32BIT_IO, outb, outsl, outsw, outw, printk, u16, x00, x01, x42, and xff.

Referenced by __initfunc().

Here is the call graph for this function:

static int ne2k_pci_close struct device *  dev  )  [static]
 

Definition at line 446 of file ne2k-pci.c.

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

Referenced by __initfunc().

Here is the call graph for this function:

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

Definition at line 483 of file ne2k-pci.c.

References e8390_pkt_hdr::count, E8390_NODMA, E8390_PAGE0, E8390_RREAD, E8390_START, ei_status, EN0_ISR, EN0_RCNTHI, EN0_RCNTLO, EN0_RSARHI, EN0_RSARLO, ENISR_RDC, inl, insw, le32_to_cpu, NE_BASE, NE_CMD, NE_DATAPORT, ONLY_16BIT_IO, outb, printk, and u32.

Referenced by __initfunc().

static int ne2k_pci_open struct device *  dev  )  [static]
 

Definition at line 427 of file ne2k-pci.c.

References E8390_NODMA, EAGAIN, ei_interrupt(), ei_open(), ei_status, FORCE_FDX, HOLTEK_FDX, inb, ioaddr, MOD_INC_USE_COUNT, NE_CMD, outb, REALTEK_FDX, request_irq(), SA_SHIRQ, x20, and x80.

Referenced by __initfunc().

Here is the call graph for this function:

int ne2k_pci_probe struct device *  dev  ) 
 

static struct device* ne2k_pci_probe1 struct device *  dev,
long  ioaddr,
int  irq,
int  chip_idx
[static]
 

Referenced by __initfunc().

static void ne2k_pci_reset_8390 struct device *  dev  )  [static]
 

Definition at line 457 of file ne2k-pci.c.

References debug, ei_status, EN0_ISR, ENISR_RESET, inb, jiffies, NE_BASE, NE_RESET, outb, and printk.

Referenced by __initfunc(), and ne2k_pci_block_output().


Variable Documentation

struct { ... } __initdata[] [static]
 

int debug = 1 [static]
 

Definition at line 63 of file ne2k-pci.c.

unsigned short dev_id
 

Definition at line 100 of file ne2k-pci.c.

int flags
 

Definition at line 102 of file ne2k-pci.c.

int full_duplex[MAX_UNITS] = {0, } [static]
 

Definition at line 67 of file ne2k-pci.c.

char* name
 

Definition at line 101 of file ne2k-pci.c.

struct ne2k_pci_card* ne2k_card_list = NULL [static]
 

Definition at line 153 of file ne2k-pci.c.

int options[MAX_UNITS] = {0, } [static]
 

Definition at line 68 of file ne2k-pci.c.

unsigned short vendor
 

Definition at line 100 of file ne2k-pci.c.

const char* version [static]
 

Initial value:

"ne2k-pci.c: v1.02 for Linux 2.2, 10/19/2000, D. Becker/P. Gortmaker,"
" http://www.scyld.com/network/ne2k-pci.html"

Definition at line 36 of file ne2k-pci.c.