Skip to content

Commit

Permalink
e1000: call pci_save_state after pci_restore_state
Browse files Browse the repository at this point in the history
This patch adds a call to pci_save_state() immediately after
the call to pci_restore_state(). Due to a change in the behavior
of pci_restore_state() it is necessary to call pci_save_state()
to keep the state_saved flag. This patch is based on a similar
patch for ixgbe.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Nick Nunley authored and David S. Miller committed Feb 4, 2010
1 parent b548192 commit dbb5aae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,9 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
goto err_pci_reg;

pci_set_master(pdev);
err = pci_save_state(pdev);
if (err)
goto err_alloc_etherdev;

err = -ENOMEM;
netdev = alloc_etherdev(sizeof(struct e1000_adapter));
Expand Down Expand Up @@ -4596,6 +4599,7 @@ static int e1000_resume(struct pci_dev *pdev)

pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev);
pci_save_state(pdev);

if (adapter->need_ioport)
err = pci_enable_device(pdev);
Expand Down

0 comments on commit dbb5aae

Please sign in to comment.