summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/realtek
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2020-06-17 22:54:18 +0200
committerDavid S. Miller <davem@davemloft.net>2020-06-18 20:38:36 -0700
commit0c28a63a47bfa7497e4dce79f6bb53a00d8f6aa0 (patch)
tree87a88515e4fd2084d95cdeffbb310ecd27db82d9 /drivers/net/ethernet/realtek
parent7190aeece918cad9b601789bee58877a6c2eeed8 (diff)
downloadlinux-0c28a63a47bfa7497e4dce79f6bb53a00d8f6aa0.tar.gz
linux-0c28a63a47bfa7497e4dce79f6bb53a00d8f6aa0.tar.bz2
linux-0c28a63a47bfa7497e4dce79f6bb53a00d8f6aa0.zip
r8169: move napi_disable call and rename rtl8169_hw_reset
rtl8169_hw_reset() meanwhile does more than a hw reset, therefore rename it to rtl8169_cleanup(). In addition move calling napi_disable() to this function. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/realtek')
-rw-r--r--drivers/net/ethernet/realtek/r8169_main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 0d3e58ae1b31..afcdaace2716 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -3926,8 +3926,10 @@ static void rtl8169_tx_clear(struct rtl8169_private *tp)
netdev_reset_queue(tp->dev);
}
-static void rtl8169_hw_reset(struct rtl8169_private *tp, bool going_down)
+static void rtl8169_cleanup(struct rtl8169_private *tp, bool going_down)
{
+ napi_disable(&tp->napi);
+
/* Give a racing hard_start_xmit a few cycles to complete. */
synchronize_net();
@@ -3970,10 +3972,9 @@ static void rtl_reset_work(struct rtl8169_private *tp)
struct net_device *dev = tp->dev;
int i;
- napi_disable(&tp->napi);
netif_stop_queue(dev);
- rtl8169_hw_reset(tp, false);
+ rtl8169_cleanup(tp, false);
for (i = 0; i < NUM_RX_DESC; i++)
rtl8169_mark_to_asic(tp->RxDescArray + i);
@@ -4636,9 +4637,8 @@ static void rtl8169_down(struct rtl8169_private *tp)
bitmap_zero(tp->wk.flags, RTL_FLAG_MAX);
phy_stop(tp->phydev);
- napi_disable(&tp->napi);
- rtl8169_hw_reset(tp, true);
+ rtl8169_cleanup(tp, true);
rtl_pll_power_down(tp);