All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philipp Matthias Hahn <pmhahn@titan.lahn.de>
To: Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Yinghai Lu <yhlu.kernel@gmail.com>,
	Tobias Diedrich <ranma+kernel@tdiedrich.de>,
	Ayaz Abdulla <aabdulla@nvidia.com>, Jeff Garzik <jeff@garzik.org>,
	"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: WOL with forcedeth broken since f55c21fd9a92a444e55ad1ca4e4732d56661bf2e
Date: Thu, 29 Jan 2009 07:31:18 +0100	[thread overview]
Message-ID: <20090129063118.GA3586@pmhahn.de> (raw)

Hello!

Somewhere between 2.6.26 and 2.6.27 WOL stopped working on my MS-7350
motherboard with an "nVidia Corporation MCP51 Ethernet Controller (rev a3)".
	"etherwake 00:19:db:f2:e1:35" did not work
	"etherwake 35:e1:f2:db:19:00" did work
Since I did a BIOS update during the same time window I (wrongly) put
the fault on the BIOS. (See /sys/class/dmi/id/modalias for yourself:
dmi:bvnAmericanMegatrendsInc.:bvrV1.7:bd07/29/2008:svnMSI:pnMS-7350:pvr1.0:rvnMSI:rnMS-7350:rvr1.0:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:
)

Today I finally found the time to test various old versions of
"drivers/net/forcedeth.c" and also did a "git-bisect v2.6.26 v2.6.27"
which lead to the following culprit:

f55c21fd9a92a444e55ad1ca4e4732d56661bf2e is first bad commit
commit f55c21fd9a92a444e55ad1ca4e4732d56661bf2e
Author: Yinghai Lu <yhlu.kernel@gmail.com>
Date:   Sat Sep 13 13:10:31 2008 -0700

    forcedeth: call restore mac addr in nv_shutdown path
    
    after
    
    | commit f735a2a1a4f2a0f5cd823ce323e82675990469e2
    | Author: Tobias Diedrich <ranma+kernel@tdiedrich.de>
    | Date:   Sun May 18 15:02:37 2008 +0200
    |
    |    [netdrvr] forcedeth: setup wake-on-lan before shutting down
    |
    |    When hibernating in 'shutdown' mode, after saving the image the suspend hook
    |    is not called again.
    |    However, if the device is in promiscous mode, wake-on-lan will not work.
    |    This adds a shutdown hook to setup wake-on-lan before the final shutdown.
    |
    |    Signed-off-by: Tobias Diedrich <ranma+kernel@tdiedrich.de>
    |    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
    
    my servers with nvidia ck804 and mcp55 will reverse mac address with kexec.
    
    it turns out that we need to restore the mac addr in nv_shutdown().
    
    [akpm@linux-foundation.org: fix typo in printk]
    Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
    Cc: Tobias Diedrich <ranma+kernel@tdiedrich.de>
    Cc: Ayaz Abdulla <aabdulla@nvidia.com>
    Cc: Jeff Garzik <jeff@garzik.org>
    Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Jeff Garzik <jgarzik@redhat.com>

diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 0b6ecef..eeb55ed 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -5643,6 +5643,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
 		dev->dev_addr[4] = (np->orig_mac[0] >>  8) & 0xff;
 		dev->dev_addr[5] = (np->orig_mac[0] >>  0) & 0xff;
 		writel(txreg|NVREG_TRANSMITPOLL_MAC_ADDR_REV, base + NvRegTransmitPoll);
+		printk(KERN_DEBUG "nv_probe: set workaround bit for reversed mac addr\n");
 	}
 	memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
 
@@ -5890,14 +5891,12 @@ static void nv_restore_phy(struct net_device *dev)
 	}
 }
 
