Commit dd4d8ca6 authored by Don Skidmore's avatar Don Skidmore Committed by David S. Miller

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: default avatarDon Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f7185c71
...@@ -3738,8 +3738,7 @@ static int ixgbe_resume(struct pci_dev *pdev) ...@@ -3738,8 +3738,7 @@ static int ixgbe_resume(struct pci_dev *pdev)
} }
pci_set_master(pdev); pci_set_master(pdev);
pci_enable_wake(pdev, PCI_D3hot, 0); pci_wake_from_d3(pdev, false);
pci_enable_wake(pdev, PCI_D3cold, 0);
err = ixgbe_init_interrupt_scheme(adapter); err = ixgbe_init_interrupt_scheme(adapter);
if (err) { if (err) {
...@@ -3813,13 +3812,10 @@ static int __ixgbe_shutdown(struct pci_dev *pdev, bool *enable_wake) ...@@ -3813,13 +3812,10 @@ static int __ixgbe_shutdown(struct pci_dev *pdev, bool *enable_wake)
IXGBE_WRITE_REG(hw, IXGBE_WUFC, 0); IXGBE_WRITE_REG(hw, IXGBE_WUFC, 0);
} }
if (wufc && hw->mac.type == ixgbe_mac_82599EB) { if (wufc && hw->mac.type == ixgbe_mac_82599EB)
pci_enable_wake(pdev, PCI_D3hot, 1); pci_wake_from_d3(pdev, true);
pci_enable_wake(pdev, PCI_D3cold, 1); else
} else { pci_wake_from_d3(pdev, false);
pci_enable_wake(pdev, PCI_D3hot, 0);
pci_enable_wake(pdev, PCI_D3cold, 0);
}
*enable_wake = !!wufc; *enable_wake = !!wufc;
...@@ -5101,8 +5097,7 @@ static pci_ers_result_t ixgbe_io_slot_reset(struct pci_dev *pdev) ...@@ -5101,8 +5097,7 @@ static pci_ers_result_t ixgbe_io_slot_reset(struct pci_dev *pdev)
pci_set_master(pdev); pci_set_master(pdev);
pci_restore_state(pdev); pci_restore_state(pdev);
pci_enable_wake(pdev, PCI_D3hot, 0); pci_wake_from_d3(pdev, false);
pci_enable_wake(pdev, PCI_D3cold, 0);
ixgbe_reset(adapter); ixgbe_reset(adapter);
IXGBE_WRITE_REG(&adapter->hw, IXGBE_WUS, ~0); IXGBE_WRITE_REG(&adapter->hw, IXGBE_WUS, ~0);
......
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