diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/r8169.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index 35196faa084e..4e22462684c9 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c | |||
@@ -3811,22 +3811,11 @@ static struct net_device_stats *rtl8169_get_stats(struct net_device *dev) | |||
3811 | 3811 | ||
3812 | static void rtl8169_net_suspend(struct net_device *dev) | 3812 | static void rtl8169_net_suspend(struct net_device *dev) |
3813 | { | 3813 | { |
3814 | struct rtl8169_private *tp = netdev_priv(dev); | ||
3815 | void __iomem *ioaddr = tp->mmio_addr; | ||
3816 | |||
3817 | if (!netif_running(dev)) | 3814 | if (!netif_running(dev)) |
3818 | return; | 3815 | return; |
3819 | 3816 | ||
3820 | netif_device_detach(dev); | 3817 | netif_device_detach(dev); |
3821 | netif_stop_queue(dev); | 3818 | netif_stop_queue(dev); |
3822 | |||
3823 | spin_lock_irq(&tp->lock); | ||
3824 | |||
3825 | rtl8169_asic_down(ioaddr); | ||
3826 | |||
3827 | rtl8169_rx_missed(dev, ioaddr); | ||
3828 | |||
3829 | spin_unlock_irq(&tp->lock); | ||
3830 | } | 3819 | } |
3831 | 3820 | ||
3832 | #ifdef CONFIG_PM | 3821 | #ifdef CONFIG_PM |
@@ -3876,9 +3865,17 @@ static struct dev_pm_ops rtl8169_pm_ops = { | |||
3876 | static void rtl_shutdown(struct pci_dev *pdev) | 3865 | static void rtl_shutdown(struct pci_dev *pdev) |
3877 | { | 3866 | { |
3878 | struct net_device *dev = pci_get_drvdata(pdev); | 3867 | struct net_device *dev = pci_get_drvdata(pdev); |
3868 | struct rtl8169_private *tp = netdev_priv(dev); | ||
3869 | void __iomem *ioaddr = tp->mmio_addr; | ||
3879 | 3870 | ||
3880 | rtl8169_net_suspend(dev); | 3871 | rtl8169_net_suspend(dev); |
3881 | 3872 | ||
3873 | spin_lock_irq(&tp->lock); | ||
3874 | |||
3875 | rtl8169_asic_down(ioaddr); | ||
3876 | |||
3877 | spin_unlock_irq(&tp->lock); | ||
3878 | |||
3882 | if (system_state == SYSTEM_POWER_OFF) { | 3879 | if (system_state == SYSTEM_POWER_OFF) { |
3883 | pci_wake_from_d3(pdev, true); | 3880 | pci_wake_from_d3(pdev, true); |
3884 | pci_set_power_state(pdev, PCI_D3hot); | 3881 | pci_set_power_state(pdev, PCI_D3hot); |