-static void __devexit nv_remove(struct pci_dev *pci_dev)
+static void nv_restore_mac_addr(struct pci_dev *pci_dev)
 {
 	struct net_device *dev = pci_get_drvdata(pci_dev);
 	struct fe_priv *np = netdev_priv(dev);
 	u8 __iomem *base = get_hwbase(dev);
 
-	unregister_netdev(dev);
-
 	/* special op: write back the misordered MAC address - otherwise
 	 * the next nv_probe would see a wrong address.
 	 */
@@ -5905,6 +5904,15 @@ static void __devexit nv_remove(struct pci_dev *pci_dev)
 	writel(np->orig_mac[1], base + NvRegMacAddrB);
 	writel(readl(base + NvRegTransmitPoll) & ~NVREG_TRANSMITPOLL_MAC_ADDR_REV,
 	       base + NvRegTransmitPoll);
+}
+
+static void __devexit nv_remove(struct pci_dev *pci_dev)
+{
+	struct net_device *dev = pci_get_drvdata(pci_dev);
+
+	unregister_netdev(dev);
+
+	nv_restore_mac_addr(pci_dev);
 
 	/* restore any phy related changes */
 	nv_restore_phy(dev);
@@ -5975,6 +5983,8 @@ static void nv_shutdown(struct pci_dev *pdev)
 	if (netif_running(dev))
 		nv_close(dev);
 
+	nv_restore_mac_addr(pdev);
+
 	pci_disable_device(pdev);
 	if (system_state == SYSTEM_POWER_OFF) {
 		if (pci_enable_wake(pdev, PCI_D3cold, np->wolenabled))

:040000 040000 8c603aa1f71b79f3f4a94bef066a830a249c8d2a e85d84f3c509421a33fd4b71bacddeb4b9fbe896 M drivers

Reverting that patch on top of drivers/net/forcedeth.c from 2.6.28.2
resolves the problem for me.
I DON'T use kexec, just simple poweroff.

BYtE
Philipp
-- 
  / /  (_)__  __ ____  __ Philipp Hahn
 / /__/ / _ \/ // /\ \/ /
/____/_/_//_/\_,_/ /_/\_\ pmhahn@titan.lahn.de

         reply	other threads:[~2009-01-29  6:58 UTC|newest]

Thread overview: 121+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-04 10:55 2.6.29-rc3-git6: Reported regressions 2.6.27 -> 2.6.28 Rafael J. Wysocki
2009-02-04 10:55 ` Rafael J. Wysocki
2009-01-29  6:31 ` Philipp Matthias Hahn [this message]
2009-01-30  6:53   ` WOL with forcedeth broken since f55c21fd9a92a444e55ad1ca4e4732d56661bf2e Yinghai Lu
2009-01-30  8:35     ` Yinghai Lu
2009-01-30 21:20       ` Rafael J. Wysocki
2009-02-05 23:23     ` Philipp Matthias Hahn
     [not found]       ` <20090205232343.GA9455-isSyJ6YaLy+zQB+pC5nmwQ@public.gmane.org>
2009-02-05 23:35         ` Yinghai Lu
2009-02-05 23:35           ` Yinghai Lu
     [not found]           ` <200902060113.31651.rjw-KKrjLPT3xs0@public.gmane.org>
     [not found]             ` <86802c440902051535n118339bes88ae48a54ce4711a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-02-06  5:33               ` Philipp Matthias Hahn
2009-02-06  5:33                 ` Philipp Matthias Hahn
     [not found]                 ` <20090206053320.GA4369-isSyJ6YaLy+zQB+pC5nmwQ@public.gmane.org>
2009-02-06  6:59                   ` Philipp Matthias Hahn
2009-02-06  6:59                     ` Philipp Matthias Hahn
     [not found]                     ` <20090206065912.GA3614-isSyJ6YaLy+zQB+pC5nmwQ@public.gmane.org>
2009-02-07  8:34                       ` Philipp Matthias Hahn
2009-02-07  8:34                         ` Philipp Matthias Hahn
2009-02-06  0:13         ` Rafael J. Wysocki
2009-02-06  0:13           ` Rafael J. Wysocki
2009-02-08 15:18   ` Tobias Diedrich
2009-02-08 16:52     ` Tobias Diedrich
2009-02-09  7:28       ` Philipp Matthias Hahn
2009-02-04 10:56 ` [Bug #11849] default IRQ affinity change in v2.6.27 (breaking several SMP PPC based systems) Rafael J. Wysocki
2009-02-04 10:56   ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12061] snd_hda_intel: power_save: sound cracks on powerdown Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12159] 2.6.28-rc6-git1 -- No sound produced from Intel HDA ALSA driver Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-04 13:37   ` Miles Lane
2009-02-04 13:37     ` Miles Lane
     [not found]     ` <a44ae5cd0902040537i2b3e074asd13d30eec68e9749-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-02-05  1:29       ` Rafael J. Wysocki
2009-02-05  1:29         ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12160] networking oops after resume from s2ram (2.6.28-rc6) Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12208] uml is very slow on 2.6.28 host Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12224] journal activity on inactive partition causes inactive harddrive spinup Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-05  2:00   ` Theodore Tso
2009-02-05  2:00     ` Theodore Tso
     [not found]     ` <20090205020013.GG8945-3s7WtUTddSA@public.gmane.org>
2009-02-05  2:36       ` Andrew Morton
2009-02-05  2:36         ` Andrew Morton
2009-02-04 10:58 ` [Bug #12209] oldish top core dumps (in its meminfo() function) Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12263] Sata soft reset filling log Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12265] FPU emulation broken in 2.6.28-rc8 ? Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12264] i915: switching from kwin in opengl mode to a VT then back to x11, x11 freezes Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12337] ~100 extra wakeups reported by powertop Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12391] Processor does not go below C2 state until usb.autosuspend is enabled Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12393] debugging in dosemu causes lots of 'scheduling while atomic' Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-05  2:44   ` Michal Suchanek
2009-02-05  2:44     ` Michal Suchanek
2009-02-05 16:09     ` Rafael J. Wysocki
     [not found]       ` <200902051709.12967.rjw-KKrjLPT3xs0@public.gmane.org>
2009-02-05 16:25         ` Ray Lee
2009-02-05 16:25           ` Ray Lee
2009-02-04 10:58 ` [Bug #12395] 2.6.28-rc9: oprofile regression Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12396] hwinfo problem since 2.6.28 Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-04 14:03   ` Beschorner Daniel
2009-02-04 14:03     ` Beschorner Daniel
     [not found]     ` <3C59DB883F7B0B4D8096010D45ACCD13C73F15-Sam9BAjTPTxs8csZZ0N3xWZHpeb/A1Y/@public.gmane.org>
2009-02-05  1:32       ` Rafael J. Wysocki
2009-02-05  1:32         ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12401] 2.6.28 regression: xbacklight broken on ThinkPad X61s Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12404] Oops in 2.6.28-rc9 and -rc8 -- mtrr issues / e1000e Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12405] oops in __bounce_end_io_read under kvm Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-06  8:13   ` Christoph Hellwig
2009-02-06  8:13     ` Christoph Hellwig
     [not found]     ` <20090206081302.GB31358-jcswGhMUV9g@public.gmane.org>
2009-02-06 15:46       ` Rafael J. Wysocki
2009-02-06 15:46         ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12403] TTY problem on linux-2.6.28-rc7 Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12406] 2.6.28 thinks that my PS/2 mouse is a touchpad Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12407] Kernel 2.6.28 regression: Hang after hibernate Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12408] Funny problem with 2.6.28: Kernel stalls Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12409] NULL pointer dereference at get_stats() Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12411] 2.6.28: BUG in r8169 Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12426] TMDC Joystick no longer works in kernel 2.6.28 Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-04 13:54   ` Jiri Kosina
2009-02-04 13:54     ` Jiri Kosina
     [not found]     ` <alpine.LRH.1.10.0902041453190.22097-1ReQVI26iDCaZKY3DrU6dA@public.gmane.org>
2009-02-05  1:34       ` Rafael J. Wysocki
2009-02-05  1:34         ` Rafael J. Wysocki
     [not found]         ` <200902050234.56056.rjw-KKrjLPT3xs0@public.gmane.org>
2009-02-06 14:09           ` Andrew S. Johnson
2009-02-06 14:09             ` Andrew S. Johnson
     [not found]             ` <200902060809.21985.andy-9eXmkf4BiQ2aMJb+Lgu22Q@public.gmane.org>
2009-02-06 15:11               ` Jiri Kosina
2009-02-06 15:11                 ` Jiri Kosina
2009-02-04 10:58 ` [Bug #12465] KVM guests stalling on 2.6.28 (bisected) Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-05 19:35   ` Kevin Shanahan
2009-02-05 19:35     ` Kevin Shanahan
     [not found]     ` <1233862503.4823.1.camel-9TBizaOOD0ujuAshGpSIhRCuuivNXqWP@public.gmane.org>
2009-02-05 22:37       ` Rafael J. Wysocki
2009-02-05 22:37         ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12500] r8169: NETDEV WATCHDOG: eth0 (r8169): transmit timed out Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12520] Cannot boot 2.6.28 under Dell OptiPlex 960 Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12559] Huawei E169 doesn't work as mass storage anymore Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12612] hard lockup when interrupting cdda2wav Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-05 13:16   ` Matthias Reichl
2009-02-05 13:16     ` Matthias Reichl
2009-02-05 16:10     ` Rafael J. Wysocki
     [not found]     ` <20090205131644.GA5731-vtPv7MOkFPkAvxtiuMwx3w@public.gmane.org>
2009-02-06  7:33       ` FUJITA Tomonori
2009-02-06  7:33         ` FUJITA Tomonori
2009-02-04 10:58 ` [Bug #12614] WOL with forcedeth broken since f55c21fd9a92a444e55ad1ca4e4732d56661bf2e Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki
2009-02-04 10:58 ` [Bug #12619] Regression 2.6.28 and last - boot failed Rafael J. Wysocki
2009-02-04 10:58   ` Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090129063118.GA3586@pmhahn.de \
    --to=pmhahn@titan.lahn.de \
    --cc=aabdulla@nvidia.com \
    --cc=jeff@garzik.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ranma+kernel@tdiedrich.de \
    --cc=rjw@sisk.pl \
    --cc=yhlu.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.