Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci/ixgbe On ENETRESET case, not continue and quit t...
details: https://anonhg.NetBSD.org/src/rev/86ef5b896acd
branches: trunk
changeset: 962205:86ef5b896acd
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Thu Jul 04 09:02:24 2019 +0000
description:
On ENETRESET case, not continue and quit the ifflags_cb() function because
if_init() will do the same thing.
diffstat:
sys/dev/pci/ixgbe/ixgbe.c | 14 ++++++++------
sys/dev/pci/ixgbe/ixv.c | 13 ++++++++-----
2 files changed, 16 insertions(+), 11 deletions(-)
diffs (82 lines):
diff -r 28ceedbafb67 -r 86ef5b896acd sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Thu Jul 04 08:56:35 2019 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Thu Jul 04 09:02:24 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.191 2019/07/02 08:38:48 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.192 2019/07/04 09:02:24 msaitoh Exp $ */
/******************************************************************************
@@ -6137,7 +6137,7 @@
{
struct ifnet *ifp = &ec->ec_if;
struct adapter *adapter = ifp->if_softc;
- int change, rc = 0;
+ int change, rv = 0;
IXGBE_CORE_LOCK(adapter);
@@ -6145,17 +6145,19 @@
if (change != 0)
adapter->if_flags = ifp->if_flags;
- if ((change & ~(IFF_CANTCHANGE | IFF_DEBUG)) != 0)
- rc = ENETRESET;
- else if ((change & IFF_PROMISC) != 0)
+ if ((change & ~(IFF_CANTCHANGE | IFF_DEBUG)) != 0) {
+ rv = ENETRESET;
+ goto out;
+ } else if ((change & IFF_PROMISC) != 0)
ixgbe_set_promisc(adapter);
/* Set up VLAN support and filter */
ixgbe_setup_vlan_hw_support(adapter);
+out:
IXGBE_CORE_UNLOCK(adapter);
- return rc;
+ return rv;
}
/************************************************************************
diff -r 28ceedbafb67 -r 86ef5b896acd sys/dev/pci/ixgbe/ixv.c
--- a/sys/dev/pci/ixgbe/ixv.c Thu Jul 04 08:56:35 2019 +0000
+++ b/sys/dev/pci/ixgbe/ixv.c Thu Jul 04 09:02:24 2019 +0000
@@ -1,4 +1,4 @@
-/*$NetBSD: ixv.c,v 1.117 2019/07/02 07:20:07 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.118 2019/07/04 09:02:24 msaitoh Exp $*/
/******************************************************************************
@@ -2730,7 +2730,7 @@
{
struct ifnet *ifp = &ec->ec_if;
struct adapter *adapter = ifp->if_softc;
- int change, rc = 0;
+ int change, rv = 0;
IXGBE_CORE_LOCK(adapter);
@@ -2738,15 +2738,18 @@
if (change != 0)
adapter->if_flags = ifp->if_flags;
- if ((change & ~(IFF_CANTCHANGE | IFF_DEBUG)) != 0)
- rc = ENETRESET;
+ if ((change & ~(IFF_CANTCHANGE | IFF_DEBUG)) != 0) {
+ rv = ENETRESET;
+ goto out;
+ }
/* Set up VLAN support and filter */
ixv_setup_vlan_support(adapter);
+out:
IXGBE_CORE_UNLOCK(adapter);
- return rc;
+ return rv;
}
Home |
Main Index |
Thread Index |
Old Index