* [net-next PATCH] ixgbe: Use pci_wake_from_d3() instead of multiple pci_enable_wake()
@ 2009-04-29 7:18 Jeff Kirsher
2009-04-29 7:22 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Jeff Kirsher @ 2009-04-29 7:18 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, Don Skidmore, Jeff Kirsher
From: Don Skidmore <donald.c.skidmore@intel.com>
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>
---
drivers/net/ixgbe/ixgbe_main.c | 17 ++++++-----------
1 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 5020f11..01a8826 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)
}
pci_set_master(pdev);
- pci_enable_wake(pdev, PCI_D3hot, 0);
- pci_enable_wake(pdev, PCI_D3cold, 0);
+ pci_wake_from_d3(pdev, false);
err = ixgbe_init_interrupt_scheme(adapter);
if (err) {
@@ -3813,13 +3812,10 @@ static int __ixgbe_shutdown(struct pci_dev *pdev, bool *enable_wake)
IXGBE_WRITE_REG(hw, IXGBE_WUFC, 0);
}
- if (wufc && hw->mac.type == ixgbe_mac_82599EB) {
- pci_enable_wake(pdev, PCI_D3hot, 1);
- pci_enable_wake(pdev, PCI_D3cold, 1);
- } else {
- pci_enable_wake(pdev, PCI_D3hot, 0);
- pci_enable_wake(pdev, PCI_D3cold, 0);
- }
+ if (wufc && hw->mac.type == ixgbe_mac_82599EB)
+ pci_wake_from_d3(pdev, true);
+ else
+ pci_wake_from_d3(pdev, false);
*enable_wake = !!wufc;
@@ -5101,8 +5097,7 @@ static pci_ers_result_t ixgbe_io_slot_reset(struct pci_dev *pdev)
pci_set_master(pdev);
pci_restore_state(pdev);
- pci_enable_wake(pdev, PCI_D3hot, 0);
- pci_enable_wake(pdev, PCI_D3cold, 0);
+ pci_wake_from_d3(pdev, false);
ixgbe_reset(adapter);
IXGBE_WRITE_REG(&adapter->hw, IXGBE_WUS, ~0);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [net-next PATCH] ixgbe: Use pci_wake_from_d3() instead of multiple pci_enable_wake()
2009-04-29 7:18 [net-next PATCH] ixgbe: Use pci_wake_from_d3() instead of multiple pci_enable_wake() Jeff Kirsher
@ 2009-04-29 7:22 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2009-04-29 7:22 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, donald.c.skidmore
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed, 29 Apr 2009 00:18:52 -0700
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-04-29 7:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-29 7:18 [net-next PATCH] ixgbe: Use pci_wake_from_d3() instead of multiple pci_enable_wake() Jeff Kirsher
2009-04-29 7:22 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).