r8169: (re)init phy on resume
authorStanislaw Gruszka <sgruszka@redhat.com>
Wed, 20 Oct 2010 22:25:42 +0000 (22:25 +0000)
committerAndi Kleen <ak@linux.intel.com>
Tue, 14 Dec 2010 22:40:18 +0000 (23:40 +0100)
commit fccec10b33503a2b1197c8e7a3abd30443bedb08 upstream.

Fix switching device to low-speed mode after resume reported in:
https://bugzilla.redhat.com/show_bug.cgi?id=502974

Reported-and-tested-by: Laurentiu Badea <bugzilla-redhat@wotevah.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Francois Romieu <romieu@fr.zoreil.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
drivers/net/r8169.c

index 60b591163ae98c7261b0e144b123a79cc09e2f09..661109f7ce49e86598d367706d3f5988cb7f1ca9 100644 (file)
@@ -4893,6 +4893,9 @@ 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);
@@ -4933,6 +4936,8 @@ static int rtl8169_runtime_resume(struct device *device)
        tp->saved_wolopts = 0;
        spin_unlock_irq(&tp->lock);
 
+       rtl8169_init_phy(dev, tp);
+
        __rtl8169_resume(dev);
 
        return 0;