aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ne-h8300.c
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
commit3470cb1d4fb27572273079e7095734ac4f9caa43 (patch)
treec3b080832a2a6144b6ccfe269656499aecf0b480 /drivers/net/ne-h8300.c
parentb936889c8f95b601d3ef6caac6ac653a8adb4fec (diff)
[PATCH] 8390 fixes - the final chunk (h8300)
The rest of 8390 conversions; ifdef cascade in 8390.h is gone now. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/ne-h8300.c')
-rw-r--r--drivers/net/ne-h8300.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/net/ne-h8300.c b/drivers/net/ne-h8300.c
index eb893d7e8834..38fd525f0f13 100644
--- a/drivers/net/ne-h8300.c
+++ b/drivers/net/ne-h8300.c
@@ -33,6 +33,8 @@ static const char version1[] =
33#include <asm/io.h> 33#include <asm/io.h>
34#include <asm/irq.h> 34#include <asm/irq.h>
35 35
36#define EI_SHIFT(x) (ei_local->reg_offset[x])
37
36#include "8390.h" 38#include "8390.h"
37 39
38#define DRV_NAME "ne-h8300" 40#define DRV_NAME "ne-h8300"
@@ -52,6 +54,11 @@ static const char version1[] =
52 54
53/* ---- No user-serviceable parts below ---- */ 55/* ---- No user-serviceable parts below ---- */
54 56
57static const char version[] =
58 "8390.c:v1.10cvs 9/23/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
59
60#include "lib8390.c"
61
55#define NE_BASE (dev->base_addr) 62#define NE_BASE (dev->base_addr)
56#define NE_CMD 0x00 63#define NE_CMD 0x00
57#define NE_DATAPORT (ei_status.word16?0x20:0x10) /* NatSemi-defined port window offset. */ 64#define NE_DATAPORT (ei_status.word16?0x20:0x10) /* NatSemi-defined port window offset. */
@@ -162,7 +169,7 @@ static void cleanup_card(struct net_device *dev)
162#ifndef MODULE 169#ifndef MODULE
163struct net_device * __init ne_probe(int unit) 170struct net_device * __init ne_probe(int unit)
164{ 171{
165 struct net_device *dev = alloc_ei_netdev(); 172 struct net_device *dev = ____alloc_ei_netdev(0);
166 int err; 173 int err;
167 174
168 if (!dev) 175 if (!dev)
@@ -283,7 +290,7 @@ static int __init ne_probe1(struct net_device *dev, int ioaddr)
283 290
284 /* Snarf the interrupt now. There's no point in waiting since we cannot 291 /* Snarf the interrupt now. There's no point in waiting since we cannot
285 share and the board will usually be enabled. */ 292 share and the board will usually be enabled. */
286 ret = request_irq(dev->irq, ei_interrupt, 0, name, dev); 293 ret = request_irq(dev->irq, __ei_interrupt, 0, name, dev);
287 if (ret) { 294 if (ret) {
288 printk (" unable to get IRQ %d (errno=%d).\n", dev->irq, ret); 295 printk (" unable to get IRQ %d (errno=%d).\n", dev->irq, ret);
289 goto err_out; 296 goto err_out;
@@ -318,9 +325,9 @@ static int __init ne_probe1(struct net_device *dev, int ioaddr)
318 dev->open = &ne_open; 325 dev->open = &ne_open;
319 dev->stop = &ne_close; 326 dev->stop = &ne_close;
320#ifdef CONFIG_NET_POLL_CONTROLLER 327#ifdef CONFIG_NET_POLL_CONTROLLER
321 dev->poll_controller = ei_poll; 328 dev->poll_controller = __ei_poll;
322#endif 329#endif
323 NS8390_init(dev, 0); 330 __NS8390_init(dev, 0);
324 331
325 ret = register_netdev(dev); 332 ret = register_netdev(dev);
326 if (ret) 333 if (ret)
@@ -335,7 +342,7 @@ err_out:
335 342
336static int ne_open(struct net_device *dev) 343static int ne_open(struct net_device *dev)
337{ 344{
338 ei_open(dev); 345 __ei_open(dev);
339 return 0; 346 return 0;
340} 347}
341 348
@@ -343,7 +350,7 @@ static int ne_close(struct net_device *dev)
343{ 350{
344 if (ei_debug > 1) 351 if (ei_debug > 1)
345 printk(KERN_DEBUG "%s: Shutting down ethercard.\n", dev->name); 352 printk(KERN_DEBUG "%s: Shutting down ethercard.\n", dev->name);
346 ei_close(dev); 353 __ei_close(dev);
347 return 0; 354 return 0;
348} 355}
349 356
@@ -584,7 +591,7 @@ retry:
584 if (time_after(jiffies, dma_start + 2*HZ/100)) { /* 20ms */ 591 if (time_after(jiffies, dma_start + 2*HZ/100)) { /* 20ms */
585 printk(KERN_WARNING "%s: timeout waiting for Tx RDC.\n", dev->name); 592 printk(KERN_WARNING "%s: timeout waiting for Tx RDC.\n", dev->name);
586 ne_reset_8390(dev); 593 ne_reset_8390(dev);
587 NS8390_init(dev,1); 594 __NS8390_init(dev,1);
588 break; 595 break;
589 } 596 }
590 597
@@ -620,7 +627,7 @@ int init_module(void)
620 int err; 627 int err;
621 628
622 for (this_dev = 0; this_dev < MAX_NE_CARDS; this_dev++) { 629 for (this_dev = 0; this_dev < MAX_NE_CARDS; this_dev++) {
623 struct net_device *dev = alloc_ei_netdev(); 630 struct net_device *dev = ____alloc_ei_netdev(0);
624 if (!dev) 631 if (!dev)
625 break; 632 break;
626 if (io[this_dev]) { 633 if (io[this_dev]) {