Commit 354aec76 authored by Michael Chan's avatar Michael Chan Committed by Chris Wright

[PATCH] BNX2: Save PCI state during suspend.

This is needed to save the MSI state which will be lost during
suspend.
Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
parent 2a0167b2
......@@ -6148,6 +6148,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;
}
......@@ -6161,6 +6162,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment