summaryrefslogtreecommitdiffstats
path: root/drivers/net/forcedeth.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-02-24 03:50:29 -0800
committerDavid S. Miller <davem@davemloft.net>2009-02-24 03:50:29 -0800
commite70049b9e74267dd47e1ffa62302073487afcb48 (patch)
tree2cd000c0751ef31c9044b020d63f278cdf4f332d /drivers/net/forcedeth.c
parentd18921a0e319ab512f8186b1b1142c7b8634c779 (diff)
parentf7e603ad8f78cd3b59e33fa72707da0cbabdf699 (diff)
downloadblackbird-op-linux-e70049b9e74267dd47e1ffa62302073487afcb48.tar.gz
blackbird-op-linux-e70049b9e74267dd47e1ffa62302073487afcb48.zip
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
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)
if (netif_running(dev))
nv_close(dev);
- nv_restore_mac_addr(pdev);
+ /*
+ * Restore the MAC so a kernel started by kexec won't get confused.
+ * If we really go for poweroff, we must not restore the MAC,
+ * otherwise the MAC for WOL will be reversed at least on some boards.
+ */
+ if (system_state != SYSTEM_POWER_OFF) {
+ nv_restore_mac_addr(pdev);
+ }
pci_disable_device(pdev);
+ /*
+ * Apparently it is not possible to reinitialise from D3 hot,
+ * only put the device into D3 if we really go for poweroff.
+ */
if (system_state == SYSTEM_POWER_OFF) {
if (pci_enable_wake(pdev, PCI_D3cold, np->wolenabled))
pci_enable_wake(pdev, PCI_D3hot, np->wolenabled);
OpenPOWER on IntegriCloud