Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Interrupt handlers read wm_rxqueue or wm_txqueue...



details:   https://anonhg.NetBSD.org/src/rev/b4cff26c5dc9
branches:  trunk
changeset: 815308:b4cff26c5dc9
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Wed May 11 03:46:06 2016 +0000

description:
Interrupt handlers read wm_rxqueue or wm_txqueue, so they must be freed after
disestablishing interrupt handlers.

diffstat:

 sys/dev/pci/if_wm.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 860cf9872a9c -r b4cff26c5dc9 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Wed May 11 03:17:22 2016 +0000
+++ b/sys/dev/pci/if_wm.c       Wed May 11 03:46:06 2016 +0000
@@ -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 @@
        }
        /* 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 @@
        }
        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);



Home | Main Index | Thread Index | Old Index