Source-Changes-HG archive

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

src: Read sc_if_flags after taking core lock. Same as if_wm.c re...



details:   https://anonhg.NetBSD.org/src/rev/672d1b5f02d1
branches:  trunk
changeset: 318094:672d1b5f02d1
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Apr 12 08:03:55 2018 +0000
description:
Read sc_if_flags after taking core lock. Same as if_wm.c rev. 1.418.

diffstat:

 sys/dev/pci/ixgbe/ixgbe.c |  5 +++--
 sys/dev/pci/ixgbe/ixv.c   |  5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diffs (44 lines):

diff -r a1697207c0d4 -r 672d1b5f02d1 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Thu Apr 12 07:45:29 2018 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Thu Apr 12 08:03:55 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.145 2018/04/04 08:59:22 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.146 2018/04/12 08:03:55 msaitoh Exp $ */
 
 /******************************************************************************
 
@@ -5760,10 +5760,11 @@
 {
        struct ifnet *ifp = &ec->ec_if;
        struct adapter *adapter = ifp->if_softc;
-       int change = ifp->if_flags ^ adapter->if_flags, rc = 0;
+       int change, rc = 0;
 
        IXGBE_CORE_LOCK(adapter);
 
+       change = ifp->if_flags ^ adapter->if_flags;
        if (change != 0)
                adapter->if_flags = ifp->if_flags;
 
diff -r a1697207c0d4 -r 672d1b5f02d1 sys/dev/pci/ixgbe/ixv.c
--- a/sys/dev/pci/ixgbe/ixv.c   Thu Apr 12 07:45:29 2018 +0000
+++ b/sys/dev/pci/ixgbe/ixv.c   Thu Apr 12 08:03:55 2018 +0000
@@ -1,4 +1,4 @@
-/*$NetBSD: ixv.c,v 1.92 2018/04/04 08:59:22 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.93 2018/04/12 08:03:55 msaitoh Exp $*/
 
 /******************************************************************************
 
@@ -2691,10 +2691,11 @@
 {
        struct ifnet *ifp = &ec->ec_if;
        struct adapter *adapter = ifp->if_softc;
-       int change = ifp->if_flags ^ adapter->if_flags, rc = 0;
+       int change, rc = 0;
 
        IXGBE_CORE_LOCK(adapter);
 
+       change = ifp->if_flags ^ adapter->if_flags;
        if (change != 0)
                adapter->if_flags = ifp->if_flags;
 



Home | Main Index | Thread Index | Old Index