aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-10-09 19:19:36 -0400
committerJeff Garzik <jeff@garzik.org>2006-12-02 00:11:56 -0500
commit8c6270f957f0eaa343e4a609159c4b85038468d6 (patch)
tree7ee4305f931fefe2c80196b55395e522f59032f4 /drivers
parent6c3561b0c1b64c8f0d1419f3909ab29f0eb98906 (diff)
[PATCH] 8390 fixes - m68k oddballs
more 8390 conversions - mac8390, zorro8390 and hydra got the same treatment as arm etherh; one more case in 8390.h ifdef cascade is gone. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/8390.h16
-rw-r--r--drivers/net/Makefile6
-rw-r--r--drivers/net/hydra.c23
-rw-r--r--drivers/net/mac8390.c26
-rw-r--r--drivers/net/zorro8390.c24
5 files changed, 52 insertions, 43 deletions
diff --git a/drivers/net/8390.h b/drivers/net/8390.h
index fae4aa92c4b7..b8991fc7923f 100644
--- a/drivers/net/8390.h
+++ b/drivers/net/8390.h
@@ -107,21 +107,7 @@ struct ei_device {
107 * - removed AMIGA_PCMCIA from this list, handled as ISA io now 107 * - removed AMIGA_PCMCIA from this list, handled as ISA io now
108 */ 108 */
109 109
110#if defined(CONFIG_MAC) || \ 110#if defined(CONFIG_NE_H8300) || defined(CONFIG_NE_H8300_MODULE)
111 defined(CONFIG_ZORRO8390) || defined(CONFIG_ZORRO8390_MODULE) || \
112 defined(CONFIG_HYDRA) || defined(CONFIG_HYDRA_MODULE)
113#define EI_SHIFT(x) (ei_local->reg_offset[x])
114#undef inb
115#undef inb_p
116#undef outb
117#undef outb_p
118
119#define ei_inb(port) in_8(port)
120#define ei_outb(val,port) out_8(port,val)
121#define ei_inb_p(port) in_8(port)
122#define ei_outb_p(val,port) out_8(port,val)
123
124#elif defined(CONFIG_NE_H8300) || defined(CONFIG_NE_H8300_MODULE)
125#define EI_SHIFT(x) (ei_local->reg_offset[x]) 111#define EI_SHIFT(x) (ei_local->reg_offset[x])
126#endif 112#endif
127 113
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 53ccc337099c..42bf31ea80c6 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -82,7 +82,7 @@ obj-$(CONFIG_HAMACHI) += hamachi.o
82obj-$(CONFIG_NET) += Space.o loopback.o 82obj-$(CONFIG_NET) += Space.o loopback.o
83obj-$(CONFIG_SEEQ8005) += seeq8005.o 83obj-$(CONFIG_SEEQ8005) += seeq8005.o
84obj-$(CONFIG_NET_SB1000) += sb1000.o 84obj-$(CONFIG_NET_SB1000) += sb1000.o
85obj-$(CONFIG_MAC8390) += mac8390.o 8390.o 85obj-$(CONFIG_MAC8390) += mac8390.o
86obj-$(CONFIG_APNE) += apne.o 8390.o 86obj-$(CONFIG_APNE) += apne.o 8390.o
87obj-$(CONFIG_PCMCIA_PCNET) += 8390.o 87obj-$(CONFIG_PCMCIA_PCNET) += 8390.o
88obj-$(CONFIG_SHAPER) += shaper.o 88obj-$(CONFIG_SHAPER) += shaper.o
@@ -164,7 +164,7 @@ obj-$(CONFIG_BVME6000_NET) += 82596.o
164obj-$(CONFIG_LP486E) += lp486e.o 164obj-$(CONFIG_LP486E) += lp486e.o
165 165
166obj-$(CONFIG_ETH16I) += eth16i.o 166obj-$(CONFIG_ETH16I) += eth16i.o
167obj-$(CONFIG_ZORRO8390) += zorro8390.o 8390.o 167obj-$(CONFIG_ZORRO8390) += zorro8390.o
168obj-$(CONFIG_HPLANCE) += hplance.o 7990.o 168obj-$(CONFIG_HPLANCE) += hplance.o 7990.o
169obj-$(CONFIG_MVME147_NET) += mvme147.o 7990.o 169obj-$(CONFIG_MVME147_NET) += mvme147.o 7990.o
170obj-$(CONFIG_EQUALIZER) += eql.o 170obj-$(CONFIG_EQUALIZER) += eql.o
@@ -177,7 +177,7 @@ obj-$(CONFIG_ATARILANCE) += atarilance.o
177obj-$(CONFIG_ATARI_BIONET) += atari_bionet.o 177obj-$(CONFIG_ATARI_BIONET) += atari_bionet.o
178obj-$(CONFIG_ATARI_PAMSNET) += atari_pamsnet.o 178obj-$(CONFIG_ATARI_PAMSNET) += atari_pamsnet.o
179obj-$(CONFIG_A2065) += a2065.o 179obj-$(CONFIG_A2065) += a2065.o
180obj-$(CONFIG_HYDRA) += hydra.o 8390.o 180obj-$(CONFIG_HYDRA) += hydra.o
181obj-$(CONFIG_ARIADNE) += ariadne.o 181obj-$(CONFIG_ARIADNE) += ariadne.o
182obj-$(CONFIG_CS89x0) += cs89x0.o 182obj-$(CONFIG_CS89x0) += cs89x0.o
183obj-$(CONFIG_MACSONIC) += macsonic.o 183obj-$(CONFIG_MACSONIC) += macsonic.o
diff --git a/drivers/net/hydra.c b/drivers/net/hydra.c
index 91326ea3e12b..f970bfbb9db2 100644
--- a/drivers/net/hydra.c
+++ b/drivers/net/hydra.c
@@ -31,7 +31,16 @@
31#include <asm/amigahw.h> 31#include <asm/amigahw.h>
32#include <linux/zorro.h> 32#include <linux/zorro.h>
33 33
34#include "8390.h" 34#define EI_SHIFT(x) (ei_local->reg_offset[x])
35#define ei_inb(port) in_8(port)
36#define ei_outb(val,port) out_8(port,val)
37#define ei_inb_p(port) in_8(port)
38#define ei_outb_p(val,port) out_8(port,val)
39
40static const char version[] =
41 "8390.c:v1.10cvs 9/23/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
42
43#include "lib8390.c"
35 44
36#define NE_EN0_DCFG (0x0e*2) 45#define NE_EN0_DCFG (0x0e*2)
37 46
@@ -100,7 +109,7 @@ static int __devinit hydra_init(struct zorro_dev *z)
100 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e, 109 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e,
101 }; 110 };
102 111
103 dev = alloc_ei_netdev(); 112 dev = ____alloc_ei_netdev(0);
104 if (!dev) 113 if (!dev)
105 return -ENOMEM; 114 return -ENOMEM;
106 SET_MODULE_OWNER(dev); 115 SET_MODULE_OWNER(dev);
@@ -117,7 +126,7 @@ static int __devinit hydra_init(struct zorro_dev *z)
117 dev->irq = IRQ_AMIGA_PORTS; 126 dev->irq = IRQ_AMIGA_PORTS;
118 127
119 /* Install the Interrupt handler */ 128 /* Install the Interrupt handler */
120 if (request_irq(IRQ_AMIGA_PORTS, ei_interrupt, IRQF_SHARED, "Hydra Ethernet", 129 if (request_irq(IRQ_AMIGA_PORTS, __ei_interrupt, IRQF_SHARED, "Hydra Ethernet",
121 dev)) { 130 dev)) {
122 free_netdev(dev); 131 free_netdev(dev);
123 return -EAGAIN; 132 return -EAGAIN;
@@ -139,10 +148,10 @@ static int __devinit hydra_init(struct zorro_dev *z)
139 dev->open = &hydra_open; 148 dev->open = &hydra_open;
140 dev->stop = &hydra_close; 149 dev->stop = &hydra_close;
141#ifdef CONFIG_NET_POLL_CONTROLLER 150#ifdef CONFIG_NET_POLL_CONTROLLER
142 dev->poll_controller = ei_poll; 151 dev->poll_controller = __ei_poll;
143#endif 152#endif
144 153
145 NS8390_init(dev, 0); 154 __NS8390_init(dev, 0);
146 155
147 err = register_netdev(dev); 156 err = register_netdev(dev);
148 if (err) { 157 if (err) {
@@ -164,7 +173,7 @@ static int __devinit hydra_init(struct zorro_dev *z)
164 173
165static int hydra_open(struct net_device *dev) 174static int hydra_open(struct net_device *dev)
166{ 175{
167 ei_open(dev); 176 __ei_open(dev);
168 return 0; 177 return 0;
169} 178}
170 179
@@ -172,7 +181,7 @@ static int hydra_close(struct net_device *dev)
172{ 181{
173 if (ei_debug > 1) 182 if (ei_debug > 1)
174 printk(KERN_DEBUG "%s: Shutting down ethercard.\n", dev->name); 183 printk(KERN_DEBUG "%s: Shutting down ethercard.\n", dev->name);
175 ei_close(dev); 184 __ei_close(dev);
176 return 0; 185 return 0;
177} 186}
178 187
diff --git a/drivers/net/mac8390.c b/drivers/net/mac8390.c
index ade6ff852e1a..a12bb64e3694 100644
--- a/drivers/net/mac8390.c
+++ b/drivers/net/mac8390.c
@@ -39,7 +39,16 @@
39#include <asm/hwtest.h> 39#include <asm/hwtest.h>
40#include <asm/macints.h> 40#include <asm/macints.h>
41 41
42#include "8390.h" 42static char version[] =
43 "mac8390.c: v0.4 2001-05-15 David Huggins-Daines <dhd@debian.org> and others\n";
44
45#define EI_SHIFT(x) (ei_local->reg_offset[x])
46#define ei_inb(port) in_8(port)
47#define ei_outb(val,port) out_8(port,val)
48#define ei_inb_p(port) in_8(port)
49#define ei_outb_p(val,port) out_8(port,val)
50
51#include "lib8390.c"
43 52
44#define WD_START_PG 0x00 /* First page of TX buffer */ 53#define WD_START_PG 0x00 /* First page of TX buffer */
45#define CABLETRON_RX_START_PG 0x00 /* First page of RX buffer */ 54#define CABLETRON_RX_START_PG 0x00 /* First page of RX buffer */
@@ -116,9 +125,6 @@ static int useresources[] = {
116 1, /* dayna-lc */ 125 1, /* dayna-lc */
117}; 126};
118 127
119static char version[] __initdata =
120 "mac8390.c: v0.4 2001-05-15 David Huggins-Daines <dhd@debian.org> and others\n";
121
122extern enum mac8390_type mac8390_ident(struct nubus_dev * dev); 128extern enum mac8390_type mac8390_ident(struct nubus_dev * dev);
123extern int mac8390_memsize(unsigned long membase); 129extern int mac8390_memsize(unsigned long membase);
124extern int mac8390_memtest(struct net_device * dev); 130extern int mac8390_memtest(struct net_device * dev);
@@ -237,7 +243,7 @@ struct net_device * __init mac8390_probe(int unit)
237 if (!MACH_IS_MAC) 243 if (!MACH_IS_MAC)
238 return ERR_PTR(-ENODEV); 244 return ERR_PTR(-ENODEV);
239 245
240 dev = alloc_ei_netdev(); 246 dev = ____alloc_ei_netdev(0);
241 if (!dev) 247 if (!dev)
242 return ERR_PTR(-ENOMEM); 248 return ERR_PTR(-ENOMEM);
243 249
@@ -438,7 +444,7 @@ static int __init mac8390_initdev(struct net_device * dev, struct nubus_dev * nd
438 dev->open = &mac8390_open; 444 dev->open = &mac8390_open;
439 dev->stop = &mac8390_close; 445 dev->stop = &mac8390_close;
440#ifdef CONFIG_NET_POLL_CONTROLLER 446#ifdef CONFIG_NET_POLL_CONTROLLER
441 dev->poll_controller = ei_poll; 447 dev->poll_controller = __ei_poll;
442#endif 448#endif
443 449
444 /* GAR, ei_status is actually a macro even though it looks global */ 450 /* GAR, ei_status is actually a macro even though it looks global */
@@ -510,7 +516,7 @@ static int __init mac8390_initdev(struct net_device * dev, struct nubus_dev * nd
510 return -ENODEV; 516 return -ENODEV;
511 } 517 }
512 518
513 NS8390_init(dev, 0); 519 __NS8390_init(dev, 0);
514 520
515 /* Good, done, now spit out some messages */ 521 /* Good, done, now spit out some messages */
516 printk(KERN_INFO "%s: %s in slot %X (type %s)\n", 522 printk(KERN_INFO "%s: %s in slot %X (type %s)\n",
@@ -532,8 +538,8 @@ static int __init mac8390_initdev(struct net_device * dev, struct nubus_dev * nd
532 538
533static int mac8390_open(struct net_device *dev) 539static int mac8390_open(struct net_device *dev)
534{ 540{
535 ei_open(dev); 541 __ei_open(dev);
536 if (request_irq(dev->irq, ei_interrupt, 0, "8390 Ethernet", dev)) { 542 if (request_irq(dev->irq, __ei_interrupt, 0, "8390 Ethernet", dev)) {
537 printk ("%s: unable to get IRQ %d.\n", dev->name, dev->irq); 543 printk ("%s: unable to get IRQ %d.\n", dev->name, dev->irq);
538 return -EAGAIN; 544 return -EAGAIN;
539 } 545 }
@@ -543,7 +549,7 @@ static int mac8390_open(struct net_device *dev)
543static int mac8390_close(struct net_device *dev) 549static int mac8390_close(struct net_device *dev)
544{ 550{
545 free_irq(dev->irq, dev); 551 free_irq(dev->irq, dev);
546 ei_close(dev); 552 __ei_close(dev);
547 return 0; 553 return 0;
548} 554}
549 555
diff --git a/drivers/net/zorro8390.c b/drivers/net/zorro8390.c
index df04e050c647..d85e2ea0b6af 100644
--- a/drivers/net/zorro8390.c
+++ b/drivers/net/zorro8390.c
@@ -34,8 +34,16 @@
34#include <asm/amigaints.h> 34#include <asm/amigaints.h>
35#include <asm/amigahw.h> 35#include <asm/amigahw.h>
36 36
37#include "8390.h" 37#define EI_SHIFT(x) (ei_local->reg_offset[x])
38#define ei_inb(port) in_8(port)
39#define ei_outb(val,port) out_8(port,val)
40#define ei_inb_p(port) in_8(port)
41#define ei_outb_p(val,port) out_8(port,val)
38 42
43static const char version[] =
44 "8390.c:v1.10cvs 9/23/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
45
46#include "lib8390.c"
39 47
40#define DRV_NAME "zorro8390" 48#define DRV_NAME "zorro8390"
41 49
@@ -114,7 +122,7 @@ static int __devinit zorro8390_init_one(struct zorro_dev *z,
114 break; 122 break;
115 board = z->resource.start; 123 board = z->resource.start;
116 ioaddr = board+cards[i].offset; 124 ioaddr = board+cards[i].offset;
117 dev = alloc_ei_netdev(); 125 dev = ____alloc_ei_netdev(0);
118 if (!dev) 126 if (!dev)
119 return -ENOMEM; 127 return -ENOMEM;
120 SET_MODULE_OWNER(dev); 128 SET_MODULE_OWNER(dev);
@@ -201,7 +209,7 @@ static int __devinit zorro8390_init(struct net_device *dev,
201 dev->irq = IRQ_AMIGA_PORTS; 209 dev->irq = IRQ_AMIGA_PORTS;
202 210
203 /* Install the Interrupt handler */ 211 /* Install the Interrupt handler */
204 i = request_irq(IRQ_AMIGA_PORTS, ei_interrupt, IRQF_SHARED, DRV_NAME, dev); 212 i = request_irq(IRQ_AMIGA_PORTS, __ei_interrupt, IRQF_SHARED, DRV_NAME, dev);
205 if (i) return i; 213 if (i) return i;
206 214
207 for(i = 0; i < ETHER_ADDR_LEN; i++) { 215 for(i = 0; i < ETHER_ADDR_LEN; i++) {
@@ -226,10 +234,10 @@ static int __devinit zorro8390_init(struct net_device *dev,
226 dev->open = &zorro8390_open; 234 dev->open = &zorro8390_open;
227 dev->stop = &zorro8390_close; 235 dev->stop = &zorro8390_close;
228#ifdef CONFIG_NET_POLL_CONTROLLER 236#ifdef CONFIG_NET_POLL_CONTROLLER
229 dev->poll_controller = ei_poll; 237 dev->poll_controller = __ei_poll;
230#endif 238#endif
231 239
232 NS8390_init(dev, 0); 240 __NS8390_init(dev, 0);
233 err = register_netdev(dev); 241 err = register_netdev(dev);
234 if (err) { 242 if (err) {
235 free_irq(IRQ_AMIGA_PORTS, dev); 243 free_irq(IRQ_AMIGA_PORTS, dev);
@@ -246,7 +254,7 @@ static int __devinit zorro8390_init(struct net_device *dev,
246 254
247static int zorro8390_open(struct net_device *dev) 255static int zorro8390_open(struct net_device *dev)
248{ 256{
249 ei_open(dev); 257 __ei_open(dev);
250 return 0; 258 return 0;
251} 259}
252 260
@@ -254,7 +262,7 @@ static int zorro8390_close(struct net_device *dev)
254{ 262{
255 if (ei_debug > 1) 263 if (ei_debug > 1)
256 printk(KERN_DEBUG "%s: Shutting down ethercard.\n", dev->name); 264 printk(KERN_DEBUG "%s: Shutting down ethercard.\n", dev->name);
257 ei_close(dev); 265 __ei_close(dev);
258 return 0; 266 return 0;
259} 267}
260 268
@@ -405,7 +413,7 @@ static void zorro8390_block_output(struct net_device *dev, int count,
405 printk(KERN_ERR "%s: timeout waiting for Tx RDC.\n", 413 printk(KERN_ERR "%s: timeout waiting for Tx RDC.\n",
406 dev->name); 414 dev->name);
407 zorro8390_reset_8390(dev); 415 zorro8390_reset_8390(dev);
408 NS8390_init(dev,1); 416 __NS8390_init(dev,1);
409 break; 417 break;
410 } 418 }
411 419