summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2014-08-26 11:01:23 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2014-08-26 11:01:23 +0000
commit4bb94680579da67df57c054f9cb0800401398a52 (patch)
tree603c27d72ef24687b841fd06ef4eb78f610a0172 /sys/dev
parent491dd834b62ed9d1031a7de4797d20665dcdb454 (diff)
Revert part of the if_rxr diff that incorrectly moves RX ring tail
index update code from the buf_get success path to the do it all the time code path. Tested by millert; ok dlg, deraadt
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_bge.c8
-rw-r--r--sys/dev/pci/if_em.c6
-rw-r--r--sys/dev/pci/if_ix.c6
3 files changed, 9 insertions, 11 deletions
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index 2f62a6cefda..8ec4a8b1f42 100644
--- a/sys/dev/pci/if_bge.c
+++ b/sys/dev/pci/if_bge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bge.c,v 1.359 2014/08/21 14:30:21 brad Exp $ */
+/* $OpenBSD: if_bge.c,v 1.360 2014/08/26 11:01:21 mikeb Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -1301,12 +1301,11 @@ bge_fill_rx_ring_std(struct bge_softc *sc)
if (bge_newbuf(sc, i) != 0)
break;
+ sc->bge_std = i;
post = 1;
}
if_rxr_put(&sc->bge_std_ring, slots);
- sc->bge_std = i;
-
if (post)
bge_writembx(sc, BGE_MBX_RX_STD_PROD_LO, sc->bge_std);
@@ -1406,12 +1405,11 @@ bge_fill_rx_ring_jumbo(struct bge_softc *sc)
if (bge_newbuf_jumbo(sc, i) != 0)
break;
+ sc->bge_jumbo = i;
post = 1;
}
if_rxr_put(&sc->bge_jumbo_ring, slots);
- sc->bge_jumbo = i;
-
if (post)
bge_writembx(sc, BGE_MBX_RX_JUMBO_PROD_LO, sc->bge_jumbo);
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index d6d7e8eaecc..887f3480ccc 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.287 2014/07/13 23:10:23 deraadt Exp $ */
+/* $OpenBSD: if_em.c,v 1.288 2014/08/26 11:01:21 mikeb Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -2817,17 +2817,17 @@ em_rxfill(struct em_softc *sc)
i = sc->last_rx_desc_filled;
for (slots = if_rxr_get(&sc->rx_ring, sc->num_rx_desc);
- slots > 0; slots--) {
+ slots > 0; slots--) {
if (++i == sc->num_rx_desc)
i = 0;
if (em_get_buf(sc, i) != 0)
break;
+ sc->last_rx_desc_filled = i;
post = 1;
}
- sc->last_rx_desc_filled = i;
if_rxr_put(&sc->rx_ring, slots);
return (post);
diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c
index e55b0452693..855e82aa75f 100644
--- a/sys/dev/pci/if_ix.c
+++ b/sys/dev/pci/if_ix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ix.c,v 1.98 2014/08/25 14:26:25 mikeb Exp $ */
+/* $OpenBSD: if_ix.c,v 1.99 2014/08/26 11:01:22 mikeb Exp $ */
/******************************************************************************
@@ -2599,11 +2599,11 @@ ixgbe_rxfill(struct rx_ring *rxr)
if (ixgbe_get_buf(rxr, i) != 0)
break;
+ rxr->last_desc_filled = i;
post = 1;
}
- if_rxr_put(&rxr->rx_ring, slots);
- rxr->last_desc_filled = i;
+ if_rxr_put(&rxr->rx_ring, slots);
return (post);
}