summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2001-06-30 16:34:59 +0000
committerthorpej <thorpej@NetBSD.org>2001-06-30 16:34:59 +0000
commitf1ea6f5be0e7d981a800bb76878f0f3aabfb2cf0 (patch)
tree9a4be236f598b439aae961636b84a87984f48798 /sys/dev
parent9da8fccf7b836a1bba6c93526fdf583d06d949ec (diff)
When we're done setting up the General Information Block, sync it.
Sync the NIC-maintained stats structure as appropriate, as well.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_ti.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/dev/pci/if_ti.c b/sys/dev/pci/if_ti.c
index a8003266f6b..2a20717c534 100644
--- a/sys/dev/pci/if_ti.c
+++ b/sys/dev/pci/if_ti.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ti.c,v 1.33 2001/06/30 15:39:51 thorpej Exp $ */
+/* $NetBSD: if_ti.c,v 1.34 2001/06/30 16:34:59 thorpej Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -1579,6 +1579,13 @@ static int ti_gibinit(sc)
TI_HOSTADDR(sc->ti_rdata->ti_info.ti_tx_considx_ptr) =
TI_CDTXCONSADDR(sc);
+ /*
+ * We're done frobbing the General Information Block. Sync
+ * it. Note we take care of the first stats sync here, as
+ * well.
+ */
+ TI_CDGIBSYNC(sc, BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
+
/* Set up tuneables */
if (ifp->if_mtu > (ETHERMTU + ETHER_HDR_LEN + ETHER_CRC_LEN) ||
(sc->ethercom.ec_capenable & ETHERCAP_VLAN_MTU))
@@ -2236,6 +2243,8 @@ static void ti_stats_update(sc)
ifp = &sc->ethercom.ec_if;
+ TI_CDSTATSSYNC(sc, BUS_DMASYNC_POSTREAD);
+
ifp->if_collisions +=
(sc->ti_rdata->ti_info.ti_stats.dot3StatsSingleCollisionFrames +
sc->ti_rdata->ti_info.ti_stats.dot3StatsMultipleCollisionFrames +
@@ -2243,7 +2252,7 @@ static void ti_stats_update(sc)
sc->ti_rdata->ti_info.ti_stats.dot3StatsLateCollisions) -
ifp->if_collisions;
- return;
+ TI_CDSTATSSYNC(sc, BUS_DMASYNC_PREREAD);
}
/*