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 ixgbe_setup_low_power_mode() calls ixgbe_s...
details: https://anonhg.NetBSD.org/src/rev/6e920a995a19
branches: trunk
changeset: 462266:6e920a995a19
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Tue Jul 30 08:44:28 2019 +0000
description:
ixgbe_setup_low_power_mode() calls ixgbe_stop() in it. ixgbe_detach() first
called ixgbe_stop() and then called ixgbe_setup_low_power_mode() which resulted
in calling ixgbe_stop() twice. Call only ixgbe_setup_low_power_mode() first to
remove extra ixgbe_stop() call.
diffstat:
sys/dev/pci/ixgbe/ixgbe.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diffs (36 lines):
diff -r 0ed25e579f7a -r 6e920a995a19 sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Tue Jul 30 08:38:03 2019 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Tue Jul 30 08:44:28 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.198 2019/07/26 04:08:39 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.199 2019/07/30 08:44:28 msaitoh Exp $ */
/******************************************************************************
@@ -3568,8 +3568,13 @@
return (EBUSY);
}
- /* Stop the interface. Callouts are stopped in it. */
- ixgbe_ifstop(adapter->ifp, 1);
+ /*
+ * Stop the interface. ixgbe_setup_low_power_mode() calls ixgbe_stop(),
+ * so it's not required to call ixgbe_stop() directly.
+ */
+ IXGBE_CORE_LOCK(adapter);
+ ixgbe_setup_low_power_mode(adapter);
+ IXGBE_CORE_UNLOCK(adapter);
#if NVLAN > 0
/* Make sure VLANs are not using driver */
if (!VLAN_ATTACHED(&adapter->osdep.ec))
@@ -3585,10 +3590,6 @@
pmf_device_deregister(dev);
ether_ifdetach(adapter->ifp);
- /* Stop the adapter */
- IXGBE_CORE_LOCK(adapter);
- ixgbe_setup_low_power_mode(adapter);
- IXGBE_CORE_UNLOCK(adapter);
ixgbe_free_softint(adapter);
Home |
Main Index |
Thread Index |
Old Index