aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000/e1000_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/e1000/e1000_main.c')
-rw-r--r--drivers/net/e1000/e1000_main.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 9b596e0bbf95..7c8a0a22dcd5 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -162,7 +162,7 @@ static void e1000_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid);
162static void e1000_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid); 162static void e1000_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid);
163static void e1000_restore_vlan(struct e1000_adapter *adapter); 163static void e1000_restore_vlan(struct e1000_adapter *adapter);
164 164
165static int e1000_suspend(struct pci_dev *pdev, uint32_t state); 165static int e1000_suspend(struct pci_dev *pdev, pm_message_t state);
166#ifdef CONFIG_PM 166#ifdef CONFIG_PM
167static int e1000_resume(struct pci_dev *pdev); 167static int e1000_resume(struct pci_dev *pdev);
168#endif 168#endif
@@ -3642,7 +3642,7 @@ e1000_set_spd_dplx(struct e1000_adapter *adapter, uint16_t spddplx)
3642} 3642}
3643 3643
3644static int 3644static int
3645e1000_suspend(struct pci_dev *pdev, uint32_t state) 3645e1000_suspend(struct pci_dev *pdev, pm_message_t state)
3646{ 3646{
3647 struct net_device *netdev = pci_get_drvdata(pdev); 3647 struct net_device *netdev = pci_get_drvdata(pdev);
3648 struct e1000_adapter *adapter = netdev_priv(netdev); 3648 struct e1000_adapter *adapter = netdev_priv(netdev);
@@ -3726,9 +3726,7 @@ e1000_suspend(struct pci_dev *pdev, uint32_t state)
3726 } 3726 }
3727 3727
3728 pci_disable_device(pdev); 3728 pci_disable_device(pdev);
3729 3729 pci_set_power_state(pdev, pci_choose_state(pdev, state));
3730 state = (state > 0) ? 3 : 0;
3731 pci_set_power_state(pdev, state);
3732 3730
3733 return 0; 3731 return 0;
3734} 3732}
@@ -3741,13 +3739,13 @@ e1000_resume(struct pci_dev *pdev)
3741 struct e1000_adapter *adapter = netdev_priv(netdev); 3739 struct e1000_adapter *adapter = netdev_priv(netdev);
3742 uint32_t manc, ret_val, swsm; 3740 uint32_t manc, ret_val, swsm;
3743 3741
3744 pci_set_power_state(pdev, 0); 3742 pci_set_power_state(pdev, PCI_D0);
3745 pci_restore_state(pdev); 3743 pci_restore_state(pdev);
3746 ret_val = pci_enable_device(pdev); 3744 ret_val = pci_enable_device(pdev);
3747 pci_set_master(pdev); 3745 pci_set_master(pdev);
3748 3746
3749 pci_enable_wake(pdev, 3, 0); 3747 pci_enable_wake(pdev, PCI_D3hot, 0);
3750 pci_enable_wake(pdev, 4, 0); /* 4 == D3 cold */ 3748 pci_enable_wake(pdev, PCI_D3cold, 0);
3751 3749
3752 e1000_reset(adapter); 3750 e1000_reset(adapter);
3753 E1000_WRITE_REG(&adapter->hw, WUS, ~0); 3751 E1000_WRITE_REG(&adapter->hw, WUS, ~0);