summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/if_em.c
diff options
context:
space:
mode:
authorbrad <brad@openbsd.org>2005-07-02 23:10:11 +0000
committerbrad <brad@openbsd.org>2005-07-02 23:10:11 +0000
commita9f9fb6a0c5fc63723c2320410cb8c5bb288f355 (patch)
tree448fc6e149c4e82c49108469862a638b51e3b6f4 /sys/dev/pci/if_em.c
parentadd TLPHY_MEDIA_NO_10_T flag for DP4000 model (diff)
downloadwireguard-openbsd-a9f9fb6a0c5fc63723c2320410cb8c5bb288f355.tar.xz
wireguard-openbsd-a9f9fb6a0c5fc63723c2320410cb8c5bb288f355.zip
clear IFF_RUNNING & IFF_OACTIVE in foo_stop() before de-allocating resources.
Diffstat (limited to 'sys/dev/pci/if_em.c')
-rw-r--r--sys/dev/pci/if_em.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index fc830c275a8..7749ef1066f 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.59 2005/07/02 06:15:44 deraadt Exp $ */
+/* $OpenBSD: if_em.c,v 1.60 2005/07/02 23:10:11 brad Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include "bpfilter.h"
@@ -1439,12 +1439,13 @@ em_stop(void *arg)
em_reset_hw(&sc->hw);
timeout_del(&sc->timer_handle);
timeout_del(&sc->tx_fifo_timer_handle);
- em_free_transmit_structures(sc);
- em_free_receive_structures(sc);
/* Tell the stack that the interface is no longer active */
ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
+ em_free_transmit_structures(sc);
+ em_free_receive_structures(sc);
+
return;
}