diff options
author | ps <ps@FreeBSD.org> | 2000-06-18 05:50:16 +0000 |
---|---|---|
committer | ps <ps@FreeBSD.org> | 2000-06-18 05:50:16 +0000 |
commit | 20e213c55c8525c2fa86f8a46bb1a0c71bb6ad7c (patch) | |
tree | 90e239066c4d441a5cd83831a80aad41ce8aacbf /sys/dev/ed | |
parent | 69488e50fe81da5e4d2b5f285868e12d4858ac6f (diff) | |
download | FreeBSD-src-20e213c55c8525c2fa86f8a46bb1a0c71bb6ad7c.zip FreeBSD-src-20e213c55c8525c2fa86f8a46bb1a0c71bb6ad7c.tar.gz |
Allow newer Linksys 10/100 PCMCIA cards to work.
Reviewed by: imp
Diffstat (limited to 'sys/dev/ed')
-rw-r--r-- | sys/dev/ed/if_ed.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c index bc5c077..4e55f37 100644 --- a/sys/dev/ed/if_ed.c +++ b/sys/dev/ed/if_ed.c @@ -1006,18 +1006,16 @@ ed_probe_Novell_generic(dev, port_rid, flags) ed_pio_writemem(sc, test_pattern, 8192, sizeof(test_pattern)); ed_pio_readmem(sc, 8192, test_buffer, sizeof(test_pattern)); - if (bcmp(test_pattern, test_buffer, sizeof(test_pattern)) == 0) { - /* could be either an NE1000 or a Linksys ethernet controller */ - linksys = ed_get_Linksys(sc); - if (linksys) { - outb(sc->nic_addr + ED_P0_DCR, ED_DCR_WTS | ED_DCR_FT1 | ED_DCR_LS); - sc->isa16bit = 1; - sc->type = ED_TYPE_NE2000; - sc->type_str = "Linksys"; - } else { - sc->type = ED_TYPE_NE1000; - sc->type_str = "NE1000"; - } + /* Check for Linksys first. */ + linksys = ed_get_Linksys(sc); + if (linksys) { + outb(sc->nic_addr + ED_P0_DCR, ED_DCR_WTS | ED_DCR_FT1 | ED_DCR_LS); + sc->isa16bit = 1; + sc->type = ED_TYPE_NE2000; + sc->type_str = "Linksys"; + } else if (bcmp(test_pattern, test_buffer, sizeof(test_pattern)) == 0) { + sc->type = ED_TYPE_NE1000; + sc->type_str = "NE1000"; } else { /* neither an NE1000 nor a Linksys - try NE2000 */ |