Eliminate the ED_VENDOR_{PCCARD,LINKSYS} types. These cards really

are NOVELL NE2000 with just a tiny quirk that's non vendor specific.
Instead, use the chip_type of DL100XX instead.  This is more inline
with how the AX88190 support was added, and seems a little cleaner.
This commit is contained in:
Warner Losh 2005-02-11 06:02:27 +00:00
parent 8d50b6af00
commit bd019eb78c
3 changed files with 9 additions and 8 deletions

View File

@ -161,6 +161,7 @@ ed_probe_Novell_generic(device_t dev, int flags)
return (ENXIO);
}
}
sc->chip_type = ED_CHIP_TYPE_DP8390;
/* 8k of memory plus an additional 8k if 16bit */
memsize = 8192 + sc->isa16bit * 8192;

View File

@ -246,7 +246,7 @@ ed_pccard_attach(device_t dev)
return (error);
}
if (sc->vendor != ED_VENDOR_LINKSYS) {
if (sc->chip_type == ED_CHIP_TYPE_DP8390) {
pccard_get_ether(dev, ether_addr);
for (i = 0, sum = 0; i < ETHER_ADDR_LEN; i++)
sum |= ether_addr[i];
@ -256,7 +256,7 @@ ed_pccard_attach(device_t dev)
error = ed_attach(dev);
#ifndef ED_NO_MIIBUS
if (error == 0 && sc->vendor == ED_VENDOR_LINKSYS) {
if (error == 0 && sc->chip_type == ED_CHIP_TYPE_DL100XX) {
/* Probe for an MII bus, but ignore errors. */
ed_pccard_dlink_mii_reset(sc);
sc->mii_readbits = ed_pccard_dlink_mii_readbits;
@ -368,8 +368,9 @@ ed_pccard_Linksys(device_t dev)
ed_nic_outb(sc, ED_P0_DCR, ED_DCR_WTS | ED_DCR_FT1 | ED_DCR_LS);
id = ed_asic_inb(sc, 0xf);
sc->isa16bit = 1;
sc->vendor = ED_VENDOR_LINKSYS;
sc->vendor = ED_VENDOR_NOVELL;
sc->type = ED_TYPE_NE2000;
sc->chip_type = ED_CHIP_TYPE_DL100XX;
sc->type_str = ((id & 0x90) == 0x90) ? "DL10022" : "DL10019";
return (0);
}
@ -405,7 +406,7 @@ ed_pccard_ax88190(device_t dev)
ed_release_resources(dev);
error = ed_probe_Novell(dev, 0, flags);
if (error == 0) {
sc->vendor = ED_VENDOR_PCCARD;
sc->vendor = ED_VENDOR_NOVELL;
sc->type = ED_TYPE_NE2000;
sc->type_str = "AX88190";
}

View File

@ -575,10 +575,8 @@ struct ed_ring {
#define ED_VENDOR_WD_SMC 0x00 /* Western Digital/SMC */
#define ED_VENDOR_3COM 0x01 /* 3Com */
#define ED_VENDOR_NOVELL 0x02 /* Novell */
#define ED_VENDOR_PCCARD 0x03 /* PCMCIA/PCCARD */
#define ED_VENDOR_HP 0x04 /* Hewlett Packard */
#define ED_VENDOR_LINKSYS 0x05 /* Linksys (Dlink) */
#define ED_VENDOR_SIC 0x06 /* Allied-Telesis SIC */
#define ED_VENDOR_HP 0x03 /* Hewlett Packard */
#define ED_VENDOR_SIC 0x04 /* Allied-Telesis SIC */
/*
* Compile-time config flags
@ -1116,6 +1114,7 @@ struct ed_ring {
#define ED_CHIP_TYPE_DP8390 0x00
#define ED_CHIP_TYPE_WD790 0x01
#define ED_CHIP_TYPE_AX88190 0x02
#define ED_CHIP_TYPE_DL100XX 0x03
/*
* AX88190 IOBASE registers.