Module Name:    src
Committed By:   msaitoh
Date:           Mon Aug 31 14:12:50 UTC 2020

Modified Files:
        src/sys/dev/pci/ixgbe: ixgbe.c ixgbe_common.c ixv.c

Log Message:
 Rename ix{gbe,v}_stop() with ix{gbe,v}_stop_locked(). No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.251 -r1.252 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/pci/ixgbe/ixgbe_common.c
cvs rdiff -u -r1.152 -r1.153 src/sys/dev/pci/ixgbe/ixv.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.251 src/sys/dev/pci/ixgbe/ixgbe.c:1.252
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.251	Mon Aug 31 11:19:54 2020
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Mon Aug 31 14:12:50 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.251 2020/08/31 11:19:54 msaitoh Exp $ */
+/* $NetBSD: ixgbe.c,v 1.252 2020/08/31 14:12:50 msaitoh Exp $ */
 
 /******************************************************************************
 
@@ -173,7 +173,7 @@ static int	ixgbe_ioctl(struct ifnet *, u
 static int	ixgbe_init(struct ifnet *);
 static void	ixgbe_init_locked(struct adapter *);
 static void	ixgbe_ifstop(struct ifnet *, int);
-static void	ixgbe_stop(void *);
+static void	ixgbe_stop_locked(void *);
 static void	ixgbe_init_device_features(struct adapter *);
 static void	ixgbe_check_fan_failure(struct adapter *, u32, bool);
 static void	ixgbe_add_media_types(struct adapter *);
@@ -1229,7 +1229,7 @@ ixgbe_attach(device_t parent, device_t d
 
 	/* For Netmap */
 	adapter->init_locked = ixgbe_init_locked;
-	adapter->stop_locked = ixgbe_stop;
+	adapter->stop_locked = ixgbe_stop_locked;
 
 	if (adapter->feat_en & IXGBE_FEATURE_NETMAP)
 		ixgbe_netmap_attach(adapter);
@@ -3599,8 +3599,9 @@ ixgbe_detach(device_t dev, int flags)
 #endif
 
 	/*
-	 * Stop the interface. ixgbe_setup_low_power_mode() calls ixgbe_stop(),
-	 * so it's not required to call ixgbe_stop() directly.
+	 * Stop the interface. ixgbe_setup_low_power_mode() calls
+	 * ixgbe_stop_locked(), so it's not required to call ixgbe_stop_locked()
+	 * directly.
 	 */
 	IXGBE_CORE_LOCK(adapter);
 	ixgbe_setup_low_power_mode(adapter);
