e1000e: call pci_save_state() after pci_restore_state()
authorBruce Allan <bruce.w.allan@intel.com>
Thu, 7 Jan 2010 16:30:56 +0000 (16:30 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Jan 2010 08:35:29 +0000 (00:35 -0800)
Due to a change in pci_restore_state()[1] which clears the saved_state
flag, the driver should call pci_save_state() to set the flag once again
to avoid issues with EEH (same fix that recently was submitted for ixgbe).

[1] commmit 4b77b0a2ba27d64f58f16d8d4d48d8319dda36ff

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/e1000e/netdev.c

index 762b697ce7310d37d497cd2c169bd52497faf5fb..10aa0ec719dfbb2535a54335a99f4b46ed47c8d8 100644 (file)
@@ -4674,6 +4674,7 @@ static int e1000_resume(struct pci_dev *pdev)
 
        pci_set_power_state(pdev, PCI_D0);
        pci_restore_state(pdev);
+       pci_save_state(pdev);
        e1000e_disable_l1aspm(pdev);
 
        err = pci_enable_device_mem(pdev);
@@ -4825,6 +4826,7 @@ static pci_ers_result_t e1000_io_slot_reset(struct pci_dev *pdev)
        } else {
                pci_set_master(pdev);
                pci_restore_state(pdev);
+               pci_save_state(pdev);
 
                pci_enable_wake(pdev, PCI_D3hot, 0);
                pci_enable_wake(pdev, PCI_D3cold, 0);