From: Michael Chan Date: Tue, 8 May 2007 02:04:35 +0000 (-0700) Subject: [PATCH] BNX2: Save PCI state during suspend. X-Git-Tag: v2.6.21.2~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=354aec7602157267f9262680d18b06249a6de59f;p=thirdparty%2Fkernel%2Fstable.git [PATCH] BNX2: Save PCI state during suspend. This is needed to save the MSI state which will be lost during suspend. Signed-off-by: Michael Chan Signed-off-by: David S. Miller Signed-off-by: Chris Wright --- diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 81443ae6ea154..3c0c94b925671 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c @@ -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);