Skip to contentSkip to conversation

ixgbe: fix Need to call pci_save_state after pci_restore_state

PATCH Applied Jeff Kirsher 2 participants 2 messages Dec 22, 2009 – Dec 24, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ixgbe: fix Need to call pci_save_state after pci_restore_state

From: Don Skidmore <[email protected]>

This patch adds a pci_save_state() call in ixgbe_resume() after pci_restore_state(). A similar change was made in ixgbe_io_slot_reset() that accommodates pci_restore_state() new behavior. This change makes pci_restore_state() clear the saved_state flag This is necessary due to a resent kernel change to pci_restore_state() so that it now clears the saved_state flag of the device right after the device.s standard configuration registers have been poplulated with the previously saved values.

---

 drivers/net/ixgbe/ixgbe_main.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/net/ixgbe/ixgbe_main.c +5 -0
index bd64387..1a2ea62 100644
@@ -4373,6 +4373,11 @@ static int ixgbe_resume(struct pci_dev *pdev)
 
 	pci_set_power_state(pdev, PCI_D0);
 	pci_restore_state(pdev);
+	/*
+	 * pci_restore_state clears dev->state_saved so call
+	 * pci_save_state to restore it.
+	 */
+	pci_save_state(pdev);
 
 	err = pci_enable_device_mem(pdev);
 	if (err) {
maintainer Applied
#1 lore raw

From: Jeff Kirsher <[email protected]>
Date: Tue, 22 Dec 2009 12:45:20 -0800

Quoted 11 lines

From: Don Skidmore <[email protected]>

This patch adds a pci_save_state() call in ixgbe_resume() after pci_restore_state(). A similar change was made in ixgbe_io_slot_reset() that accommodates pci_restore_state() new behavior. This change makes pci_restore_state() clear the saved_state flag This is necessary due to a resent kernel change to pci_restore_state() so that it now clears the saved_state flag of the device right after the device.s standard configuration registers have been poplulated with the previously saved values.

Quoted 3 lines

Applied, thanks.