summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/ed/if_ed_pccard.c16
-rw-r--r--sys/dev/ed/if_edreg.h1
2 files changed, 11 insertions, 6 deletions
diff --git a/sys/dev/ed/if_ed_pccard.c b/sys/dev/ed/if_ed_pccard.c
index 23ef71d..38af728 100644
--- a/sys/dev/ed/if_ed_pccard.c
+++ b/sys/dev/ed/if_ed_pccard.c
@@ -565,6 +565,15 @@ ed_pccard_attach(device_t dev)
}
error = ed_attach(sc, device_get_unit(dev), flags);
+ if (error == 0 && sc->vendor == ED_VENDOR_LINKSYS) {
+ /* Probe for an MII bus, but ignore errors. */
+ ed_pccard_dlink_mii_reset(sc);
+ sc->mii_readbits = ed_pccard_dlink_mii_readbits;
+ sc->mii_writebits = ed_pccard_dlink_mii_writebits;
+ mii_phy_probe(dev, &sc->miibus, ed_ifmedia_upd,
+ ed_ifmedia_sts);
+ }
+
return (error);
}
@@ -668,15 +677,10 @@ ed_pccard_Linksys(device_t dev)
ed_nic_outb(sc, ED_P0_DCR, ED_DCR_WTS | ED_DCR_FT1 | ED_DCR_LS);
sc->isa16bit = 1;
+ sc->vendor = ED_VENDOR_LINKSYS;
sc->type = ED_TYPE_NE2000;
sc->type_str = "Linksys";
- /* Probe for an MII bus, but continue as normal if there isn't one. */
- ed_pccard_dlink_mii_reset(sc);
- sc->mii_readbits = ed_pccard_dlink_mii_readbits;
- sc->mii_writebits = ed_pccard_dlink_mii_writebits;
- mii_phy_probe(dev, &sc->miibus, ed_ifmedia_upd, ed_ifmedia_sts);
-
return (1);
}
diff --git a/sys/dev/ed/if_edreg.h b/sys/dev/ed/if_edreg.h
index a2e1882..068361a 100644
--- a/sys/dev/ed/if_edreg.h
+++ b/sys/dev/ed/if_edreg.h
@@ -577,6 +577,7 @@ struct ed_ring {
#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) */
/*
* Compile-time config flags
OpenPOWER on IntegriCloud