aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/forcedeth.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/forcedeth.c')
-rw-r--r--drivers/net/forcedeth.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 021308f9f0c7..8b7f8b77e5e0 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -6102,9 +6102,20 @@ static void nv_shutdown(struct pci_dev *pdev)
6102 if (netif_running(dev)) 6102 if (netif_running(dev))
6103 nv_close(dev); 6103 nv_close(dev);
6104 6104
6105 nv_restore_mac_addr(pdev); 6105 /*
6106 * Restore the MAC so a kernel started by kexec won't get confused.
6107 * If we really go for poweroff, we must not restore the MAC,
6108 * otherwise the MAC for WOL will be reversed at least on some boards.
6109 */
6110 if (system_state != SYSTEM_POWER_OFF) {
6111 nv_restore_mac_addr(pdev);
6112 }
6106 6113
6107 pci_disable_device(pdev); 6114 pci_disable_device(pdev);
6115 /*
6116 * Apparently it is not possible to reinitialise from D3 hot,
6117 * only put the device into D3 if we really go for poweroff.
6118 */
6108 if (system_state == SYSTEM_POWER_OFF) { 6119 if (system_state == SYSTEM_POWER_OFF) {
6109 if (pci_enable_wake(pdev, PCI_D3cold, np->wolenabled)) 6120 if (pci_enable_wake(pdev, PCI_D3cold, np->wolenabled))
6110 pci_enable_wake(pdev, PCI_D3hot, np->wolenabled); 6121 pci_enable_wake(pdev, PCI_D3hot, np->wolenabled);