Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci wm(4) can enable IFEF_START_MPSAFE now.



details:   https://anonhg.NetBSD.org/src/rev/7af193d9b9c0
branches:  trunk
changeset: 346045:7af193d9b9c0
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Mon Jun 20 08:34:59 2016 +0000

description:
wm(4) can enable IFEF_START_MPSAFE now.

diffstat:

 sys/dev/pci/if_wm.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (44 lines):

diff -r d5de71ad8651 -r 7af193d9b9c0 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Mon Jun 20 08:30:58 2016 +0000
+++ b/sys/dev/pci/if_wm.c       Mon Jun 20 08:34:59 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.414 2016/06/14 17:09:20 knakahara Exp $    */
+/*     $NetBSD: if_wm.c,v 1.415 2016/06/20 08:34:59 knakahara Exp $    */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -85,7 +85,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.414 2016/06/14 17:09:20 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.415 2016/06/20 08:34:59 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -2407,6 +2407,7 @@
        strlcpy(ifp->if_xname, xname, IFNAMSIZ);
        ifp->if_softc = sc;
        ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
+       ifp->if_extflags = IFEF_START_MPSAFE;
        ifp->if_ioctl = wm_ioctl;
        if ((sc->sc_flags & WM_F_NEWQUEUE) != 0) {
                ifp->if_start = wm_nq_start;
@@ -6080,6 +6081,8 @@
        struct wm_softc *sc = ifp->if_softc;
        struct wm_txqueue *txq = &sc->sc_queue[0].wmq_txq;
 
+       KASSERT(ifp->if_extflags & IFEF_START_MPSAFE);
+
        mutex_enter(txq->txq_lock);
        if (!sc->sc_stopping)
                wm_start_locked(ifp);
@@ -6597,6 +6600,8 @@
        struct wm_softc *sc = ifp->if_softc;
        struct wm_txqueue *txq = &sc->sc_queue[0].wmq_txq;
 
+       KASSERT(ifp->if_extflags & IFEF_START_MPSAFE);
+
        mutex_enter(txq->txq_lock);
        if (!sc->sc_stopping)
                wm_nq_start_locked(ifp);



Home | Main Index | Thread Index | Old Index