summaryrefslogtreecommitdiffstats
path: root/sys/dev/ed
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2005-09-08 17:17:13 +0000
committerimp <imp@FreeBSD.org>2005-09-08 17:17:13 +0000
commitef20387462249d9fa96d969e6271e6bff631454a (patch)
treeeeb200535e2a0c167fc0f003e8dca59839d0e4b9 /sys/dev/ed
parent1ca9efc182d9eab0c0e4ef93735db75902f2a464 (diff)
downloadFreeBSD-src-ef20387462249d9fa96d969e6271e6bff631454a.zip
FreeBSD-src-ef20387462249d9fa96d969e6271e6bff631454a.tar.gz
The ed driver lock is already held in the mii frobbing routines. Remove
locking from these routines.
Diffstat (limited to 'sys/dev/ed')
-rw-r--r--sys/dev/ed/if_ed.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index d848fe3..3a34488 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/if_ed.c
@@ -1645,20 +1645,14 @@ ed_miibus_readreg(device_t dev, int phy, int reg)
int failed, val;
sc = device_get_softc(dev);
-
- /* XXX is this right? */
- ED_LOCK(sc);
(*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);
- /* XXX is this right? */
- ED_UNLOCK(sc);
return (failed ? 0 : val);
}
@@ -1668,9 +1662,6 @@ ed_miibus_writereg(device_t dev, int phy, int reg, int data)
struct ed_softc *sc;
sc = device_get_softc(dev);
-
- /* XXX is this right? */
- ED_LOCK(sc);
(*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);
@@ -1679,8 +1670,6 @@ ed_miibus_writereg(device_t dev, int phy, int reg, int data)
(*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);
- /* XXX is this right? */
- ED_UNLOCK(sc);
}
int
OpenPOWER on IntegriCloud