Commit a5e371f6 authored by Paul Gortmaker's avatar Paul Gortmaker
Browse files

drivers/net: delete all code/drivers depending on CONFIG_MCA



The support for CONFIG_MCA is being removed, since the 20
year old hardware simply isn't capable of meeting today's
software demands on CPU and memory resources.

This commit removes any MCA specific net drivers, and removes
any MCA specific probe/support code from drivers that were
doing a dual ISA/MCA role.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: netdev@vger.kernel.org
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent bc6a4744
......@@ -25,7 +25,6 @@ models:
3c509B (later revision of the ISA card; supports full-duplex)
3c589 (PCMCIA)
3c589B (later revision of the 3c589; supports full-duplex)
3c529 (MCA)
3c579 (EISA)
Large portions of this documentation were heavily borrowed from the guide
......
......@@ -11,12 +11,10 @@ i386, alpha (untested), powerpc, sparc and sparc64 archs.
The intent is to enable the use of different models of FORE adapters at the
same time, by hosts that have several bus interfaces (such as PCI+SBUS,
PCI+MCA or PCI+EISA).
or PCI+EISA).
Only PCI and SBUS devices are currently supported by the driver, but support
for other bus interfaces such as EISA should not be too hard to add (this may
be more tricky for the MCA bus, though, as FORE made some MCA-specific
modifications to the adapter's AALI interface).
for other bus interfaces such as EISA should not be too hard to add.
Firmware Copyright Notice
......
......@@ -133,22 +133,9 @@ static struct devprobe2 eisa_probes[] __initdata = {
{NULL, 0},
};
static struct devprobe2 mca_probes[] __initdata = {
#ifdef CONFIG_NE2_MCA
{ne2_probe, 0},
#endif
#ifdef CONFIG_ELMC /* 3c523 */
{elmc_probe, 0},
#endif
#ifdef CONFIG_ELMC_II /* 3c527 */
{mc32_probe, 0},
#endif
{NULL, 0},
};
/*
* ISA probes that touch addresses < 0x400 (including those that also
* look for EISA/PCI/MCA cards in addition to ISA cards).
* look for EISA/PCI cards in addition to ISA cards).
*/
static struct devprobe2 isa_probes[] __initdata = {
#if defined(CONFIG_HP100) && defined(CONFIG_ISA) /* ISA, EISA */
......@@ -278,7 +265,6 @@ static void __init ethif_probe2(int unit)
(void)( probe_list2(unit, m68k_probes, base_addr == 0) &&
probe_list2(unit, eisa_probes, base_addr == 0) &&
probe_list2(unit, mca_probes, base_addr == 0) &&
probe_list2(unit, isa_probes, base_addr == 0) &&
probe_list2(unit, parport_probes, base_addr == 0));
}
......
......@@ -69,7 +69,6 @@
#define TX_TIMEOUT (400*HZ/1000)
#include <linux/module.h>
#include <linux/mca.h>
#include <linux/isa.h>
#include <linux/pnp.h>
#include <linux/string.h>
......@@ -102,7 +101,7 @@ static int el3_debug = 2;
#endif
/* Used to do a global count of all the cards in the system. Must be
* a global variable so that the mca/eisa probe routines can increment
* a global variable so that the eisa probe routines can increment
* it */
static int el3_cards = 0;
#define EL3_MAX_CARDS 8
......@@ -163,7 +162,7 @@ enum RxFilter {
*/
#define SKB_QUEUE_SIZE 64
enum el3_cardtype { EL3_ISA, EL3_PNP, EL3_MCA, EL3_EISA };
enum el3_cardtype { EL3_ISA, EL3_PNP, EL3_EISA };
struct el3_private {
spinlock_t lock;
......@@ -505,41 +504,6 @@ static struct eisa_driver el3_eisa_driver = {
static int eisa_registered;
#endif
#ifdef CONFIG_MCA
static int el3_mca_probe(struct device *dev);
static short el3_mca_adapter_ids[] __initdata = {
0x627c,
0x627d,
0x62db,
0x62f6,
0x62f7,
0x0000
};
static char *el3_mca_adapter_names[] __initdata = {
"3Com 3c529 EtherLink III (10base2)",
"3Com 3c529 EtherLink III (10baseT)",
"3Com 3c529 EtherLink III (test mode)",
"3Com 3c529 EtherLink III (TP or coax)",
"3Com 3c529 EtherLink III (TP)",
NULL
};
static struct mca_driver el3_mca_driver = {
.id_table = el3_mca_adapter_ids,
.driver = {
.name = "3c529",
.bus = &mca_bus_type,
.probe = el3_mca_probe,
.remove = __devexit_p(el3_device_remove),
.suspend = el3_suspend,
.resume = el3_resume,
},
};
static int mca_registered;
#endif /* CONFIG_MCA */
static const struct net_device_ops netdev_ops = {
.ndo_open = el3_open,
.ndo_stop = el3_close,
......@@ -600,76 +564,6 @@ static void el3_common_remove (struct net_device *dev)
free_netdev (dev);
}
#ifdef CONFIG_MCA
static int __init el3_mca_probe(struct device *device)
{
/* Based on Erik Nygren's (nygren@mit.edu) 3c529 patch,
* heavily modified by Chris Beauregard
* (cpbeaure@csclub.uwaterloo.ca) to support standard MCA
* probing.
*
* redone for multi-card detection by ZP Gu (zpg@castle.net)
* now works as a module */
short i;
int ioaddr, irq, if_port;
__be16 phys_addr[3];
struct net_device *dev = NULL;
u_char pos4, pos5;
struct mca_device *mdev = to_mca_device(device);
int slot = mdev->slot;
int err;
pos4 = mca_device_read_stored_pos(mdev, 4);
pos5 = mca_device_read_stored_pos(mdev, 5);
ioaddr = ((short)((pos4&0xfc)|0x02)) << 8;
irq = pos5 & 0x0f;
pr_info("3c529: found %s at slot %d\n",
el3_mca_adapter_names[mdev->index], slot + 1);
/* claim the slot */
strncpy(mdev->name, el3_mca_adapter_names[mdev->index],
sizeof(mdev->name));
mca_device_set_claim(mdev, 1);
if_port = pos4 & 0x03;
irq = mca_device_transform_irq(mdev, irq);
ioaddr = mca_device_transform_ioport(mdev, ioaddr);
if (el3_debug > 2) {
pr_debug("3c529: irq %d ioaddr 0x%x ifport %d\n", irq, ioaddr, if_port);
}
EL3WINDOW(0);
for (i = 0; i < 3; i++)
phys_addr[i] = htons(read_eeprom(ioaddr, i));
dev = alloc_etherdev(sizeof (struct el3_private));
if (dev == NULL) {
release_region(ioaddr, EL3_IO_EXTENT);
return -ENOMEM;
}
netdev_boot_setup_check(dev);
el3_dev_fill(dev, phys_addr, ioaddr, irq, if_port, EL3_MCA);
dev_set_drvdata(device, dev);
err = el3_common_init(dev);
if (err) {
dev_set_drvdata(device, NULL);
free_netdev(dev);
return -ENOMEM;
}
el3_devs[el3_cards++] = dev;
return 0;
}
#endif /* CONFIG_MCA */
#ifdef CONFIG_EISA
static int __init el3_eisa_probe (struct device *device)
{
......@@ -1547,11 +1441,6 @@ static int __init el3_init_module(void)
if (!ret)
eisa_registered = 1;
#endif
#ifdef CONFIG_MCA
ret = mca_register_driver(&el3_mca_driver);
if (!ret)
mca_registered = 1;
#endif
#ifdef CONFIG_PNP
if (pnp_registered)
......@@ -1562,10 +1451,6 @@ static int __init el3_init_module(void)
#ifdef CONFIG_EISA
if (eisa_registered)
ret = 0;
#endif
#ifdef CONFIG_MCA
if (mca_registered)
ret = 0;
#endif
return ret;
}
......@@ -1584,10 +1469,6 @@ static void __exit el3_cleanup_module(void)
if (eisa_registered)
eisa_driver_unregister(&el3_eisa_driver);
#endif
#ifdef CONFIG_MCA
if (mca_registered)
mca_unregister_driver(&el3_mca_driver);
#endif
}
module_init (el3_init_module);
......
......@@ -182,18 +182,6 @@ config NE2000
To compile this driver as a module, choose M here. The module
will be called ne.
config NE2_MCA
tristate "NE/2 (ne2000 MCA version) support"
depends on MCA_LEGACY
select CRC32
---help---
If you have a network (Ethernet) card of this type, say Y and read
the Ethernet-HOWTO, available from
<http://www.tldp.org/docs.html#howto>.
To compile this driver as a module, choose M here. The module
will be called ne2.
config NE2K_PCI
tristate "PCI NE2000 and clones support (see help)"
depends on PCI
......@@ -267,18 +255,6 @@ config STNIC
If unsure, say N.
config ULTRAMCA
tristate "SMC Ultra MCA support"
depends on MCA
select CRC32
---help---
If you have a network (Ethernet) card of this type and are running
an MCA based system (PS/2), say Y and read the Ethernet-HOWTO,
available from <http://www.tldp.org/docs.html#howto>.
To compile this driver as a module, choose M here. The module
will be called smc-mca.
config ULTRA
tristate "SMC Ultra support"
depends on ISA
......
......@@ -24,6 +24,5 @@ obj-$(CONFIG_PCMCIA_PCNET) += pcnet_cs.o 8390.o
obj-$(CONFIG_STNIC) += stnic.o 8390.o
obj-$(CONFIG_ULTRA) += smc-ultra.o 8390.o
obj-$(CONFIG_ULTRA32) += smc-ultra32.o 8390.o
obj-$(CONFIG_ULTRAMCA) += smc-mca.o 8390.o
obj-$(CONFIG_WD80x3) += wd.o 8390.o
obj-$(CONFIG_ZORRO8390) += zorro8390.o 8390.o
This diff is collapsed.
/* smc-mca.c: A SMC Ultra ethernet driver for linux. */
/*
Most of this driver, except for ultramca_probe is nearly
verbatim from smc-ultra.c by Donald Becker. The rest is
written and copyright 1996 by David Weis, weisd3458@uni.edu
This is a driver for the SMC Ultra and SMC EtherEZ ethercards.
This driver uses the cards in the 8390-compatible, shared memory mode.
Most of the run-time complexity is handled by the generic code in
8390.c.
This driver enables the shared memory only when doing the actual data
transfers to avoid a bug in early version of the card that corrupted
data transferred by a AHA1542.
This driver does not support the programmed-I/O data transfer mode of
the EtherEZ. That support (if available) is smc-ez.c. Nor does it
use the non-8390-compatible "Altego" mode. (No support currently planned.)
Changelog:
Paul Gortmaker : multiple card support for module users.
David Weis : Micro Channel-ized it.
Tom Sightler : Added support for IBM PS/2 Ethernet Adapter/A
Christopher Turcksin : Changed MCA-probe so that multiple adapters are
found correctly (Jul 16, 1997)
Chris Beauregard : Tried to merge the two changes above (Dec 15, 1997)
Tom Sightler : Fixed minor detection bug caused by above merge
Tom Sightler : Added support for three more Western Digital
MCA-adapters
Tom Sightler : Added support for 2.2.x mca_find_unused_adapter
Hartmut Schmidt : - Modified parameter detection to handle each
card differently depending on a switch-list
- 'card_ver' removed from the adapter list
- Some minor bug fixes
*/
#include <linux/mca.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <asm/io.h>
#include "8390.h"
#define DRV_NAME "smc-mca"
static int ultramca_open(struct net_device *dev);
static void ultramca_reset_8390(struct net_device *dev);
static void ultramca_get_8390_hdr(struct net_device *dev,
struct e8390_pkt_hdr *hdr,
int ring_page);
static void ultramca_block_input(struct net_device *dev, int count,
struct sk_buff *skb,
int ring_offset);
static void ultramca_block_output(struct net_device *dev, int count,
const unsigned char *buf,
const int start_page);
static int ultramca_close_card(struct net_device *dev);
#define START_PG 0x00 /* First page of TX buffer */
#define ULTRA_CMDREG 0 /* Offset to ASIC command register. */
#define ULTRA_RESET 0x80 /* Board reset, in ULTRA_CMDREG. */
#define ULTRA_MEMENB 0x40 /* Enable the shared memory. */
#define ULTRA_NIC_OFFSET 16 /* NIC register offset from the base_addr. */
#define ULTRA_IO_EXTENT 32
#define EN0_ERWCNT 0x08 /* Early receive warning count. */
#define _61c8_SMC_Ethercard_PLUS_Elite_A_BNC_AUI_WD8013EP_A 0
#define _61c9_SMC_Ethercard_PLUS_Elite_A_UTP_AUI_WD8013EP_A 1
#define _6fc0_WD_Ethercard_PLUS_A_WD8003E_A_OR_WD8003ET_A 2
#define _6fc1_WD_Starcard_PLUS_A_WD8003ST_A 3
#define _6fc2_WD_Ethercard_PLUS_10T_A_WD8003W_A 4
#define _efd4_IBM_PS2_Adapter_A_for_Ethernet_UTP_AUI_WD8013WP_A 5
#define _efd5_IBM_PS2_Adapter_A_for_Ethernet_BNC_AUI_WD8013WP_A 6
#define _efe5_IBM_PS2_Adapter_A_for_Ethernet 7
struct smc_mca_adapters_t {
unsigned int id;
char *name;
};
#define MAX_ULTRAMCA_CARDS 4 /* Max number of Ultra cards per module */
static int ultra_io[MAX_ULTRAMCA_CARDS];
static int ultra_irq[MAX_ULTRAMCA_CARDS];
MODULE_LICENSE("GPL");
module_param_array(ultra_io, int, NULL, 0);
module_param_array(ultra_irq, int, NULL, 0);
MODULE_PARM_DESC(ultra_io, "SMC Ultra/EtherEZ MCA I/O base address(es)");
MODULE_PARM_DESC(ultra_irq, "SMC Ultra/EtherEZ MCA IRQ number(s)");
static const struct {
unsigned int base_addr;
} addr_table[] = {
{ 0x0800 },
{ 0x1800 },
{ 0x2800 },
{ 0x3800 },
{ 0x4800 },
{ 0x5800 },
{ 0x6800 },
{ 0x7800 },
{ 0x8800 },
{ 0x9800 },
{ 0xa800 },
{ 0xb800 },
{ 0xc800 },
{ 0xd800 },
{ 0xe800 },
{ 0xf800 }
};
#define MEM_MASK 64
static const struct {
unsigned char mem_index;
unsigned long mem_start;
unsigned char num_pages;
} mem_table[] = {
{ 16, 0x0c0000, 40 },
{ 18, 0x0c4000, 40 },
{ 20, 0x0c8000, 40 },
{ 22, 0x0cc000, 40 },
{ 24, 0x0d0000, 40 },
{ 26, 0x0d4000, 40 },
{ 28, 0x0d8000, 40 },
{ 30, 0x0dc000, 40 },
{144, 0xfc0000, 40 },
{148, 0xfc8000, 40 },
{154, 0xfd0000, 40 },
{156, 0xfd8000, 40 },
{ 0, 0x0c0000, 20 },
{ 1, 0x0c2000, 20 },
{ 2, 0x0c4000, 20 },
{ 3, 0x0c6000, 20 }
};
#define IRQ_MASK 243
static const struct {
unsigned char new_irq;
unsigned char old_irq;
} irq_table[] = {
{ 3, 3 },
{ 4, 4 },
{ 10, 10 },
{ 14, 15 }
};
static short smc_mca_adapter_ids[] __initdata = {
0x61c8,
0x61c9,
0x6fc0,
0x6fc1,
0x6fc2,
0xefd4,
0xefd5,
0xefe5,
0x0000
};
static char *smc_mca_adapter_names[] __initdata = {
"SMC Ethercard PLUS Elite/A BNC/AUI (WD8013EP/A)",
"SMC Ethercard PLUS Elite/A UTP/AUI (WD8013WP/A)",
"WD Ethercard PLUS/A (WD8003E/A or WD8003ET/A)",
"WD Starcard PLUS/A (WD8003ST/A)",
"WD Ethercard PLUS 10T/A (WD8003W/A)",
"IBM PS/2 Adapter/A for Ethernet UTP/AUI (WD8013WP/A)",
"IBM PS/2 Adapter/A for Ethernet BNC/AUI (WD8013EP/A)",
"IBM PS/2 Adapter/A for Ethernet",
NULL
};
static int ultra_found = 0;
static const struct net_device_ops ultramca_netdev_ops = {
.ndo_open = ultramca_open,
.ndo_stop = ultramca_close_card,
.ndo_start_xmit = ei_start_xmit,
.ndo_tx_timeout = ei_tx_timeout,
.ndo_get_stats = ei_get_stats,
.ndo_set_rx_mode = ei_set_multicast_list,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = eth_mac_addr,
.ndo_change_mtu = eth_change_mtu,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = ei_poll,
#endif
};
static int __init ultramca_probe(struct device *gen_dev)
{
unsigned short ioaddr;
struct net_device *dev;
unsigned char reg4, num_pages;
struct mca_device *mca_dev = to_mca_device(gen_dev);
char slot = mca_dev->slot;
unsigned char pos2 = 0xff, pos3 = 0xff, pos4 = 0xff, pos5 = 0xff;
int i, rc;
int adapter = mca_dev->index;
int tbase = 0;
int tirq = 0;
int base_addr = ultra_io[ultra_found];
int irq = ultra_irq[ultra_found];
if (base_addr || irq) {
printk(KERN_INFO "Probing for SMC MCA adapter");
if (base_addr) {
printk(KERN_INFO " at I/O address 0x%04x%c",
base_addr, irq ? ' ' : '\n');
}
if (irq) {
printk(KERN_INFO "using irq %d\n", irq);
}
}
tirq = 0;
tbase = 0;
/* If we're trying to match a specificied irq or io address,
* we'll reject the adapter found unless it's the one we're
* looking for */
pos2 = mca_device_read_stored_pos(mca_dev, 2); /* io_addr */
pos3 = mca_device_read_stored_pos(mca_dev, 3); /* shared mem */
pos4 = mca_device_read_stored_pos(mca_dev, 4); /* ROM bios addr range */
pos5 = mca_device_read_stored_pos(mca_dev, 5); /* irq, media and RIPL */
/* Test the following conditions:
* - If an irq parameter is supplied, compare it
* with the irq of the adapter we found
* - If a base_addr paramater is given, compare it
* with the base_addr of the adapter we found
* - Check that the irq and the base_addr of the
* adapter we found is not already in use by
* this driver
*/
switch (mca_dev->index) {
case _61c8_SMC_Ethercard_PLUS_Elite_A_BNC_AUI_WD8013EP_A:
case _61c9_SMC_Ethercard_PLUS_Elite_A_UTP_AUI_WD8013EP_A:
case _efd4_IBM_PS2_Adapter_A_for_Ethernet_UTP_AUI_WD8013WP_A:
case _efd5_IBM_PS2_Adapter_A_for_Ethernet_BNC_AUI_WD8013WP_A:
{
tbase = addr_table[(pos2 & 0xf0) >> 4].base_addr;
tirq = irq_table[(pos5 & 0xc) >> 2].new_irq;
break;
}
case _6fc0_WD_Ethercard_PLUS_A_WD8003E_A_OR_WD8003ET_A:
case _6fc1_WD_Starcard_PLUS_A_WD8003ST_A:
case _6fc2_WD_Ethercard_PLUS_10T_A_WD8003W_A:
case _efe5_IBM_PS2_Adapter_A_for_Ethernet:
{
tbase = ((pos2 & 0x0fe) * 0x10);
tirq = irq_table[(pos5 & 3)].old_irq;
break;
}
}
if(!tirq || !tbase ||
(irq && irq != tirq) ||
(base_addr && tbase != base_addr))
/* FIXME: we're trying to force the ordering of the
* devices here, there should be a way of getting this
* to happen */
return -ENXIO;
/* Adapter found. */
dev = alloc_ei_netdev();
if(!dev)
return -ENODEV;
SET_NETDEV_DEV(dev, gen_dev);
mca_device_set_name(mca_dev, smc_mca_adapter_names[adapter]);
mca_device_set_claim(mca_dev, 1);
printk(KERN_INFO "smc_mca: %s found in slot %d\n",
smc_mca_adapter_names[adapter], slot + 1);
ultra_found++;
dev->base_addr = ioaddr = mca_device_transform_ioport(mca_dev, tbase);
dev->irq = mca_device_transform_irq(mca_dev, tirq);
dev->mem_start = 0;
num_pages = 40;
switch (adapter) { /* card-# in const array above [hs] */
case _61c8_SMC_Ethercard_PLUS_Elite_A_BNC_AUI_WD8013EP_A:
case _61c9_SMC_Ethercard_PLUS_Elite_A_UTP_AUI_WD8013EP_A:
{
for (i = 0; i < 16; i++) { /* taking 16 counts
* up to 15 [hs] */
if (mem_table[i].mem_index == (pos3 & ~MEM_MASK)) {
dev->mem_start = (unsigned long)
mca_device_transform_memory(mca_dev, (void *)mem_table[i].mem_start);
num_pages = mem_table[i].num_pages;
}
}
break;
}
case _6fc0_WD_Ethercard_PLUS_A_WD8003E_A_OR_WD8003ET_A:
case _6fc1_WD_Starcard_PLUS_A_WD8003ST_A:
case _6fc2_WD_Ethercard_PLUS_10T_A_WD8003W_A:
case _efe5_IBM_PS2_Adapter_A_for_Ethernet:
{
dev->mem_start = (unsigned long)
mca_device_transform_memory(mca_dev, (void *)((pos3 & 0xfc) * 0x1000));
num_pages = 0x40;
break;
}
case _efd4_IBM_PS2_Adapter_A_for_Ethernet_UTP_AUI_WD8013WP_A:
case _efd5_IBM_PS2_Adapter_A_for_Ethernet_BNC_AUI_WD8013WP_A:
{
/* courtesy of gamera@quartz.ocn.ne.jp, pos3 indicates
* the index of the 0x2000 step.
* beware different number of pages [hs]
*/
dev->mem_start = (unsigned long)
mca_device_transform_memory(mca_dev, (void *)(0xc0000 + (0x2000 * (pos3 & 0xf))));
num_pages = 0x20 + (2 * (pos3 & 0x10));
break;
}
}
/* sanity check, shouldn't happen */
if (dev->mem_start == 0)