diff options
| author | msaitoh <msaitoh@NetBSD.org> | 2018-04-12 08:03:55 +0000 |
|---|---|---|
| committer | msaitoh <msaitoh@NetBSD.org> | 2018-04-12 08:03:55 +0000 |
| commit | e159b5294335359fb3df17e2454a3c10ea2e5ebc (patch) | |
| tree | b2fb8d06c62787601e6a6246fd7fc2d2e9bef603 /sys/dev | |
| parent | fe1531b8351f92355810f60478046e348f694c52 (diff) | |
Read sc_if_flags after taking core lock. Same as if_wm.c rev. 1.418.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/pci/ixgbe/ixgbe.c | 5 | ||||
| -rw-r--r-- | sys/dev/pci/ixgbe/ixv.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/pci/ixgbe/ixgbe.c b/sys/dev/pci/ixgbe/ixgbe.c index 0f93b8663b7..ed8f82eb978 100644 --- a/sys/dev/pci/ixgbe/ixgbe.c +++ b/sys/dev/pci/ixgbe/ixgbe.c @@ -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 @@ ixgbe_ifflags_cb(struct ethercom *ec) { 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 --git a/sys/dev/pci/ixgbe/ixv.c b/sys/dev/pci/ixgbe/ixv.c index 2c45214fc3a..7845740035a 100644 --- a/sys/dev/pci/ixgbe/ixv.c +++ b/sys/dev/pci/ixgbe/ixv.c @@ -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 @@ ixv_ifflags_cb(struct ethercom *ec) { 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; |
