summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_xl.c
diff options
context:
space:
mode:
authorsilby <silby@FreeBSD.org>2002-09-22 04:48:30 +0000
committersilby <silby@FreeBSD.org>2002-09-22 04:48:30 +0000
commit5a1846c76280086d19584a7c75aa63f221f90994 (patch)
tree0c0335ba82fb8b65a7620edc99463905c06dd275 /sys/pci/if_xl.c
parente8f9ac26c88b71174cb2ec87c856bbf2da81f7c2 (diff)
downloadFreeBSD-src-5a1846c76280086d19584a7c75aa63f221f90994.zip
FreeBSD-src-5a1846c76280086d19584a7c75aa63f221f90994.tar.gz
Remove all DELAY(1) calls around MII operations in the XL driver.
According to the MII specification, the delay produced by our reads alone are sufficient for correct operation. This reduces the time mii_tick takes from 10ms to ~1ms here. That's still a lot, but much better than before. Submitted by: Harti Brandt <brandt@fokus.gmd.de> MFC after: 3 weeks
Diffstat (limited to 'sys/pci/if_xl.c')
-rw-r--r--sys/pci/if_xl.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c
index b86313b..2c767e3 100644
--- a/sys/pci/if_xl.c
+++ b/sys/pci/if_xl.c
@@ -370,9 +370,7 @@ xl_mii_sync(sc)
for (i = 0; i < 32; i++) {
MII_SET(XL_MII_CLK);
- DELAY(1);
MII_CLR(XL_MII_CLK);
- DELAY(1);
}
return;
@@ -398,9 +396,7 @@ xl_mii_send(sc, bits, cnt)
} else {
MII_CLR(XL_MII_DATA);
}
- DELAY(1);
MII_CLR(XL_MII_CLK);
- DELAY(1);
MII_SET(XL_MII_CLK);
}
}
@@ -450,18 +446,14 @@ xl_mii_readreg(sc, frame)
/* Idle bit */
MII_CLR((XL_MII_CLK|XL_MII_DATA));
- DELAY(1);
MII_SET(XL_MII_CLK);
- DELAY(1);
/* Turn off xmit. */
MII_CLR(XL_MII_DIR);
/* Check for ack */
MII_CLR(XL_MII_CLK);
- DELAY(1);
MII_SET(XL_MII_CLK);
- DELAY(1);
ack = CSR_READ_2(sc, XL_W4_PHY_MGMT) & XL_MII_DATA;
/*
@@ -471,31 +463,24 @@ xl_mii_readreg(sc, frame)
if (ack) {
for(i = 0; i < 16; i++) {
MII_CLR(XL_MII_CLK);
- DELAY(1);
MII_SET(XL_MII_CLK);
- DELAY(1);
}
goto fail;
}
for (i = 0x8000; i; i >>= 1) {
MII_CLR(XL_MII_CLK);
- DELAY(1);
if (!ack) {
if (CSR_READ_2(sc, XL_W4_PHY_MGMT) & XL_MII_DATA)
frame->mii_data |= i;
- DELAY(1);
}
MII_SET(XL_MII_CLK);
- DELAY(1);
}
fail:
MII_CLR(XL_MII_CLK);
- DELAY(1);
MII_SET(XL_MII_CLK);
- DELAY(1);
XL_UNLOCK(sc);
@@ -544,9 +529,7 @@ xl_mii_writereg(sc, frame)
/* Idle bit. */
MII_SET(XL_MII_CLK);
- DELAY(1);
MII_CLR(XL_MII_CLK);
- DELAY(1);
/*
* Turn off xmit.
OpenPOWER on IntegriCloud