Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci make bnx_wk (used to trigger bnx_alloc_pkts()) p...



details:   https://anonhg.NetBSD.org/src/rev/e60881f9a5d4
branches:  trunk
changeset: 935965:e60881f9a5d4
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Tue Jul 14 15:37:40 2020 +0000

description:
make bnx_wk (used to trigger bnx_alloc_pkts()) part of softc instead
of using a static variable, so it's independant for each adapter

diffstat:

 sys/dev/pci/if_bnx.c    |  7 +++----
 sys/dev/pci/if_bnxvar.h |  3 ++-
 2 files changed, 5 insertions(+), 5 deletions(-)

diffs (52 lines):

diff -r a6f35a1dd674 -r e60881f9a5d4 sys/dev/pci/if_bnx.c
--- a/sys/dev/pci/if_bnx.c      Tue Jul 14 12:15:16 2020 +0000
+++ b/sys/dev/pci/if_bnx.c      Tue Jul 14 15:37:40 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bnx.c,v 1.98 2020/07/14 12:15:16 jdolecek Exp $     */
+/*     $NetBSD: if_bnx.c,v 1.99 2020/07/14 15:37:40 jdolecek Exp $     */
 /*     $OpenBSD: if_bnx.c,v 1.101 2013/03/28 17:21:44 brad Exp $       */
 
 /*-
@@ -35,7 +35,7 @@
 #if 0
 __FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.3 2006/04/13 14:12:26 ru Exp $");
 #endif
-__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.98 2020/07/14 12:15:16 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bnx.c,v 1.99 2020/07/14 15:37:40 jdolecek Exp $");
 
 /*
  * The following controllers are supported by this driver:
@@ -5118,7 +5118,6 @@
 #endif
        uint32_t                addr, prod_bseq;
        int                     i, error;
-       static struct work      bnx_wk; /* Dummy work. Statically allocated. */
        bool                    remap = true;
 
        mutex_enter(&sc->tx_pkt_mtx);
@@ -5131,7 +5130,7 @@
 
                if (sc->tx_pkt_count <= TOTAL_TX_BD &&
                    !ISSET(sc->bnx_flags, BNX_ALLOC_PKTS_FLAG)) {
-                       workqueue_enqueue(sc->bnx_wq, &bnx_wk, NULL);
+                       workqueue_enqueue(sc->bnx_wq, &sc->bnx_wk, NULL);
                        SET(sc->bnx_flags, BNX_ALLOC_PKTS_FLAG);
                }
 
diff -r a6f35a1dd674 -r e60881f9a5d4 sys/dev/pci/if_bnxvar.h
--- a/sys/dev/pci/if_bnxvar.h   Tue Jul 14 12:15:16 2020 +0000
+++ b/sys/dev/pci/if_bnxvar.h   Tue Jul 14 15:37:40 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bnxvar.h,v 1.13 2020/07/12 19:05:32 jdolecek Exp $  */
+/*     $NetBSD: if_bnxvar.h,v 1.14 2020/07/14 15:37:40 jdolecek Exp $  */
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -129,6 +129,7 @@
 
        /* packet allocation workqueue */
        struct workqueue        *bnx_wq;
+       struct work             bnx_wk;
 
        /* ASIC Chip ID. */
        uint32_t                bnx_chipid;



Home | Main Index | Thread Index | Old Index