patch-2.3.14 linux/drivers/net/smc-ultra.c

Next file: linux/drivers/net/smc-ultra32.c
Previous file: linux/drivers/net/smc-mca.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.13/linux/drivers/net/smc-ultra.c linux/drivers/net/smc-ultra.c
@@ -66,24 +66,24 @@
 static unsigned int ultra_portlist[] __initdata =
 {0x200, 0x220, 0x240, 0x280, 0x300, 0x340, 0x380, 0};
 
-int ultra_probe(struct device *dev);
-int ultra_probe1(struct device *dev, int ioaddr);
+int ultra_probe(struct net_device *dev);
+int ultra_probe1(struct net_device *dev, int ioaddr);
 
-static int ultra_open(struct device *dev);
-static void ultra_reset_8390(struct device *dev);
-static void ultra_get_8390_hdr(struct device *dev, struct e8390_pkt_hdr *hdr,
+static int ultra_open(struct net_device *dev);
+static void ultra_reset_8390(struct net_device *dev);
+static void ultra_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr,
 						int ring_page);
-static void ultra_block_input(struct device *dev, int count,
+static void ultra_block_input(struct net_device *dev, int count,
 						  struct sk_buff *skb, int ring_offset);
-static void ultra_block_output(struct device *dev, int count,
+static void ultra_block_output(struct net_device *dev, int count,
 							const unsigned char *buf, const int start_page);
-static void ultra_pio_get_hdr(struct device *dev, struct e8390_pkt_hdr *hdr,
+static void ultra_pio_get_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr,
 						int ring_page);
-static void ultra_pio_input(struct device *dev, int count,
+static void ultra_pio_input(struct net_device *dev, int count,
 						  struct sk_buff *skb, int ring_offset);
-static void ultra_pio_output(struct device *dev, int count,
+static void ultra_pio_output(struct net_device *dev, int count,
 							 const unsigned char *buf, const int start_page);
-static int ultra_close_card(struct device *dev);
+static int ultra_close_card(struct net_device *dev);
 
 
 #define START_PG		0x00	/* First page of TX buffer */
@@ -106,7 +106,7 @@
 {"ultra", ultra_probe1, NETCARD_IO_EXTENT, netcard_portlist};
 #else
 
-int __init ultra_probe(struct device *dev)
+int __init ultra_probe(struct net_device *dev)
 {
 	int i;
 	int base_addr = dev ? dev->base_addr : 0;
@@ -128,7 +128,7 @@
 }
 #endif
 
-int __init ultra_probe1(struct device *dev, int ioaddr)
+int __init ultra_probe1(struct net_device *dev, int ioaddr)
 {
 	int i;
 	int checksum = 0;
@@ -250,7 +250,7 @@
 }
 
 static int
-ultra_open(struct device *dev)
+ultra_open(struct net_device *dev)
 {
 	int ioaddr = dev->base_addr - ULTRA_NIC_OFFSET; /* ASIC addr */
 	unsigned char irq2reg[] = {0, 0, 0x04, 0x08, 0, 0x0C, 0, 0x40,
@@ -281,7 +281,7 @@
 }
 
 static void
-ultra_reset_8390(struct device *dev)
+ultra_reset_8390(struct net_device *dev)
 {
 	int cmd_port = dev->base_addr - ULTRA_NIC_OFFSET; /* ASIC base addr */
 
@@ -305,7 +305,7 @@
    the start of a page, so we optimize accordingly. */
 
 static void
-ultra_get_8390_hdr(struct device *dev, struct e8390_pkt_hdr *hdr, int ring_page)
+ultra_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_page)
 {
 	unsigned long hdr_start = dev->mem_start + ((ring_page - START_PG)<<8);
 
@@ -323,7 +323,7 @@
    complication is when the ring buffer wraps. */
 
 static void
-ultra_block_input(struct device *dev, int count, struct sk_buff *skb, int ring_offset)
+ultra_block_input(struct net_device *dev, int count, struct sk_buff *skb, int ring_offset)
 {
 	unsigned long xfer_start = dev->mem_start + ring_offset - (START_PG<<8);
 
@@ -345,7 +345,7 @@
 }
 
 static void
-ultra_block_output(struct device *dev, int count, const unsigned char *buf,
+ultra_block_output(struct net_device *dev, int count, const unsigned char *buf,
 				int start_page)
 {
 	unsigned long shmem = dev->mem_start + ((start_page - START_PG)<<8);
@@ -366,7 +366,7 @@
    and must be always be rewritten between each read/write direction change.
    This is no problem for us, as the 8390 code ensures that we are single
    threaded. */
-static void ultra_pio_get_hdr(struct device *dev, struct e8390_pkt_hdr *hdr,
+static void ultra_pio_get_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr,
 						int ring_page)
 {
 	int ioaddr = dev->base_addr - ULTRA_NIC_OFFSET; /* ASIC addr */
@@ -375,7 +375,7 @@
 	insw(ioaddr + IOPD, hdr, sizeof(struct e8390_pkt_hdr)>>1);
 }
 
-static void ultra_pio_input(struct device *dev, int count,
+static void ultra_pio_input(struct net_device *dev, int count,
 						  struct sk_buff *skb, int ring_offset)
 {
 	int ioaddr = dev->base_addr - ULTRA_NIC_OFFSET; /* ASIC addr */
@@ -388,7 +388,7 @@
 	insw(ioaddr + IOPD, buf, (count+1)>>1);
 }
 
-static void ultra_pio_output(struct device *dev, int count,
+static void ultra_pio_output(struct net_device *dev, int count,
 							const unsigned char *buf, const int start_page)
 {
 	int ioaddr = dev->base_addr - ULTRA_NIC_OFFSET; /* ASIC addr */
@@ -399,7 +399,7 @@
 }
 
 static int
-ultra_close_card(struct device *dev)
+ultra_close_card(struct net_device *dev)
 {
 	int ioaddr = dev->base_addr - ULTRA_NIC_OFFSET; /* CMDREG */
 
@@ -427,7 +427,7 @@
 #define MAX_ULTRA_CARDS	4	/* Max number of Ultra cards per module */
 #define NAMELEN		8	/* # of chars for storing dev->name */
 static char namelist[NAMELEN * MAX_ULTRA_CARDS] = { 0, };
-static struct device dev_ultra[MAX_ULTRA_CARDS] = {
+static struct net_device dev_ultra[MAX_ULTRA_CARDS] = {
 	{
 		NULL,		/* assign a chunk of namelist[] below */
 		0, 0, 0, 0,
@@ -452,7 +452,7 @@
 	int this_dev, found = 0;
 
 	for (this_dev = 0; this_dev < MAX_ULTRA_CARDS; this_dev++) {
-		struct device *dev = &dev_ultra[this_dev];
+		struct net_device *dev = &dev_ultra[this_dev];
 		dev->name = namelist+(NAMELEN*this_dev);
 		dev->irq = irq[this_dev];
 		dev->base_addr = io[this_dev];
@@ -478,7 +478,7 @@
 	int this_dev;
 
 	for (this_dev = 0; this_dev < MAX_ULTRA_CARDS; this_dev++) {
-		struct device *dev = &dev_ultra[this_dev];
+		struct net_device *dev = &dev_ultra[this_dev];
 		if (dev->priv != NULL) {
 			/* NB: ultra_close_card() does free_irq + irq2dev */
 			int ioaddr = dev->base_addr - ULTRA_NIC_OFFSET;

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