netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Fix forcedeth hibernate/wake-on-lan problems
@ 2008-05-18 12:57 Tobias Diedrich
  2008-05-18 13:00 ` [PATCH 1/4] Restore multicast settings on resume Tobias Diedrich
                   ` (6 more replies)
  0 siblings, 7 replies; 26+ messages in thread
From: Tobias Diedrich @ 2008-05-18 12:57 UTC (permalink / raw)
  To: netdev, linux-kernel, Ayaz Abdulla, Rafael J. Wysocki,
	Stephen Hemminger

The following patch series fixes hibernate/wake-on-lan for my
System (Asus M2N-SLI Deluxe, Dual MCP55 Gigabit Ethernet).

See also http://bugzilla.kernel.org/show_bug.cgi?id=8381
"(net forcedeth) doesn't wol on suspend".

Note that so far this is only tested on my system with hibernate
using the 'shutdown' method.

The local setup combines the two onboard nforce gigabit interfaces
eth0 and eth1 into a bridge br0, so it doesn't matter which port I
plug the cable into.  The bridging means eth0 and eth1 normally
operate in promiscous mode.

The initial situation (unpatched driver) was as follows:
After a normal boot, turning on wol and sending the system into
hibernate, waking it up with etherwake works as expected.
However, after waking up (be it via wol or via manual poweron)
from hibernate network connectivity is down.

This is because 1) the mac address is now swapped and 2) promiscous
mode is not restored.

The first patch addresses 2)

After this patch wake-on-lan stops working, since in 'shutdown' mode
the suspend callback of the device does not get called again before
poweroff and promiscous mode is apparently incompatible with wol.

So the second patch introduces a shutdown handler, which prepares
the device for wake-on-lan before the system is powered off.

Now waking the system up works again, but the 'swapped mac' problem
is still there.

The reason for this is that in my case the MCP55 is not flagged as
'DEV_HAS_CORRECT_MACADDR' and 'NVREG_TRANSMITPOLL_MAC_ADDR_REV' is
not set by the bios, so in nv_probe during the initial loading of
the driver the MAC address is read in reversed order and
NVREG_TRANSMITPOLL_MAC_ADDR_REV is set.
However during hibernate the device configuration space is lost
(reset do BIOS defaults) and so we get the reversed MAC again, but
resume unconditionally sets NVREG_TRANSMITPOLL_MAC_ADDR_REV, which
means we now have effectively swapped the MAC.

The third patch fixes this by saving and restoring the
configuration space between suspend and resume.

The fourth (optional) patch reorders the code in suspend/resume to
match the order in e100/e1000e more closely, since I think the
latter order is more correct.
For example the configuration space should be saved on suspend even
for devices that are not up.

-- 
Tobias						PGP: http://9ac7e0bc.uguu.de
このメールは十割再利用されたビットで作られています。

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2008-06-27  6:10 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-18 12:57 [PATCH 0/4] Fix forcedeth hibernate/wake-on-lan problems Tobias Diedrich
2008-05-18 13:00 ` [PATCH 1/4] Restore multicast settings on resume Tobias Diedrich
2008-05-22 10:21   ` Jeff Garzik
2008-05-18 13:02 ` [PATCH 2/4] setup wake-on-lan before shutting down Tobias Diedrich
2008-05-31  2:20   ` Jeff Garzik
2008-05-18 13:03 ` [PATCH 3/4] save/restore device configuration space Tobias Diedrich
2008-05-18 13:04 ` [PATCH 4/4] reorder suspend/resume code Tobias Diedrich
2008-05-18 15:09 ` [PATCH 0/4] Fix forcedeth hibernate/wake-on-lan problems Tobias Diedrich
2008-05-20 22:39   ` Rafael J. Wysocki
2008-05-25 15:04   ` Tobias Diedrich
2008-05-25 18:13     ` Tobias Diedrich
2008-05-27  6:21       ` Tobias Diedrich
2008-05-27 21:32         ` David Brownell
2008-05-31  7:20           ` Pavel Machek
2008-06-05  2:38             ` David Brownell
2008-05-31 22:12         ` Tobias Diedrich
2008-06-01  2:51           ` [linux-pm] " Alan Stern
2008-06-01  7:49             ` Tobias Diedrich
2008-06-02 21:09               ` Alan Stern
2008-06-03  6:16                 ` Tobias Diedrich
2008-06-03 14:12                   ` Alan Stern
2008-06-03 17:30                     ` Tobias Diedrich
2008-06-03 20:06                       ` Alan Stern
2008-05-31 22:54 ` [PATCH 5/4] " Tobias Diedrich
2008-06-27  6:09   ` Jeff Garzik
2008-05-31 23:20 ` [PATCH 6/4] " Tobias Diedrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).