Commit 07df5bd8 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

r8169: power down chip in probe

The removed code would be called in two situations:
1. interface is brought up never or >10s after driver load
2. after close()

Case 1 we can handle cleaner by ensuring chip is powered down when
leaving probe(). open() callback will power up the chip.

In case 2 we call rtl_pll_power_down() twice currently, from the
close() callback and 10s later when entering runtime-suspend.
This is avoided by this patch.
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fd3d96ae
...@@ -6965,10 +6965,8 @@ static int rtl8169_runtime_suspend(struct device *device) ...@@ -6965,10 +6965,8 @@ static int rtl8169_runtime_suspend(struct device *device)
struct net_device *dev = pci_get_drvdata(pdev); struct net_device *dev = pci_get_drvdata(pdev);
struct rtl8169_private *tp = netdev_priv(dev); struct rtl8169_private *tp = netdev_priv(dev);
if (!tp->TxDescArray) { if (!tp->TxDescArray)
rtl_pll_power_down(tp);
return 0; return 0;
}
rtl_lock_work(tp); rtl_lock_work(tp);
__rtl8169_set_wol(tp, WAKE_ANY); __rtl8169_set_wol(tp, WAKE_ANY);
...@@ -7485,6 +7483,9 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -7485,6 +7483,9 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
if (rc) if (rc)
return rc; return rc;
/* chip gets powered up in rtl_open() */
rtl_pll_power_down(tp);
rc = register_netdev(dev); rc = register_netdev(dev);
if (rc) if (rc)
goto err_mdio_unregister; goto err_mdio_unregister;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment