summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_cas.c
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2008-08-30 07:39:13 +0000
committerBrad Smith <brad@cvs.openbsd.org>2008-08-30 07:39:13 +0000
commit3a662783b8de39cb5e545a3dff51e4110c0a3735 (patch)
tree4755e6cc4b593fae9fe38048471c32fdf8d461e9 /sys/dev/pci/if_cas.c
parentf69a5935c77501118988218bd5caf7a940fbed0c (diff)
Fix an issue initially reported by drahn@ with gem(4) where these
drivers can report 2-3x times the number of actual packets being transmitted by only incrementing the counter for descriptors with buffers being freed. ok kettenis@
Diffstat (limited to 'sys/dev/pci/if_cas.c')
-rw-r--r--sys/dev/pci/if_cas.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/if_cas.c b/sys/dev/pci/if_cas.c
index 35b09af3c41..cc37c7c4f54 100644
--- a/sys/dev/pci/if_cas.c
+++ b/sys/dev/pci/if_cas.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_cas.c,v 1.19 2008/05/31 22:49:03 kettenis Exp $ */
+/* $OpenBSD: if_cas.c,v 1.20 2008/08/30 07:39:12 brad Exp $ */
/*
*
@@ -1937,9 +1937,9 @@ cas_tint(struct cas_softc *sc, u_int32_t status)
bus_dmamap_unload(sc->sc_dmatag, sd->sd_map);
m_freem(sd->sd_mbuf);
sd->sd_mbuf = NULL;
+ ifp->if_opackets++;
}
sc->sc_tx_cnt--;
- ifp->if_opackets++;
if (++cons == CAS_NTXDESC)
cons = 0;
}