aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
authorDon Skidmore <donald.c.skidmore@intel.com>2009-04-29 03:22:31 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-29 03:22:31 -0400
commitdd4d8ca6446538a904127838cb6c9a4cffe690f7 (patch)
tree17099bfebb524ce2662c54be0ff81fe0ffc51d6f /drivers/net/ixgbe/ixgbe_main.c
parentf7185c71234434d48b96f9a0387737df1759a4af (diff)
ixgbe: Use pci_wake_from_d3() instead of multiple pci_enable_wake()
We were calling pci_enable_wake() twice in a row for both D3_hot and D3_cold. This replaces those calls with a call to pci_wake_from_d3() to avoid issues with PCI PM vs ordering constraints. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 5020f11ae10f..01a88265d401 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -3738,8 +3738,7 @@ static int ixgbe_resume(struct pci_dev *pdev)
3738 } 3738 }
3739 pci_set_master(pdev); 3739 pci_set_master(pdev);
3740 3740
3741 pci_enable_wake(pdev, PCI_D3hot, 0); 3741 pci_wake_from_d3(pdev, false);
3742 pci_enable_wake(pdev, PCI_D3cold, 0);
3743 3742
3744 err = ixgbe_init_interrupt_scheme(adapter); 3743 err = ixgbe_init_interrupt_scheme(adapter);
3745 if (err) { 3744 if (err) {
@@ -3813,13 +3812,10 @@ static int __ixgbe_shutdown(struct pci_dev *pdev, bool *enable_wake)
3813 IXGBE_WRITE_REG(hw, IXGBE_WUFC, 0); 3812 IXGBE_WRITE_REG(hw, IXGBE_WUFC, 0);
3814 } 3813 }
3815 3814
3816 if (wufc && hw->mac.type == ixgbe_mac_82599EB) { 3815 if (wufc && hw->mac.type == ixgbe_mac_82599EB)
3817 pci_enable_wake(pdev, PCI_D3hot, 1); 3816 pci_wake_from_d3(pdev, true);
3818 pci_enable_wake(pdev, PCI_D3cold, 1); 3817 else
3819 } else { 3818 pci_wake_from_d3(pdev, false);
3820 pci_enable_wake(pdev, PCI_D3hot, 0);
3821 pci_enable_wake(pdev, PCI_D3cold, 0);
3822 }
3823 3819
3824 *enable_wake = !!wufc; 3820 *enable_wake = !!wufc;
3825 3821
@@ -5101,8 +5097,7 @@ static pci_ers_result_t ixgbe_io_slot_reset(struct pci_dev *pdev)
5101 pci_set_master(pdev); 5097 pci_set_master(pdev);
5102 pci_restore_state(pdev); 5098 pci_restore_state(pdev);
5103 5099
5104 pci_enable_wake(pdev, PCI_D3hot, 0); 5100 pci_wake_from_d3(pdev, false);
5105 pci_enable_wake(pdev, PCI_D3cold, 0);
5106 5101
5107 ixgbe_reset(adapter); 5102 ixgbe_reset(adapter);
5108 IXGBE_WRITE_REG(&adapter->hw, IXGBE_WUS, ~0); 5103 IXGBE_WRITE_REG(&adapter->hw, IXGBE_WUS, ~0);