summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/if_em.c
diff options
context:
space:
mode:
authormikeb <mikeb@openbsd.org>2014-08-26 11:01:21 +0000
committermikeb <mikeb@openbsd.org>2014-08-26 11:01:21 +0000
commit32e893b26152ffe97c074b1ca792ee9ccd4cf52c (patch)
tree3cffbd56ad939f393b36cdbdd103137556f2e22c /sys/dev/pci/if_em.c
parentBase system special services have no flags, so move the test for them (diff)
downloadwireguard-openbsd-32e893b26152ffe97c074b1ca792ee9ccd4cf52c.tar.xz
wireguard-openbsd-32e893b26152ffe97c074b1ca792ee9ccd4cf52c.zip
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/pci/if_em.c')
-rw-r--r--sys/dev/pci/if_em.c6
1 files changed, 3 insertions, 3 deletions
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);