Skip to content

Commit

Permalink
[BNX2]: Save PCI state during suspend.
Browse files Browse the repository at this point in the history
This is needed to save the MSI state which will be lost during
suspend.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Michael Chan authored and David S. Miller committed May 3, 2007
1 parent 1b2f922 commit 30c517b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -6172,6 +6172,7 @@ bnx2_suspend(struct pci_dev *pdev, pm_message_t state)
reset_code = BNX2_DRV_MSG_CODE_SUSPEND_NO_WOL;
bnx2_reset_chip(bp, reset_code);
bnx2_free_skbs(bp);
pci_save_state(pdev);
bnx2_set_power_state(bp, pci_choose_state(pdev, state));
return 0;
}
Expand All @@ -6185,6 +6186,7 @@ bnx2_resume(struct pci_dev *pdev)
if (!netif_running(dev))
return 0;

pci_restore_state(pdev);
bnx2_set_power_state(bp, PCI_D0);
netif_device_attach(dev);
bnx2_init_nic(bp);
Expand Down

0 comments on commit 30c517b

Please sign in to comment.