Module Name: src
Committed By: knakahara
Date: Wed May 11 03:46:06 UTC 2016
Modified Files:
src/sys/dev/pci: if_wm.c
Log Message:
Interrupt handlers read wm_rxqueue or wm_txqueue, so they must be freed after
disestablishing interrupt handlers.
To generate a diff of this commit:
cvs rdiff -u -r1.395 -r1.396 src/sys/dev/pci/if_wm.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.395 src/sys/dev/pci/if_wm.c:1.396
--- src/sys/dev/pci/if_wm.c:1.395 Wed May 11 02:23:50 2016
+++ src/sys/dev/pci/if_wm.c Wed May 11 03:46:06 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.395 2016/05/11 02:23:50 msaitoh Exp $ */
+/* $NetBSD: if_wm.c,v 1.396 2016/05/11 03:46:06 knakahara Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -83,7 +83,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.395 2016/05/11 02:23:50 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.396 2016/05/11 03:46:06 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -2616,8 +2616,6 @@ wm_detach(device_t self, int flags __unu
}
/* Must unlock here */
- wm_free_txrx_queues(sc);
-
/* Disestablish the interrupt handler */
for (i = 0; i < sc->sc_nintrs; i++) {
if (sc->sc_ihs[i] != NULL) {
@@ -2627,6 +2625,8 @@ wm_detach(device_t self, int flags __unu
}
pci_intr_release(sc->sc_pc, sc->sc_intrs, sc->sc_nintrs);
+ wm_free_txrx_queues(sc);
+
/* Unmap the registers */
if (sc->sc_ss) {
bus_space_unmap(sc->sc_st, sc->sc_sh, sc->sc_ss);