summaryrefslogtreecommitdiffstats
path: root/sys/dev/ic/hme.c
diff options
context:
space:
mode:
authorjason <jason@openbsd.org>2002-09-28 02:04:44 +0000
committerjason <jason@openbsd.org>2002-09-28 02:04:44 +0000
commit13f3fb982edb3d9901fe1702f2f49b9ddb16f727 (patch)
treefa510465ddecac81d49420c8339708b006abea1e /sys/dev/ic/hme.c
parentdoc that undo is a teeny bit different (diff)
downloadwireguard-openbsd-13f3fb982edb3d9901fe1702f2f49b9ddb16f727.tar.xz
wireguard-openbsd-13f3fb982edb3d9901fe1702f2f49b9ddb16f727.zip
- disable if_timer handling (there's a bug which causes this not to get
reset, causing watchdog timeouts). The interfaces work fine, but the timer doesn't get reset correctly. - make IFF_SIMPLEX only set iff the media is IFM_FDX (prevents ip6 from seeing it's packets and thinking another machine with the same mac is on the wire when running half-duplex); from NetBSD.
Diffstat (limited to 'sys/dev/ic/hme.c')
-rw-r--r--sys/dev/ic/hme.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/ic/hme.c b/sys/dev/ic/hme.c
index eb3c7149417..e055d2c14de 100644
--- a/sys/dev/ic/hme.c
+++ b/sys/dev/ic/hme.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hme.c,v 1.19 2002/08/07 03:42:14 jason Exp $ */
+/* $OpenBSD: hme.c,v 1.20 2002/09/28 02:04:44 jason Exp $ */
/* $NetBSD: hme.c,v 1.21 2001/07/07 15:59:37 thorpej Exp $ */
/*-
@@ -662,7 +662,7 @@ hme_start(ifp)
if (cnt != 0) {
sc->sc_tx_prod = bix;
- ifp->if_timer = 5;
+ ifp->if_timer = 0;
}
}
@@ -971,10 +971,13 @@ hme_mii_statchg(dev)
/* Set the MAC Full Duplex bit appropriately */
v = bus_space_read_4(t, mac, HME_MACI_TXCFG);
- if ((IFM_OPTIONS(sc->sc_mii.mii_media_active) & IFM_FDX) != 0)
+ if ((IFM_OPTIONS(sc->sc_mii.mii_media_active) & IFM_FDX) != 0) {
v |= HME_MAC_TXCFG_FULLDPLX;
- else
+ sc->sc_arpcom.ac_if.if_flags |= IFF_SIMPLEX;
+ } else {
v &= ~HME_MAC_TXCFG_FULLDPLX;
+ sc->sc_arpcom.ac_if.if_flags &= ~IFF_SIMPLEX;
+ }
bus_space_write_4(t, mac, HME_MACI_TXCFG, v);
/* If an external transceiver is selected, enable its MII drivers */