提交 30c517b2 编写于 作者: M Michael Chan 提交者: David S. Miller

[BNX2]: Save PCI state during suspend.

This is needed to save the MSI state which will be lost during
suspend.
Signed-off-by: NMichael Chan <mchan@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1b2f922f
...@@ -6172,6 +6172,7 @@ bnx2_suspend(struct pci_dev *pdev, pm_message_t state) ...@@ -6172,6 +6172,7 @@ bnx2_suspend(struct pci_dev *pdev, pm_message_t state)
reset_code = BNX2_DRV_MSG_CODE_SUSPEND_NO_WOL; reset_code = BNX2_DRV_MSG_CODE_SUSPEND_NO_WOL;
bnx2_reset_chip(bp, reset_code); bnx2_reset_chip(bp, reset_code);
bnx2_free_skbs(bp); bnx2_free_skbs(bp);
pci_save_state(pdev);
bnx2_set_power_state(bp, pci_choose_state(pdev, state)); bnx2_set_power_state(bp, pci_choose_state(pdev, state));
return 0; return 0;
} }
...@@ -6185,6 +6186,7 @@ bnx2_resume(struct pci_dev *pdev) ...@@ -6185,6 +6186,7 @@ bnx2_resume(struct pci_dev *pdev)
if (!netif_running(dev)) if (!netif_running(dev))
return 0; return 0;
pci_restore_state(pdev);
bnx2_set_power_state(bp, PCI_D0); bnx2_set_power_state(bp, PCI_D0);
netif_device_attach(dev); netif_device_attach(dev);
bnx2_init_nic(bp); bnx2_init_nic(bp);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册