Module Name: src Committed By: msaitoh Date: Tue Jul 30 08:44:28 UTC 2019
Modified Files: src/sys/dev/pci/ixgbe: ixgbe.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.198 -r1.199 src/sys/dev/pci/ixgbe/ixgbe.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/pci/ixgbe/ixgbe.c diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.198 src/sys/dev/pci/ixgbe/ixgbe.c:1.199 --- src/sys/dev/pci/ixgbe/ixgbe.c:1.198 Fri Jul 26 04:08:39 2019 +++ src/sys/dev/pci/ixgbe/ixgbe.c Tue Jul 30 08:44:28 2019 @@ -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 @@ ixgbe_detach(device_t dev, int flags) 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 @@ ixgbe_detach(device_t dev, int flags) 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);