diff options
author | imp <imp@FreeBSD.org> | 2005-09-13 19:47:44 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2005-09-13 19:47:44 +0000 |
commit | 3ef24c3089e7bde5e77c0f13289015e498b92026 (patch) | |
tree | 21f07302c22923d096fb5edb059f284133d121a7 /sys/dev/ed/if_ed.c | |
parent | e0251ac0113ad7446f0c2eada18d29def9bec110 (diff) | |
download | FreeBSD-src-3ef24c3089e7bde5e77c0f13289015e498b92026.zip FreeBSD-src-3ef24c3089e7bde5e77c0f13289015e498b92026.tar.gz |
MFp4: Omnibus ed changes
o Attach AX88x90's MII bus to system, and require its presence.
o Reorg the mii code a little, and move more of it into pccard attachment.
o Eliminate ed_pccard_{read,write}_attrmem in favor of a more appropriate
function in the pccard layer.
o Update comments to reflect knowledge gained.
o Update how re recognize a NE-2000 ROM. I found a couple of different
datasheets that define the structure of the PROM data, so the code's
old heuristics have been removed, and comments updated to reflect the
structure.
o Eliminate work around for EC2T. It is no longer needed, and was wrong
headed since the EC2T has a Winbound 82C926C in it, not a AX88x90.
o Add copyright to if_ed_pccard.c, since I believe I've re-written more than
3/4 of it.
# With these changes, all of my 20-odd ed based cards work, except for the
# NetGear FA-410, and I'm pretty sure that's a MII/PHY problem.
Diffstat (limited to 'sys/dev/ed/if_ed.c')
-rw-r--r-- | sys/dev/ed/if_ed.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c index 3a34488..41fc22e 100644 --- a/sys/dev/ed/if_ed.c +++ b/sys/dev/ed/if_ed.c @@ -1635,43 +1635,6 @@ ed_pio_write_mbufs(struct ed_softc *sc, struct mbuf *m, bus_size_t dst) } #ifndef ED_NO_MIIBUS -/* - * MII bus support routines. - */ -int -ed_miibus_readreg(device_t dev, int phy, int reg) -{ - struct ed_softc *sc; - int failed, val; - - sc = device_get_softc(dev); - (*sc->mii_writebits)(sc, 0xffffffff, 32); - (*sc->mii_writebits)(sc, ED_MII_STARTDELIM, ED_MII_STARTDELIM_BITS); - (*sc->mii_writebits)(sc, ED_MII_READOP, ED_MII_OP_BITS); - (*sc->mii_writebits)(sc, phy, ED_MII_PHY_BITS); - (*sc->mii_writebits)(sc, reg, ED_MII_REG_BITS); - failed = (*sc->mii_readbits)(sc, ED_MII_ACK_BITS); - val = (*sc->mii_readbits)(sc, ED_MII_DATA_BITS); - (*sc->mii_writebits)(sc, ED_MII_IDLE, ED_MII_IDLE_BITS); - return (failed ? 0 : val); -} - -void -ed_miibus_writereg(device_t dev, int phy, int reg, int data) -{ - struct ed_softc *sc; - - sc = device_get_softc(dev); - (*sc->mii_writebits)(sc, 0xffffffff, 32); - (*sc->mii_writebits)(sc, ED_MII_STARTDELIM, ED_MII_STARTDELIM_BITS); - (*sc->mii_writebits)(sc, ED_MII_WRITEOP, ED_MII_OP_BITS); - (*sc->mii_writebits)(sc, phy, ED_MII_PHY_BITS); - (*sc->mii_writebits)(sc, reg, ED_MII_REG_BITS); - (*sc->mii_writebits)(sc, ED_MII_TURNAROUND, ED_MII_TURNAROUND_BITS); - (*sc->mii_writebits)(sc, data, ED_MII_DATA_BITS); - (*sc->mii_writebits)(sc, ED_MII_IDLE, ED_MII_IDLE_BITS); -} - int ed_ifmedia_upd(struct ifnet *ifp) { |