patch-2.3.14 linux/drivers/net/3c503.c

Next file: linux/drivers/net/3c505.c
Previous file: linux/drivers/net/3c501.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.13/linux/drivers/net/3c503.c linux/drivers/net/3c503.c
@@ -52,9 +52,9 @@
 #include "3c503.h"
 #define WRD_COUNT 4
 
-int el2_probe(struct device *dev);
-int el2_pio_probe(struct device *dev);
-int el2_probe1(struct device *dev, int ioaddr);
+int el2_probe(struct net_device *dev);
+int el2_pio_probe(struct net_device *dev);
+int el2_probe1(struct net_device *dev, int ioaddr);
 
 /* A zero-terminated list of I/O addresses to be probed in PIO mode. */
 static unsigned int netcard_portlist[] __initdata =
@@ -71,15 +71,15 @@
 {"3c503pio", el2_pioprobe1, EL1_IO_EXTENT, netcard_portlist};
 #endif
 
-static int el2_open(struct device *dev);
-static int el2_close(struct device *dev);
-static void el2_reset_8390(struct device *dev);
-static void el2_init_card(struct device *dev);
-static void el2_block_output(struct device *dev, int count,
+static int el2_open(struct net_device *dev);
+static int el2_close(struct net_device *dev);
+static void el2_reset_8390(struct net_device *dev);
+static void el2_init_card(struct net_device *dev);
+static void el2_block_output(struct net_device *dev, int count,
 			     const unsigned char *buf, int start_page);
-static void el2_block_input(struct device *dev, int count, struct sk_buff *skb,
+static void el2_block_input(struct net_device *dev, int count, struct sk_buff *skb,
 			   int ring_offset);
-static void el2_get_8390_hdr(struct device *dev, struct e8390_pkt_hdr *hdr,
+static void el2_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr,
 			 int ring_page);
 
 
@@ -91,7 +91,7 @@
    ethercard jumpered to programmed-I/O mode.
    */
 int __init 
-el2_probe(struct device *dev)
+el2_probe(struct net_device *dev)
 {
     int *addr, addrs[] = { 0xddffe, 0xd9ffe, 0xcdffe, 0xc9ffe, 0};
     int base_addr = dev->base_addr;
@@ -126,7 +126,7 @@
 /*  Try all of the locations that aren't obviously empty.  This touches
     a lot of locations, and is much riskier than the code above. */
 int __init 
-el2_pio_probe(struct device *dev)
+el2_pio_probe(struct net_device *dev)
 {
     int i;
     int base_addr = dev ? dev->base_addr : 0;
@@ -152,7 +152,7 @@
    returning non-zero on success.  If found, set the station
    address and memory parameters in DEVICE. */
 int __init 
-el2_probe1(struct device *dev, int ioaddr)
+el2_probe1(struct net_device *dev, int ioaddr)
 {
     int i, iobase_reg, membase_reg, saved_406, wordlength;
     static unsigned version_printed = 0;
@@ -334,7 +334,7 @@
 }
 
 static int
-el2_open(struct device *dev)
+el2_open(struct net_device *dev)
 {
 
     if (dev->irq < 2) {
@@ -370,7 +370,7 @@
 }
 
 static int
-el2_close(struct device *dev)
+el2_close(struct net_device *dev)
 {
     free_irq(dev->irq, dev);
     dev->irq = ei_status.saved_irq;
@@ -386,7 +386,7 @@
        Bad ring buffer packet header
  */
 static void
-el2_reset_8390(struct device *dev)
+el2_reset_8390(struct net_device *dev)
 {
     if (ei_debug > 1) {
 	printk("%s: Resetting the 3c503 board...", dev->name);
@@ -402,7 +402,7 @@
 
 /* Initialize the 3c503 GA registers after a reset. */
 static void
-el2_init_card(struct device *dev)
+el2_init_card(struct net_device *dev)
 {
     /* Unmap the station PROM and select the DIX or BNC connector. */
     outb_p(ei_status.interface_num==0 ? ECNTRL_THIN : ECNTRL_AUI, E33G_CNTRL);
@@ -434,7 +434,7 @@
  * out through the ASIC FIFO.
  */
 static void
-el2_block_output(struct device *dev, int count,
+el2_block_output(struct net_device *dev, int count,
 		 const unsigned char *buf, int start_page)
 {
     unsigned short int *wrd;
@@ -507,7 +507,7 @@
 
 /* Read the 4 byte, page aligned 8390 specific header. */
 static void
-el2_get_8390_hdr(struct device *dev, struct e8390_pkt_hdr *hdr, int ring_page)
+el2_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_page)
 {
     int boguscount;
     unsigned long hdr_start = dev->mem_start + ((ring_page - EL2_MB1_START_PG)<<8);
@@ -546,7 +546,7 @@
 
 
 static void
-el2_block_input(struct device *dev, int count, struct sk_buff *skb, int ring_offset)
+el2_block_input(struct net_device *dev, int count, struct sk_buff *skb, int ring_offset)
 {
     int boguscount = 0;
     unsigned short int *buf;
@@ -625,7 +625,7 @@
 #define NAMELEN 	8	/* #of chars for storing dev->name */
 
 static char namelist[NAMELEN * MAX_EL2_CARDS] = { 0, };
-static struct device dev_el2[MAX_EL2_CARDS] = {
+static struct net_device dev_el2[MAX_EL2_CARDS] = {
 	{
 		NULL,		/* assign a chunk of namelist[] below */
 		0, 0, 0, 0,
@@ -649,7 +649,7 @@
 	int this_dev, found = 0;
 
 	for (this_dev = 0; this_dev < MAX_EL2_CARDS; this_dev++) {
-		struct device *dev = &dev_el2[this_dev];
+		struct net_device *dev = &dev_el2[this_dev];
 		dev->name = namelist+(NAMELEN*this_dev);
 		dev->irq = irq[this_dev];
 		dev->base_addr = io[this_dev];
@@ -679,7 +679,7 @@
 	int this_dev;
 
 	for (this_dev = 0; this_dev < MAX_EL2_CARDS; this_dev++) {
-		struct device *dev = &dev_el2[this_dev];
+		struct net_device *dev = &dev_el2[this_dev];
 		if (dev->priv != NULL) {
 			void *priv = dev->priv;
 			/* NB: el2_close() handles free_irq */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)