Commit aa00d40b authored by David S. Miller's avatar David S. Miller

Merge branch '8390-cleanups'

Finn Thain says:

====================
Fixes, cleanup and modernization for 8390 ethernet drivers

Changes since v4 of combined patch series:
- Removed redundant and non-portable MACH_IS_MAC tests.
- Added acked-by tags from Geert Uytterhoeven.
- Omitted patches unrelated to 8390 drivers.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 4be83e5a 4a1b27c9
...@@ -114,9 +114,6 @@ static struct devprobe2 m68k_probes[] __initdata = { ...@@ -114,9 +114,6 @@ static struct devprobe2 m68k_probes[] __initdata = {
#ifdef CONFIG_MVME147_NET /* MVME147 internal Ethernet */ #ifdef CONFIG_MVME147_NET /* MVME147 internal Ethernet */
{mvme147lance_probe, 0}, {mvme147lance_probe, 0},
#endif #endif
#ifdef CONFIG_MAC8390 /* NuBus NS8390-based cards */
{mac8390_probe, 0},
#endif
#ifdef CONFIG_MAC89x0 #ifdef CONFIG_MAC89x0
{mac89x0_probe, 0}, {mac89x0_probe, 0},
#endif #endif
......
...@@ -7,8 +7,8 @@ obj-$(CONFIG_MAC8390) += mac8390.o ...@@ -7,8 +7,8 @@ obj-$(CONFIG_MAC8390) += mac8390.o
obj-$(CONFIG_APNE) += apne.o 8390.o obj-$(CONFIG_APNE) += apne.o 8390.o
obj-$(CONFIG_ARM_ETHERH) += etherh.o obj-$(CONFIG_ARM_ETHERH) += etherh.o
obj-$(CONFIG_AX88796) += ax88796.o obj-$(CONFIG_AX88796) += ax88796.o
obj-$(CONFIG_HYDRA) += hydra.o 8390.o obj-$(CONFIG_HYDRA) += hydra.o
obj-$(CONFIG_MCF8390) += mcf8390.o 8390.o obj-$(CONFIG_MCF8390) += mcf8390.o
obj-$(CONFIG_NE2000) += ne.o 8390p.o obj-$(CONFIG_NE2000) += ne.o 8390p.o
obj-$(CONFIG_NE2K_PCI) += ne2k-pci.o 8390.o obj-$(CONFIG_NE2K_PCI) += ne2k-pci.o 8390.o
obj-$(CONFIG_PCMCIA_AXNET) += axnet_cs.o 8390.o obj-$(CONFIG_PCMCIA_AXNET) += axnet_cs.o 8390.o
...@@ -16,4 +16,4 @@ obj-$(CONFIG_PCMCIA_PCNET) += pcnet_cs.o 8390.o ...@@ -16,4 +16,4 @@ obj-$(CONFIG_PCMCIA_PCNET) += pcnet_cs.o 8390.o
obj-$(CONFIG_STNIC) += stnic.o 8390.o obj-$(CONFIG_STNIC) += stnic.o 8390.o
obj-$(CONFIG_ULTRA) += smc-ultra.o 8390.o obj-$(CONFIG_ULTRA) += smc-ultra.o 8390.o
obj-$(CONFIG_WD80x3) += wd.o 8390.o obj-$(CONFIG_WD80x3) += wd.o 8390.o
obj-$(CONFIG_ZORRO8390) += zorro8390.o 8390.o obj-$(CONFIG_ZORRO8390) += zorro8390.o
...@@ -77,8 +77,6 @@ static unsigned char version[] = "ax88796.c: Copyright 2005,2007 Simtec Electron ...@@ -77,8 +77,6 @@ static unsigned char version[] = "ax88796.c: Copyright 2005,2007 Simtec Electron
#define AX_GPOC_PPDSET BIT(6) #define AX_GPOC_PPDSET BIT(6)
static u32 ax_msg_enable;
/* device private data */ /* device private data */
struct ax_device { struct ax_device {
...@@ -747,7 +745,6 @@ static int ax_init_dev(struct net_device *dev) ...@@ -747,7 +745,6 @@ static int ax_init_dev(struct net_device *dev)
ei_local->block_output = &ax_block_output; ei_local->block_output = &ax_block_output;
ei_local->get_8390_hdr = &ax_get_8390_hdr; ei_local->get_8390_hdr = &ax_get_8390_hdr;
ei_local->priv = 0; ei_local->priv = 0;
ei_local->msg_enable = ax_msg_enable;
dev->netdev_ops = &ax_netdev_ops; dev->netdev_ops = &ax_netdev_ops;
dev->ethtool_ops = &ax_ethtool_ops; dev->ethtool_ops = &ax_ethtool_ops;
......
...@@ -104,7 +104,6 @@ static void AX88190_init(struct net_device *dev, int startp); ...@@ -104,7 +104,6 @@ static void AX88190_init(struct net_device *dev, int startp);
static int ax_open(struct net_device *dev); static int ax_open(struct net_device *dev);
static int ax_close(struct net_device *dev); static int ax_close(struct net_device *dev);
static irqreturn_t ax_interrupt(int irq, void *dev_id); static irqreturn_t ax_interrupt(int irq, void *dev_id);
static u32 axnet_msg_enable;
/*====================================================================*/ /*====================================================================*/
...@@ -151,7 +150,6 @@ static int axnet_probe(struct pcmcia_device *link) ...@@ -151,7 +150,6 @@ static int axnet_probe(struct pcmcia_device *link)
return -ENOMEM; return -ENOMEM;
ei_local = netdev_priv(dev); ei_local = netdev_priv(dev);
ei_local->msg_enable = axnet_msg_enable;
spin_lock_init(&ei_local->page_lock); spin_lock_init(&ei_local->page_lock);
info = PRIV(dev); info = PRIV(dev);
......
...@@ -64,8 +64,6 @@ static char version[] = ...@@ -64,8 +64,6 @@ static char version[] =
#include "lib8390.c" #include "lib8390.c"
static u32 etherh_msg_enable;
struct etherh_priv { struct etherh_priv {
void __iomem *ioc_fast; void __iomem *ioc_fast;
void __iomem *memc; void __iomem *memc;
...@@ -501,18 +499,6 @@ etherh_close(struct net_device *dev) ...@@ -501,18 +499,6 @@ etherh_close(struct net_device *dev)
return 0; return 0;
} }
/*
* Initialisation
*/
static void __init etherh_banner(void)
{
static int version_printed;
if ((etherh_msg_enable & NETIF_MSG_DRV) && (version_printed++ == 0))
pr_info("%s", version);
}
/* /*
* Read the ethernet address string from the on board rom. * Read the ethernet address string from the on board rom.
* This is an ascii string... * This is an ascii string...
...@@ -671,8 +657,6 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id) ...@@ -671,8 +657,6 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
struct etherh_priv *eh; struct etherh_priv *eh;
int ret; int ret;
etherh_banner();
ret = ecard_request_resources(ec); ret = ecard_request_resources(ec);
if (ret) if (ret)
goto out; goto out;
...@@ -757,7 +741,6 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id) ...@@ -757,7 +741,6 @@ etherh_probe(struct expansion_card *ec, const struct ecard_id *id)
ei_local->block_output = etherh_block_output; ei_local->block_output = etherh_block_output;
ei_local->get_8390_hdr = etherh_get_header; ei_local->get_8390_hdr = etherh_get_header;
ei_local->interface_num = 0; ei_local->interface_num = 0;
ei_local->msg_enable = etherh_msg_enable;
etherh_reset(dev); etherh_reset(dev);
__NS8390_init(dev, 0); __NS8390_init(dev, 0);
......
...@@ -66,7 +66,6 @@ static void hydra_block_input(struct net_device *dev, int count, ...@@ -66,7 +66,6 @@ static void hydra_block_input(struct net_device *dev, int count,
static void hydra_block_output(struct net_device *dev, int count, static void hydra_block_output(struct net_device *dev, int count,
const unsigned char *buf, int start_page); const unsigned char *buf, int start_page);
static void hydra_remove_one(struct zorro_dev *z); static void hydra_remove_one(struct zorro_dev *z);
static u32 hydra_msg_enable;
static struct zorro_device_id hydra_zorro_tbl[] = { static struct zorro_device_id hydra_zorro_tbl[] = {
{ ZORRO_PROD_HYDRA_SYSTEMS_AMIGANET }, { ZORRO_PROD_HYDRA_SYSTEMS_AMIGANET },
...@@ -119,7 +118,6 @@ static int hydra_init(struct zorro_dev *z) ...@@ -119,7 +118,6 @@ static int hydra_init(struct zorro_dev *z)
int start_page, stop_page; int start_page, stop_page;
int j; int j;
int err; int err;
struct ei_device *ei_local;
static u32 hydra_offsets[16] = { static u32 hydra_offsets[16] = {
0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e, 0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e,
...@@ -138,8 +136,6 @@ static int hydra_init(struct zorro_dev *z) ...@@ -138,8 +136,6 @@ static int hydra_init(struct zorro_dev *z)
start_page = NESM_START_PG; start_page = NESM_START_PG;
stop_page = NESM_STOP_PG; stop_page = NESM_STOP_PG;
ei_local = netdev_priv(dev);
ei_local->msg_enable = hydra_msg_enable;
dev->base_addr = ioaddr; dev->base_addr = ioaddr;
dev->irq = IRQ_AMIGA_PORTS; dev->irq = IRQ_AMIGA_PORTS;
......
...@@ -975,6 +975,8 @@ static void ethdev_setup(struct net_device *dev) ...@@ -975,6 +975,8 @@ static void ethdev_setup(struct net_device *dev)
ether_setup(dev); ether_setup(dev);
spin_lock_init(&ei_local->page_lock); spin_lock_init(&ei_local->page_lock);
ei_local->msg_enable = msg_enable;
} }
/** /**
......
...@@ -123,8 +123,7 @@ enum mac8390_access { ...@@ -123,8 +123,7 @@ enum mac8390_access {
}; };
extern int mac8390_memtest(struct net_device *dev); extern int mac8390_memtest(struct net_device *dev);
static int mac8390_initdev(struct net_device *dev, static int mac8390_initdev(struct net_device *dev, struct nubus_board *board,
struct nubus_rsrc *ndev,
enum mac8390_type type); enum mac8390_type type);
static int mac8390_open(struct net_device *dev); static int mac8390_open(struct net_device *dev);
...@@ -168,9 +167,8 @@ static void slow_sane_block_output(struct net_device *dev, int count, ...@@ -168,9 +167,8 @@ static void slow_sane_block_output(struct net_device *dev, int count,
const unsigned char *buf, int start_page); const unsigned char *buf, int start_page);
static void word_memcpy_tocard(unsigned long tp, const void *fp, int count); static void word_memcpy_tocard(unsigned long tp, const void *fp, int count);
static void word_memcpy_fromcard(void *tp, unsigned long fp, int count); static void word_memcpy_fromcard(void *tp, unsigned long fp, int count);
static u32 mac8390_msg_enable;
static enum mac8390_type __init mac8390_ident(struct nubus_rsrc *fres) static enum mac8390_type mac8390_ident(struct nubus_rsrc *fres)
{ {
switch (fres->dr_sw) { switch (fres->dr_sw) {
case NUBUS_DRSW_3COM: case NUBUS_DRSW_3COM:
...@@ -236,7 +234,7 @@ static enum mac8390_type __init mac8390_ident(struct nubus_rsrc *fres) ...@@ -236,7 +234,7 @@ static enum mac8390_type __init mac8390_ident(struct nubus_rsrc *fres)
return MAC8390_NONE; return MAC8390_NONE;
} }
static enum mac8390_access __init mac8390_testio(volatile unsigned long membase) static enum mac8390_access mac8390_testio(unsigned long membase)
{ {
unsigned long outdata = 0xA5A0B5B0; unsigned long outdata = 0xA5A0B5B0;
unsigned long indata = 0x00000000; unsigned long indata = 0x00000000;
...@@ -254,7 +252,7 @@ static enum mac8390_access __init mac8390_testio(volatile unsigned long membase) ...@@ -254,7 +252,7 @@ static enum mac8390_access __init mac8390_testio(volatile unsigned long membase)
return ACCESS_UNKNOWN; return ACCESS_UNKNOWN;
} }
static int __init mac8390_memsize(unsigned long membase) static int mac8390_memsize(unsigned long membase)
{ {
unsigned long flags; unsigned long flags;
int i, j; int i, j;
...@@ -290,36 +288,34 @@ static int __init mac8390_memsize(unsigned long membase) ...@@ -290,36 +288,34 @@ static int __init mac8390_memsize(unsigned long membase)
return i * 0x1000; return i * 0x1000;
} }
static bool __init mac8390_init(struct net_device *dev, static bool mac8390_rsrc_init(struct net_device *dev,
struct nubus_rsrc *ndev, struct nubus_rsrc *fres,
enum mac8390_type cardtype) enum mac8390_type cardtype)
{ {
struct nubus_board *board = fres->board;
struct nubus_dir dir; struct nubus_dir dir;
struct nubus_dirent ent; struct nubus_dirent ent;
int offset; int offset;
volatile unsigned short *i; volatile unsigned short *i;
printk_once(KERN_INFO pr_fmt("%s"), version); dev->irq = SLOT2IRQ(board->slot);
dev->irq = SLOT2IRQ(ndev->board->slot);
/* This is getting to be a habit */ /* This is getting to be a habit */
dev->base_addr = (ndev->board->slot_addr | dev->base_addr = board->slot_addr | ((board->slot & 0xf) << 20);
((ndev->board->slot & 0xf) << 20));
/* /*
* Get some Nubus info - we will trust the card's idea * Get some Nubus info - we will trust the card's idea
* of where its memory and registers are. * of where its memory and registers are.
*/ */
if (nubus_get_func_dir(ndev, &dir) == -1) { if (nubus_get_func_dir(fres, &dir) == -1) {
pr_err("%s: Unable to get Nubus functional directory for slot %X!\n", dev_err(&board->dev,
dev->name, ndev->board->slot); "Unable to get Nubus functional directory\n");
return false; return false;
} }
/* Get the MAC address */ /* Get the MAC address */
if (nubus_find_rsrc(&dir, NUBUS_RESID_MAC_ADDRESS, &ent) == -1) { if (nubus_find_rsrc(&dir, NUBUS_RESID_MAC_ADDRESS, &ent) == -1) {
pr_info("%s: Couldn't get MAC address!\n", dev->name); dev_info(&board->dev, "MAC address resource not found\n");
return false; return false;
} }
...@@ -329,8 +325,8 @@ static bool __init mac8390_init(struct net_device *dev, ...@@ -329,8 +325,8 @@ static bool __init mac8390_init(struct net_device *dev,
nubus_rewinddir(&dir); nubus_rewinddir(&dir);
if (nubus_find_rsrc(&dir, NUBUS_RESID_MINOR_BASEOS, if (nubus_find_rsrc(&dir, NUBUS_RESID_MINOR_BASEOS,
&ent) == -1) { &ent) == -1) {
pr_err("%s: Memory offset resource for slot %X not found!\n", dev_err(&board->dev,
dev->name, ndev->board->slot); "Memory offset resource not found\n");
return false; return false;
} }
nubus_get_rsrc_mem(&offset, &ent, 4); nubus_get_rsrc_mem(&offset, &ent, 4);
...@@ -340,8 +336,8 @@ static bool __init mac8390_init(struct net_device *dev, ...@@ -340,8 +336,8 @@ static bool __init mac8390_init(struct net_device *dev,
nubus_rewinddir(&dir); nubus_rewinddir(&dir);
if (nubus_find_rsrc(&dir, NUBUS_RESID_MINOR_LENGTH, if (nubus_find_rsrc(&dir, NUBUS_RESID_MINOR_LENGTH,
&ent) == -1) { &ent) == -1) {
pr_info("%s: Memory length resource for slot %X not found, probing\n", dev_info(&board->dev,
dev->name, ndev->board->slot); "Memory length resource not found, probing\n");
offset = mac8390_memsize(dev->mem_start); offset = mac8390_memsize(dev->mem_start);
} else { } else {
nubus_get_rsrc_mem(&offset, &ent, 4); nubus_get_rsrc_mem(&offset, &ent, 4);
...@@ -351,25 +347,25 @@ static bool __init mac8390_init(struct net_device *dev, ...@@ -351,25 +347,25 @@ static bool __init mac8390_init(struct net_device *dev,
switch (cardtype) { switch (cardtype) {
case MAC8390_KINETICS: case MAC8390_KINETICS:
case MAC8390_DAYNA: /* it's the same */ case MAC8390_DAYNA: /* it's the same */
dev->base_addr = (int)(ndev->board->slot_addr + dev->base_addr = (int)(board->slot_addr +
DAYNA_8390_BASE); DAYNA_8390_BASE);
dev->mem_start = (int)(ndev->board->slot_addr + dev->mem_start = (int)(board->slot_addr +
DAYNA_8390_MEM); DAYNA_8390_MEM);
dev->mem_end = dev->mem_start + dev->mem_end = dev->mem_start +
mac8390_memsize(dev->mem_start); mac8390_memsize(dev->mem_start);
break; break;
case MAC8390_INTERLAN: case MAC8390_INTERLAN:
dev->base_addr = (int)(ndev->board->slot_addr + dev->base_addr = (int)(board->slot_addr +
INTERLAN_8390_BASE); INTERLAN_8390_BASE);
dev->mem_start = (int)(ndev->board->slot_addr + dev->mem_start = (int)(board->slot_addr +
INTERLAN_8390_MEM); INTERLAN_8390_MEM);
dev->mem_end = dev->mem_start + dev->mem_end = dev->mem_start +
mac8390_memsize(dev->mem_start); mac8390_memsize(dev->mem_start);
break; break;
case MAC8390_CABLETRON: case MAC8390_CABLETRON:
dev->base_addr = (int)(ndev->board->slot_addr + dev->base_addr = (int)(board->slot_addr +
CABLETRON_8390_BASE); CABLETRON_8390_BASE);
dev->mem_start = (int)(ndev->board->slot_addr + dev->mem_start = (int)(board->slot_addr +
CABLETRON_8390_MEM); CABLETRON_8390_MEM);
/* The base address is unreadable if 0x00 /* The base address is unreadable if 0x00
* has been written to the command register * has been written to the command register
...@@ -384,8 +380,8 @@ static bool __init mac8390_init(struct net_device *dev, ...@@ -384,8 +380,8 @@ static bool __init mac8390_init(struct net_device *dev,
break; break;
default: default:
pr_err("Card type %s is unsupported, sorry\n", dev_err(&board->dev,
ndev->board->name); "No known base address for card type\n");
return false; return false;
} }
} }
...@@ -393,91 +389,83 @@ static bool __init mac8390_init(struct net_device *dev, ...@@ -393,91 +389,83 @@ static bool __init mac8390_init(struct net_device *dev,
return true; return true;
} }
struct net_device * __init mac8390_probe(int unit) static int mac8390_device_probe(struct nubus_board *board)
{ {
struct net_device *dev; struct net_device *dev;
struct nubus_rsrc *ndev = NULL;
int err = -ENODEV; int err = -ENODEV;
struct ei_device *ei_local; struct nubus_rsrc *fres;
enum mac8390_type cardtype = MAC8390_NONE;
static unsigned int slots;
enum mac8390_type cardtype;
/* probably should check for Nubus instead */
if (!MACH_IS_MAC)
return ERR_PTR(-ENODEV);
dev = ____alloc_ei_netdev(0); dev = ____alloc_ei_netdev(0);
if (!dev) if (!dev)
return ERR_PTR(-ENOMEM); return -ENOMEM;
if (unit >= 0)
sprintf(dev->name, "eth%d", unit);
for_each_func_rsrc(ndev) { SET_NETDEV_DEV(dev, &board->dev);
if (ndev->category != NUBUS_CAT_NETWORK ||
ndev->type != NUBUS_TYPE_ETHERNET)
continue;
/* Have we seen it already? */ for_each_board_func_rsrc(board, fres) {
if (slots & (1 << ndev->board->slot)) if (fres->category != NUBUS_CAT_NETWORK ||
fres->type != NUBUS_TYPE_ETHERNET)
continue; continue;
slots |= 1 << ndev->board->slot;
cardtype = mac8390_ident(ndev); cardtype = mac8390_ident(fres);
if (cardtype == MAC8390_NONE) if (cardtype == MAC8390_NONE)
continue; continue;
if (!mac8390_init(dev, ndev, cardtype)) if (mac8390_rsrc_init(dev, fres, cardtype))
continue;
/* Do the nasty 8390 stuff */
if (!mac8390_initdev(dev, ndev, cardtype))
break; break;
} }
if (!fres)
if (!ndev)
goto out; goto out;
ei_local = netdev_priv(dev); err = mac8390_initdev(dev, board, cardtype);
ei_local->msg_enable = mac8390_msg_enable; if (err)
goto out;
err = register_netdev(dev); err = register_netdev(dev);
if (err) if (err)
goto out; goto out;
return dev;
nubus_set_drvdata(board, dev);
return 0;
out: out:
free_netdev(dev); free_netdev(dev);
return ERR_PTR(err); return err;
}
static int mac8390_device_remove(struct nubus_board *board)
{
struct net_device *dev = nubus_get_drvdata(board);
unregister_netdev(dev);
free_netdev(dev);
return 0;
} }
#ifdef MODULE static struct nubus_driver mac8390_driver = {
.probe = mac8390_device_probe,
.remove = mac8390_device_remove,
.driver = {
.name = KBUILD_MODNAME,
.owner = THIS_MODULE,
}
};
MODULE_AUTHOR("David Huggins-Daines <dhd@debian.org> and others"); MODULE_AUTHOR("David Huggins-Daines <dhd@debian.org> and others");
MODULE_DESCRIPTION("Macintosh NS8390-based Nubus Ethernet driver"); MODULE_DESCRIPTION("Macintosh NS8390-based Nubus Ethernet driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
static struct net_device *dev_mac8390; static int __init mac8390_init(void)
int __init init_module(void)
{ {
dev_mac8390 = mac8390_probe(-1); return nubus_driver_register(&mac8390_driver);
if (IS_ERR(dev_mac8390)) {
pr_warn("mac8390: No card found\n");
return PTR_ERR(dev_mac8390);
}
return 0;
} }
module_init(mac8390_init);
void __exit cleanup_module(void) static void __exit mac8390_exit(void)
{ {
unregister_netdev(dev_mac8390); nubus_driver_unregister(&mac8390_driver);
free_netdev(dev_mac8390);
} }
module_exit(mac8390_exit);
#endif /* MODULE */
static const struct net_device_ops mac8390_netdev_ops = { static const struct net_device_ops mac8390_netdev_ops = {
.ndo_open = mac8390_open, .ndo_open = mac8390_open,
...@@ -493,8 +481,7 @@ static const struct net_device_ops mac8390_netdev_ops = { ...@@ -493,8 +481,7 @@ static const struct net_device_ops mac8390_netdev_ops = {
#endif #endif
}; };
static int __init mac8390_initdev(struct net_device *dev, static int mac8390_initdev(struct net_device *dev, struct nubus_board *board,
struct nubus_rsrc *ndev,
enum mac8390_type type) enum mac8390_type type)
{ {
static u32 fwrd4_offsets[16] = { static u32 fwrd4_offsets[16] = {
...@@ -546,7 +533,8 @@ static int __init mac8390_initdev(struct net_device *dev, ...@@ -546,7 +533,8 @@ static int __init mac8390_initdev(struct net_device *dev,
case MAC8390_APPLE: case MAC8390_APPLE:
switch (mac8390_testio(dev->mem_start)) { switch (mac8390_testio(dev->mem_start)) {
case ACCESS_UNKNOWN: case ACCESS_UNKNOWN:
pr_err("Don't know how to access card memory!\n"); dev_err(&board->dev,
"Don't know how to access card memory\n");
return -ENODEV; return -ENODEV;
case ACCESS_16: case ACCESS_16:
...@@ -612,18 +600,15 @@ static int __init mac8390_initdev(struct net_device *dev, ...@@ -612,18 +600,15 @@ static int __init mac8390_initdev(struct net_device *dev,
break; break;
default: default:
pr_err("Card type %s is unsupported, sorry\n", dev_err(&board->dev, "Unsupported card type\n");
ndev->board->name);
return -ENODEV; return -ENODEV;
} }
__NS8390_init(dev, 0); __NS8390_init(dev, 0);
/* Good, done, now spit out some messages */ /* Good, done, now spit out some messages */
pr_info("%s: %s in slot %X (type %s)\n", dev_info(&board->dev, "%s (type %s)\n", board->name, cardname[type]);
dev->name, ndev->board->name, ndev->board->slot, dev_info(&board->dev, "MAC %pM, IRQ %d, %d KB shared memory at %#lx, %d-bit access.\n",
cardname[type]);
pr_info("MAC %pM IRQ %d, %d KB shared memory at %#lx, %d-bit access.\n",
dev->dev_addr, dev->irq, dev->dev_addr, dev->irq,
(unsigned int)(dev->mem_end - dev->mem_start) >> 10, (unsigned int)(dev->mem_end - dev->mem_start) >> 10,
dev->mem_start, access_bitmode ? 32 : 16); dev->mem_start, access_bitmode ? 32 : 16);
......
...@@ -38,7 +38,6 @@ static const char version[] = ...@@ -38,7 +38,6 @@ static const char version[] =
#define NESM_START_PG 0x40 /* First page of TX buffer */ #define NESM_START_PG 0x40 /* First page of TX buffer */
#define NESM_STOP_PG 0x80 /* Last page +1 of RX ring */ #define NESM_STOP_PG 0x80 /* Last page +1 of RX ring */
static u32 mcf8390_msg_enable;
#ifdef NE2000_ODDOFFSET #ifdef NE2000_ODDOFFSET
/* /*
...@@ -407,7 +406,6 @@ static int mcf8390_init(struct net_device *dev) ...@@ -407,7 +406,6 @@ static int mcf8390_init(struct net_device *dev)
static int mcf8390_probe(struct platform_device *pdev) static int mcf8390_probe(struct platform_device *pdev)
{ {
struct net_device *dev; struct net_device *dev;
struct ei_device *ei_local;
struct resource *mem, *irq; struct resource *mem, *irq;
resource_size_t msize; resource_size_t msize;
int ret; int ret;
...@@ -435,8 +433,6 @@ static int mcf8390_probe(struct platform_device *pdev) ...@@ -435,8 +433,6 @@ static int mcf8390_probe(struct platform_device *pdev)
SET_NETDEV_DEV(dev, &pdev->dev); SET_NETDEV_DEV(dev, &pdev->dev);
platform_set_drvdata(pdev, dev); platform_set_drvdata(pdev, dev);
ei_local = netdev_priv(dev);
ei_local->msg_enable = mcf8390_msg_enable;
dev->irq = irq->start; dev->irq = irq->start;
dev->base_addr = mem->start; dev->base_addr = mem->start;
......
...@@ -485,7 +485,7 @@ static int __init ne_probe1(struct net_device *dev, unsigned long ioaddr) ...@@ -485,7 +485,7 @@ static int __init ne_probe1(struct net_device *dev, unsigned long ioaddr)
mdelay(10); /* wait 10ms for interrupt to propagate */ mdelay(10); /* wait 10ms for interrupt to propagate */
outb_p(0x00, ioaddr + EN0_IMR); /* Mask it again. */ outb_p(0x00, ioaddr + EN0_IMR); /* Mask it again. */
dev->irq = probe_irq_off(cookie); dev->irq = probe_irq_off(cookie);
if (netif_msg_probe(ei_local)) if (ne_msg_enable & NETIF_MSG_PROBE)
pr_cont(" autoirq is %d", dev->irq); pr_cont(" autoirq is %d", dev->irq);
} else if (dev->irq == 2) } else if (dev->irq == 2)
/* Fixup for users that don't know that IRQ 2 is really IRQ 9, /* Fixup for users that don't know that IRQ 2 is really IRQ 9,
......
...@@ -66,7 +66,6 @@ ...@@ -66,7 +66,6 @@
#define PCNET_RDC_TIMEOUT (2*HZ/100) /* Max wait in jiffies for Tx RDC */ #define PCNET_RDC_TIMEOUT (2*HZ/100) /* Max wait in jiffies for Tx RDC */
static const char *if_names[] = { "auto", "10baseT", "10base2"}; static const char *if_names[] = { "auto", "10baseT", "10base2"};
static u32 pcnet_msg_enable;
/*====================================================================*/ /*====================================================================*/
...@@ -556,7 +555,6 @@ static int pcnet_config(struct pcmcia_device *link) ...@@ -556,7 +555,6 @@ static int pcnet_config(struct pcmcia_device *link)
int start_pg, stop_pg, cm_offset; int start_pg, stop_pg, cm_offset;
int has_shmem = 0; int has_shmem = 0;
struct hw_info *local_hw_info; struct hw_info *local_hw_info;
struct ei_device *ei_local;
dev_dbg(&link->dev, "pcnet_config\n"); dev_dbg(&link->dev, "pcnet_config\n");
...@@ -606,8 +604,6 @@ static int pcnet_config(struct pcmcia_device *link) ...@@ -606,8 +604,6 @@ static int pcnet_config(struct pcmcia_device *link)
mii_phy_probe(dev); mii_phy_probe(dev);
SET_NETDEV_DEV(dev, &link->dev); SET_NETDEV_DEV(dev, &link->dev);
ei_local = netdev_priv(dev);
ei_local->msg_enable = pcnet_msg_enable;
if (register_netdev(dev) != 0) { if (register_netdev(dev) != 0) {
pr_notice("register_netdev() failed\n"); pr_notice("register_netdev() failed\n");
......
...@@ -299,7 +299,7 @@ static int __init wd_probe1(struct net_device *dev, int ioaddr) ...@@ -299,7 +299,7 @@ static int __init wd_probe1(struct net_device *dev, int ioaddr)
outb_p(0x00, nic_addr+EN0_IMR); /* Mask all intrs. again. */ outb_p(0x00, nic_addr+EN0_IMR); /* Mask all intrs. again. */
if (netif_msg_drv(ei_local)) if (wd_msg_enable & NETIF_MSG_PROBE)
pr_cont(" autoirq is %d", dev->irq); pr_cont(" autoirq is %d", dev->irq);
if (dev->irq < 2) if (dev->irq < 2)
dev->irq = word16 ? 10 : 5; dev->irq = word16 ? 10 : 5;
......
...@@ -44,8 +44,6 @@ ...@@ -44,8 +44,6 @@
static const char version[] = static const char version[] =
"8390.c:v1.10cvs 9/23/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n"; "8390.c:v1.10cvs 9/23/94 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
static u32 zorro8390_msg_enable;
#include "lib8390.c" #include "lib8390.c"
#define DRV_NAME "zorro8390" #define DRV_NAME "zorro8390"
...@@ -296,7 +294,6 @@ static int zorro8390_init(struct net_device *dev, unsigned long board, ...@@ -296,7 +294,6 @@ static int zorro8390_init(struct net_device *dev, unsigned long board,
int err; int err;
unsigned char SA_prom[32]; unsigned char SA_prom[32];
int start_page, stop_page; int start_page, stop_page;
struct ei_device *ei_local = netdev_priv(dev);
static u32 zorro8390_offsets[16] = { static u32 zorro8390_offsets[16] = {
0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e, 0x00, 0x02, 0x04, 0x06, 0x08, 0x0a, 0x0c, 0x0e,
0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e, 0x10, 0x12, 0x14, 0x16, 0x18, 0x1a, 0x1c, 0x1e,
...@@ -388,8 +385,6 @@ static int zorro8390_init(struct net_device *dev, unsigned long board, ...@@ -388,8 +385,6 @@ static int zorro8390_init(struct net_device *dev, unsigned long board,
dev->netdev_ops = &zorro8390_netdev_ops; dev->netdev_ops = &zorro8390_netdev_ops;
__NS8390_init(dev, 0); __NS8390_init(dev, 0);
ei_local->msg_enable = zorro8390_msg_enable;
err = register_netdev(dev); err = register_netdev(dev);
if (err) { if (err) {
free_irq(IRQ_AMIGA_PORTS, dev); free_irq(IRQ_AMIGA_PORTS, dev);
......
...@@ -20,7 +20,6 @@ struct net_device *cs89x0_probe(int unit); ...@@ -20,7 +20,6 @@ struct net_device *cs89x0_probe(int unit);
struct net_device *mvme147lance_probe(int unit); struct net_device *mvme147lance_probe(int unit);
struct net_device *tc515_probe(int unit); struct net_device *tc515_probe(int unit);
struct net_device *lance_probe(int unit); struct net_device *lance_probe(int unit);
struct net_device *mac8390_probe(int unit);
struct net_device *mac89x0_probe(int unit); struct net_device *mac89x0_probe(int unit);
struct net_device *cops_probe(int unit); struct net_device *cops_probe(int unit);
struct net_device *ltpc_probe(void); struct net_device *ltpc_probe(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment