diff options
author | Heiner Kallweit | 2018-06-24 18:37:36 +0200 |
---|---|---|
committer | David S. Miller | 2018-06-25 16:21:51 +0900 |
commit | 92bad8509159b2377b40fe91a6b37f1b4cb63569 (patch) | |
tree | d2a2b95cc597daf25134f49f08a6c98e389632bd | |
parent | 064f390265be42763e804f742b1d920e4e997ddb (diff) |
r8169: improve phy initialization when resuming
Let's move calling rtl8169_init_phy() to __rtl8169_resume().
It simplifies the code and avoids rtl8169_init_phy() being called
when resuming whilst interface is down. rtl_open() will initialize
the PHY when the interface is brought up.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/realtek/r8169.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 44715958b246..480fb141fe62 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c @@ -7334,6 +7334,7 @@ static void __rtl8169_resume(struct net_device *dev) netif_device_attach(dev); rtl_pll_power_up(tp); + rtl8169_init_phy(dev, tp); rtl_lock_work(tp); napi_enable(&tp->napi); @@ -7347,9 +7348,6 @@ static int rtl8169_resume(struct device *device) { struct pci_dev *pdev = to_pci_dev(device); struct net_device *dev = pci_get_drvdata(pdev); - struct rtl8169_private *tp = netdev_priv(dev); - - rtl8169_init_phy(dev, tp); if (netif_running(dev)) __rtl8169_resume(dev); @@ -7397,8 +7395,6 @@ static int rtl8169_runtime_resume(struct device *device) tp->saved_wolopts = 0; rtl_unlock_work(tp); - rtl8169_init_phy(dev, tp); - __rtl8169_resume(dev); return 0; |