@@ -3781,7 +3782,7 @@ ixgbe_setup_low_power_mode(struct adapte
 	    hw->phy.ops.enter_lplu) {
 		/* X550EM baseT adapters need a special LPLU flow */
 		hw->phy.reset_disable = true;
-		ixgbe_stop(adapter);
+		ixgbe_stop_locked(adapter);
 		error = hw->phy.ops.enter_lplu(hw);
 		if (error)
 			device_printf(dev,
@@ -3789,7 +3790,7 @@ ixgbe_setup_low_power_mode(struct adapte
 		hw->phy.reset_disable = false;
 	} else {
 		/* Just stop for other adapters */
-		ixgbe_stop(adapter);
+		ixgbe_stop_locked(adapter);
 	}
 
 	if (!hw->wol_enabled) {
@@ -3976,7 +3977,7 @@ ixgbe_init_locked(struct adapter *adapte
 	/* Prepare transmit descriptors and buffers */
 	if (ixgbe_setup_transmit_structures(adapter)) {
 		device_printf(dev, "Could not setup transmit structures\n");
-		ixgbe_stop(adapter);
+		ixgbe_stop_locked(adapter);
 		return;
 	}
 
@@ -3998,7 +3999,7 @@ ixgbe_init_locked(struct adapter *adapte
 	/* Prepare receive descriptors and buffers */
 	if (ixgbe_setup_receive_structures(adapter)) {
 		device_printf(dev, "Could not setup receive structures\n");
-		ixgbe_stop(adapter);
+		ixgbe_stop_locked(adapter);
 		return;
 	}
 
@@ -4647,7 +4648,7 @@ ixgbe_handle_recovery_mode_timer(struct 
 			device_printf(adapter->dev, "Firmware recovery mode detected. Limiting functionality. Refer to the Intel(R) Ethernet Adapters and Devices User Guide for details on firmware recovery mode.\n");
 
 			if (hw->adapter_stopped == FALSE)
-				ixgbe_stop(adapter);
+				ixgbe_stop_locked(adapter);
 		}
 	} else
 		atomic_cas_uint(&adapter->recovery_mode, 1, 0);
@@ -4856,7 +4857,7 @@ ixgbe_ifstop(struct ifnet *ifp, int disa
 	struct adapter *adapter = ifp->if_softc;
 
 	IXGBE_CORE_LOCK(adapter);
-	ixgbe_stop(adapter);
+	ixgbe_stop_locked(adapter);
 	IXGBE_CORE_UNLOCK(adapter);
 
 	workqueue_wait(adapter->timer_wq, &adapter->timer_wc);
@@ -4864,13 +4865,13 @@ ixgbe_ifstop(struct ifnet *ifp, int disa
 }
 
 /************************************************************************
- * ixgbe_stop - Stop the hardware
+ * ixgbe_stop_locked - Stop the hardware
  *
  *   Disables all traffic on the adapter by issuing a
  *   global reset on the MAC and deallocates TX/RX buffers.
  ************************************************************************/
 static void
-ixgbe_stop(void *arg)
+ixgbe_stop_locked(void *arg)
 {
 	struct ifnet	*ifp;
 	struct adapter	*adapter = arg;
@@ -4880,7 +4881,7 @@ ixgbe_stop(void *arg)
 
 	KASSERT(mutex_owned(&adapter->core_mtx));
 
-	INIT_DEBUGOUT("ixgbe_stop: begin\n");
+	INIT_DEBUGOUT("ixgbe_stop_locked: begin\n");
 	ixgbe_disable_intr(adapter);
 	callout_stop(&adapter->timer);
 
@@ -4906,7 +4907,7 @@ ixgbe_stop(void *arg)
 	ixgbe_set_rar(&adapter->hw, 0, adapter->hw.mac.addr, 0, IXGBE_RAH_AV);
 
 	return;
-} /* ixgbe_stop */
+} /* ixgbe_stop_locked */
 
 /************************************************************************
  * ixgbe_update_link_status - Update OS on link state

Index: src/sys/dev/pci/ixgbe/ixgbe_common.c
diff -u src/sys/dev/pci/ixgbe/ixgbe_common.c:1.29 src/sys/dev/pci/ixgbe/ixgbe_common.c:1.30
--- src/sys/dev/pci/ixgbe/ixgbe_common.c:1.29	Mon Aug 31 11:19:54 2020
+++ src/sys/dev/pci/ixgbe/ixgbe_common.c	Mon Aug 31 14:12:50 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_common.c,v 1.29 2020/08/31 11:19:54 msaitoh Exp $ */
+/* $NetBSD: ixgbe_common.c,v 1.30 2020/08/31 14:12:50 msaitoh Exp $ */
 
 /******************************************************************************
   SPDX-License-Identifier: BSD-3-Clause
@@ -1138,7 +1138,7 @@ s32 ixgbe_stop_adapter_generic(struct ix
 	 * This function is called in the state of both interrupt disabled
 	 * and interrupt enabled, e.g.
 	 * + interrupt disabled case:
-	 *   - ixgbe_stop()
+	 *   - ixgbe_stop_locked()
 	 *     - ixgbe_disable_intr() // interrupt disabled here
 	 *     - ixgbe_stop_adapter()
 	 *       - hw->mac.ops.stop_adapter()

Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.152 src/sys/dev/pci/ixgbe/ixv.c:1.153
--- src/sys/dev/pci/ixgbe/ixv.c:1.152	Thu Aug 13 08:38:50 2020
+++ src/sys/dev/pci/ixgbe/ixv.c	Mon Aug 31 14:12:50 2020
@@ -1,4 +1,4 @@
-/*$NetBSD: ixv.c,v 1.152 2020/08/13 08:38:50 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.153 2020/08/31 14:12:50 msaitoh Exp $*/
 
 /******************************************************************************
 
@@ -90,7 +90,7 @@ static int	ixv_ioctl(struct ifnet *, u_l
 static int	ixv_init(struct ifnet *);
 static void	ixv_init_locked(struct adapter *);
 static void	ixv_ifstop(struct ifnet *, int);
-static void	ixv_stop(void *);
+static void	ixv_stop_locked(void *);
 static void	ixv_init_device_features(struct adapter *);
 static void	ixv_media_status(struct ifnet *, struct ifmediareq *);
 static int	ixv_media_change(struct ifnet *);
@@ -329,7 +329,7 @@ ixv_attach(device_t parent, device_t dev
 	hw = &adapter->hw;
 
 	adapter->init_locked = ixv_init_locked;
-	adapter->stop_locked = ixv_stop;
+	adapter->stop_locked = ixv_stop_locked;
 
 	adapter->osdep.pc = pa->pa_pc;
 	adapter->osdep.tag = pa->pa_tag;
@@ -723,7 +723,7 @@ ixv_init_locked(struct adapter *adapter)
 	/* Prepare transmit descriptors and buffers */
 	if (ixgbe_setup_transmit_structures(adapter)) {
 		aprint_error_dev(dev, "Could not setup transmit structures\n");
-		ixv_stop(adapter);
+		ixv_stop_locked(adapter);
 		return;
 	}
 
@@ -752,7 +752,7 @@ ixv_init_locked(struct adapter *adapter)
 	/* Prepare receive descriptors and buffers */
 	if (ixgbe_setup_receive_structures(adapter)) {
 		device_printf(dev, "Could not setup receive structures\n");
-		ixv_stop(adapter);
+		ixv_stop_locked(adapter);
 		return;
 	}
 
@@ -1435,7 +1435,7 @@ ixv_ifstop(struct ifnet *ifp, int disabl
 	struct adapter *adapter = ifp->if_softc;
 
 	IXGBE_CORE_LOCK(adapter);
-	ixv_stop(adapter);
+	ixv_stop_locked(adapter);
 	IXGBE_CORE_UNLOCK(adapter);
 
 	workqueue_wait(adapter->admin_wq, &adapter->admin_wc);
@@ -1445,7 +1445,7 @@ ixv_ifstop(struct ifnet *ifp, int disabl
 }
 
 static void
-ixv_stop(void *arg)
+ixv_stop_locked(void *arg)
 {
 	struct ifnet	*ifp;
 	struct adapter	*adapter = arg;
@@ -1455,7 +1455,7 @@ ixv_stop(void *arg)
 
 	KASSERT(mutex_owned(&adapter->core_mtx));
 
-	INIT_DEBUGOUT("ixv_stop: begin\n");
+	INIT_DEBUGOUT("ixv_stop_locked: begin\n");
 	ixv_disable_intr(adapter);
 
 	/* Tell the stack that the interface is no longer active */
@@ -1473,7 +1473,7 @@ ixv_stop(void *arg)
 	hw->mac.ops.set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV);
 
 	return;
-} /* ixv_stop */
+} /* ixv_stop_locked */
 
 
 /************************************************************************
@@ -2978,7 +2978,7 @@ ixv_shutdown(device_t dev)
 {
 	struct adapter *adapter = device_private(dev);
 	IXGBE_CORE_LOCK(adapter);
-	ixv_stop(adapter);
+	ixv_stop_locked(adapter);
 	IXGBE_CORE_UNLOCK(adapter);
 
 	return (0);

Reply via email to