summaryrefslogtreecommitdiffstats
path: root/sys/pci/if_dc.c
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1999-12-07 19:18:41 +0000
committerwpaul <wpaul@FreeBSD.org>1999-12-07 19:18:41 +0000
commitedabac1a9d64258b28ef81e140886c4a726a71c1 (patch)
tree881b40ec6baa32d87356b4e7ccaf14f8d9907476 /sys/pci/if_dc.c
parent4b20bc43df2d402af8bbff9334c9ac0e79c3459d (diff)
downloadFreeBSD-src-edabac1a9d64258b28ef81e140886c4a726a71c1.zip
FreeBSD-src-edabac1a9d64258b28ef81e140886c4a726a71c1.tar.gz
Tweak the DC_REDUCED_MII_POLL code in dc_mii_tick() for the DC_IS_INTEL()
case. The idea is to reduce how often we call mii_tick(), however currently it may not be called often enough, which prevents autonegotiation from being driven correctly. This should improve the chances of successfully autonegotiating media settings on non-MII 21143 NICs. (Still waiting for confirmation from some testers, but the code is clearly wrong in any case.)
Diffstat (limited to 'sys/pci/if_dc.c')
-rw-r--r--sys/pci/if_dc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c
index 25491e0..a01fa73 100644
--- a/sys/pci/if_dc.c
+++ b/sys/pci/if_dc.c
@@ -2123,10 +2123,10 @@ static void dc_tick(xsc)
if (sc->dc_flags & DC_REDUCED_MII_POLL) {
r = CSR_READ_4(sc, DC_ISR);
if (DC_IS_INTEL(sc)) {
- if (r & DC_ISR_LINKFAIL) {
+ if (r & DC_ISR_LINKFAIL)
sc->dc_link = 0;
+ if (sc->dc_link == 0)
mii_tick(mii);
- }
} else {
if ((r & DC_ISR_RX_STATE) == DC_RXSTATE_WAIT &&
sc->dc_cdata.dc_tx_prod == 0)
OpenPOWER on IntegriCloud