Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci GENERIC kernel (disabled NET_MPSAFE kernel) also...



details:   https://anonhg.NetBSD.org/src/rev/85c8176d7d2c
branches:  trunk
changeset: 815519:85c8176d7d2c
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Mon May 23 03:30:40 2016 +0000

description:
GENERIC kernel (disabled NET_MPSAFE kernel) also needs txq_lock to avoid race
between tx processing and tx interrupt handler.

diffstat:

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

diffs (31 lines):

diff -r d863eba9176c -r 85c8176d7d2c sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Mon May 23 01:45:41 2016 +0000
+++ b/sys/dev/pci/if_wm.c       Mon May 23 03:30:40 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.407 2016/05/20 08:17:14 knakahara Exp $    */
+/*     $NetBSD: if_wm.c,v 1.408 2016/05/23 03:30:40 knakahara Exp $    */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -84,7 +84,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.407 2016/05/20 08:17:14 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.408 2016/05/23 03:30:40 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -5557,11 +5557,8 @@
        for (i = 0; i < sc->sc_nqueues; i++) {
                struct wm_txqueue *txq = &sc->sc_queue[i].wmq_txq;
                txq->txq_sc = sc;
-#ifdef WM_MPSAFE
                txq->txq_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NET);
-#else
-               txq->txq_lock = NULL;
-#endif
+
                error = wm_alloc_tx_descs(sc, txq);
                if (error)
                        break;



Home | Main Index | Thread Index | Old Index