summaryrefslogtreecommitdiffstats
path: root/sys/dev/nge
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-05-04 11:15:33 +0000
committerphk <phk@FreeBSD.org>2002-05-04 11:15:33 +0000
commitd0e80b094611464a1ed34828f9004367e7f190d6 (patch)
tree86b3c5131d00656a425f0bb4dca492f88445346b /sys/dev/nge
parent18774e5c4c4ce302dc5ad9052721993a56ca213e (diff)
downloadFreeBSD-src-d0e80b094611464a1ed34828f9004367e7f190d6.zip
FreeBSD-src-d0e80b094611464a1ed34828f9004367e7f190d6.tar.gz
Do not call nge_tick() if we get an PHY interrupt, nge_tick() calls
mii_tick() which should only be called once per second. Our current MII/PHY state-engine is not able to deal with PHY interrupts as far as I can tell, and most net drivers don't seem to use the link/status change call-back mechanism. It seems that MII/PHY was orphaned before it grew up.
Diffstat (limited to 'sys/dev/nge')
-rw-r--r--sys/dev/nge/if_nge.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/dev/nge/if_nge.c b/sys/dev/nge/if_nge.c
index 6843ae4..be395ee 100644
--- a/sys/dev/nge/if_nge.c
+++ b/sys/dev/nge/if_nge.c
@@ -1434,10 +1434,9 @@ static void nge_tick(xsc)
sc->nge_unit);
if (ifp->if_snd.ifq_head != NULL)
nge_start(ifp);
- } else
- sc->nge_stat_ch = timeout(nge_tick, sc, hz);
+ }
}
-
+ sc->nge_stat_ch = timeout(nge_tick, sc, hz);
splx(s);
@@ -1493,10 +1492,17 @@ static void nge_intr(arg)
nge_init(sc);
}
+#if 0
+ /*
+ * XXX: nge_tick() is not ready to be called this way
+ * it screws up the aneg timeout because mii_tick() is
+ * only to be called once per second.
+ */
if (status & NGE_IMR_PHY_INTR) {
sc->nge_link = 0;
nge_tick(sc);
}
+#endif
}
/* Re-enable interrupts. */
@@ -1764,6 +1770,8 @@ static void nge_init(xsc)
NGE_CLRBIT(sc, NGE_RX_CFG, NGE_RXCFG_RX_FDX);
}
+ nge_tick(sc);
+
/*
* Enable the delivery of PHY interrupts based on
* link/speed/duplex status changes. Also enable the
OpenPOWER on IntegriCloud