diff options
author | 2011-06-22 21:04:31 +0000 | |
---|---|---|
committer | 2011-06-22 21:04:31 +0000 | |
commit | 1611dc08a40fa8eaf641776b5b423aac39ff6c35 (patch) | |
tree | 457f794d1f1d3a53d6a8292aab4033889d3474d8 | |
parent | kill a few more casts that aren't helpful. ok krw miod (diff) | |
download | wireguard-openbsd-1611dc08a40fa8eaf641776b5b423aac39ff6c35.tar.xz wireguard-openbsd-1611dc08a40fa8eaf641776b5b423aac39ff6c35.zip |
reset the tx_count on UP, since it may have been advanced from non-zero
by a previous use
ok claudio
-rw-r--r-- | sys/dev/pci/if_myx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/if_myx.c b/sys/dev/pci/if_myx.c index 05a4de86c42..206a8a51e95 100644 --- a/sys/dev/pci/if_myx.c +++ b/sys/dev/pci/if_myx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_myx.c,v 1.25 2011/06/22 10:34:15 dlg Exp $ */ +/* $OpenBSD: if_myx.c,v 1.26 2011/06/22 21:04:31 deraadt Exp $ */ /* * Copyright (c) 2007 Reyk Floeter <reyk@openbsd.org> @@ -978,6 +978,7 @@ myx_up(struct myx_softc *sc) sc->sc_tx_ring_count = r / sizeof(struct myx_tx_desc); sc->sc_tx_free = sc->sc_tx_ring_count - 1; sc->sc_tx_nsegs = min(16, sc->sc_tx_ring_count / 4); /* magic */ + sc->sc_tx_count = 0; IFQ_SET_MAXLEN(&ifp->if_snd, sc->sc_tx_ring_count - 1); IFQ_SET_READY(&ifp->if_snd); |