diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/forcedeth.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 5b910cf63740..b8251e827059 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -6011,9 +6011,20 @@ static void nv_shutdown(struct pci_dev *pdev) | |||
6011 | if (netif_running(dev)) | 6011 | if (netif_running(dev)) |
6012 | nv_close(dev); | 6012 | nv_close(dev); |
6013 | 6013 | ||
6014 | nv_restore_mac_addr(pdev); | 6014 | /* |
6015 | * Restore the MAC so a kernel started by kexec won't get confused. | ||
6016 | * If we really go for poweroff, we must not restore the MAC, | ||
6017 | * otherwise the MAC for WOL will be reversed at least on some boards. | ||
6018 | */ | ||
6019 | if (system_state != SYSTEM_POWER_OFF) { | ||
6020 | nv_restore_mac_addr(pdev); | ||
6021 | } | ||
6015 | 6022 | ||
6016 | pci_disable_device(pdev); | 6023 | pci_disable_device(pdev); |
6024 | /* | ||
6025 | * Apparently it is not possible to reinitialise from D3 hot, | ||
6026 | * only put the device into D3 if we really go for poweroff. | ||
6027 | */ | ||
6017 | if (system_state == SYSTEM_POWER_OFF) { | 6028 | if (system_state == SYSTEM_POWER_OFF) { |
6018 | if (pci_enable_wake(pdev, PCI_D3cold, np->wolenabled)) | 6029 | if (pci_enable_wake(pdev, PCI_D3cold, np->wolenabled)) |
6019 | pci_enable_wake(pdev, PCI_D3hot, np->wolenabled); | 6030 | pci_enable_wake(pdev, PCI_D3hot, np->wolenabled); |