diff options
author | Warner Losh <imp@FreeBSD.org> | 2005-02-11 06:02:27 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2005-02-11 06:02:27 +0000 |
commit | bd019eb78c6ab056601e762fcf093ac7072365da (patch) | |
tree | 249892eb312f2baf0d14f669175c44ed6e6d80d1 /sys/dev | |
parent | 8d50b6af002e8cc3535c9d725dc756a90ada2672 (diff) | |
download | src-bd019eb78c6ab056601e762fcf093ac7072365da.tar.gz src-bd019eb78c6ab056601e762fcf093ac7072365da.zip |
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.
Notes
Notes:
svn path=/head/; revision=141681
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ed/if_ed_novell.c | 1 | ||||
-rw-r--r-- | sys/dev/ed/if_ed_pccard.c | 9 | ||||
-rw-r--r-- | sys/dev/ed/if_edreg.h | 7 |
3 files changed, 9 insertions, 8 deletions
diff --git a/sys/dev/ed/if_ed_novell.c b/sys/dev/ed/if_ed_novell.c index f4278e608298..980ee05c19b0 100644 --- a/sys/dev/ed/if_ed_novell.c +++ b/sys/dev/ed/if_ed_novell.c @@ -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; diff --git a/sys/dev/ed/if_ed_pccard.c b/sys/dev/ed/if_ed_pccard.c index f67c6e480fe4..76ff5cb3fd25 100644 --- a/sys/dev/ed/if_ed_pccard.c +++ b/sys/dev/ed/if_ed_pccard.c @@ -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"; } diff --git a/sys/dev/ed/if_edreg.h b/sys/dev/ed/if_edreg.h index cfe5b7053142..b38cc58456da 100644 --- a/sys/dev/ed/if_edreg.h +++ b/sys/dev/ed/if_edreg.h @@ -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. |