]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] BNX2: Save PCI state during suspend.
authorMichael Chan <mchan@broadcom.com>
Tue, 8 May 2007 02:04:35 +0000 (19:04 -0700)
committerChris Wright <chrisw@sous-sol.org>
Wed, 23 May 2007 21:32:45 +0000 (14:32 -0700)
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>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
drivers/net/bnx2.c

index 81443ae6ea154df3f7d8b8c83e04fa7b77b74b0d..3c0c94b92567147728561ce08e8d2331a71f0038 100644 (file)
@@ -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);