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 Rename ix{gbe,v}_stop() with ix{gbe,v}_sto...



details:   https://anonhg.NetBSD.org/src/rev/d6ba188396ca
branches:  trunk
changeset: 938028:d6ba188396ca
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon Aug 31 14:12:50 2020 +0000

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

diffstat:

 sys/dev/pci/ixgbe/ixgbe.c        |  31 ++++++++++++++++---------------
 sys/dev/pci/ixgbe/ixgbe_common.c |   4 ++--
 sys/dev/pci/ixgbe/ixv.c          |  20 ++++++++++----------
 3 files changed, 28 insertions(+), 27 deletions(-)

diffs (235 lines):

diff -r a6288c02c754 -r d6ba188396ca sys/dev/pci/ixgbe/ixgbe.c
--- a/sys/dev/pci/ixgbe/ixgbe.c Mon Aug 31 14:03:56 2020 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe.c Mon Aug 31 14:12:50 2020 +0000
@@ -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_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 @@
 
        /* 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 @@
 #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 @@
            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 @@
                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 @@
        /* 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 @@
        /* 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 @@
                        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 @@
        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_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 @@
 
        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_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
diff -r a6288c02c754 -r d6ba188396ca sys/dev/pci/ixgbe/ixgbe_common.c
--- a/sys/dev/pci/ixgbe/ixgbe_common.c  Mon Aug 31 14:03:56 2020 +0000
+++ b/sys/dev/pci/ixgbe/ixgbe_common.c  Mon Aug 31 14:12:50 2020 +0000
@@ -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 @@
         * 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()
diff -r a6288c02c754 -r d6ba188396ca sys/dev/pci/ixgbe/ixv.c
--- a/sys/dev/pci/ixgbe/ixv.c   Mon Aug 31 14:03:56 2020 +0000
+++ b/sys/dev/pci/ixgbe/ixv.c   Mon Aug 31 14:12:50 2020 +0000
@@ -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_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 @@
        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 @@
        /* 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 @@
        /* 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 @@
        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 @@
 }
 
 static void
-ixv_stop(void *arg)
+ixv_stop_locked(void *arg)
 {
        struct ifnet    *ifp;
        struct adapter  *adapter = arg;
@@ -1455,7 +1455,7 @@
 
        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 @@
        hw->mac.ops.set_rar(hw, 0, hw->mac.addr, 0, IXGBE_RAH_AV);
 
        return;
-} /* ixv_stop */
+} /* ixv_stop_locked */
 
 
 /************************************************************************
@@ -2978,7 +2978,7 @@
 {
        struct adapter *adapter = device_private(dev);
        IXGBE_CORE_LOCK(adapter);
-       ixv_stop(adapter);
+       ixv_stop_locked(adapter);
        IXGBE_CORE_UNLOCK(adapter);
 
        return (0);



Home | Main Index | Thread Index | Old Index