summaryrefslogtreecommitdiffstats
path: root/drivers/net/forcedeth.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-02-24 12:50:29 +0100
committerDavid S. Miller <davem@davemloft.net>2009-02-24 12:50:29 +0100
commite70049b9e74267dd47e1ffa62302073487afcb48 (patch)
tree2cd000c0751ef31c9044b020d63f278cdf4f332d /drivers/net/forcedeth.c
parentDoc: Refer to ip-sysctl.txt for strict vs. loose rp_filter mode (diff)
parentMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 (diff)
downloadlinux-e70049b9e74267dd47e1ffa62302073487afcb48.tar.xz
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);