Tobias Diedrich 34edaa8832 net: forcedeth: Fix wake-on-lan regression
Commit f55c21fd9a92a444e55ad1ca4e4732d56661bf2e ("forcedeth: call
restore mac addr in nv_shutdown path"), which was introduced to fix
the regression tracked at
http://bugzilla.kernel.org/show_bug.cgi?id=11358 causes the
wake-on-lan mac to be reversed in the shutdown path.  Apparently the
forcedeth situation is rather messy in that the mac we need to
writeback for a subsequent modprobe to work is exactly the reverse of
what is needed for proper wake-on-lan.

The following patch explains the situation in the comments and
makes the call to nv_restore_mac_addr() conditional (only called if
we are not really going for poweroff).

Tobias Diedrich wrote:
> Hmm, I had not tried WOL for some time.
> With 2.6.29-rc3 is see the following behaviour:
> 
> State            WOL Behaviour
> ------------------------------
> shutdown         reversed MAC
> disk/shutdown    reversed MAC
> disk/platform    OK
> 
> Apparently nv_restore_mac_addr() restores the MAC in the wrong order
> for WOL (at least for my PCI_DEVICE_ID_NVIDIA_NVENET_15).  platform
> works, because the MAC is not touched in the nv_suspend() path.
> 
> A possible fix might be to only call nv_restore_mac_addr() if
> system_state != SYSTEM_POWER_OFF.

With the following patch:
shutdown         OK
disk/shutdown    OK
disk/platform    OK
kexec            OK

Signed-off-by: Tobias Diedrich <ranma+kernel@tdiedrich.de>
Tested-by: Philipp Matthias Hahn <pmhahn@titan.lahn.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-16 00:13:20 -08:00
..
2009-01-06 10:41:56 -08:00
2008-12-17 15:37:55 -08:00
2009-02-04 16:31:39 -08:00
2009-01-26 12:16:26 -08:00
2009-02-12 16:42:31 -08:00
2009-01-15 20:43:56 -08:00
2009-02-03 15:13:26 -08:00
2009-01-11 00:06:32 -08:00
2008-12-08 01:14:16 -08:00
2008-11-25 18:12:49 -08:00
2008-10-27 17:06:18 -07:00
2009-01-07 18:09:58 -08:00
2008-11-25 18:25:32 -08:00
2009-01-07 18:10:24 -08:00
2009-02-12 16:53:48 -08:00
2009-02-12 16:53:22 -08:00
2008-08-13 16:05:38 -07:00
2008-08-13 16:05:37 -07:00
2009-01-19 16:20:15 -08:00
2009-01-19 16:20:15 -08:00
2009-01-19 16:20:15 -08:00
2008-09-22 19:27:10 -07:00
2009-01-07 17:34:36 -08:00
2009-01-07 17:34:36 -08:00
2008-11-21 17:31:51 -08:00
2008-02-01 20:54:03 +11:00
2008-11-16 12:41:35 -08:00
2008-11-20 20:28:00 -08:00
2008-12-08 01:14:16 -08:00
2009-01-07 17:30:09 -08:00
2009-01-07 17:27:39 -08:00
2008-11-21 17:37:54 -08:00
2008-11-25 18:23:59 -08:00
2009-01-07 17:57:47 -08:00
2009-01-29 17:31:13 -08:00
2009-01-07 18:13:49 -08:00
2008-11-25 18:24:57 -08:00
2009-01-06 10:47:44 -08:00
2009-01-07 17:26:14 -08:00
2008-08-14 04:26:38 -04:00
2008-10-27 17:06:18 -07:00
2009-01-19 16:23:01 -08:00
2008-12-08 01:14:16 -08:00
2008-11-25 18:24:38 -08:00
2008-10-27 17:06:18 -07:00
2009-01-07 10:00:22 -08:00
2007-10-19 11:53:42 -07:00
2007-04-28 11:01:05 -04:00
2008-12-08 01:14:16 -08:00
2009-01-07 17:57:19 -08:00
2008-11-25 18:23:35 -08:00
2008-10-27 17:06:18 -07:00
2008-03-26 00:18:00 -04:00
2008-03-05 16:34:41 -06:00
2008-12-08 01:14:16 -08:00
2009-01-07 17:26:48 -08:00
2008-12-25 18:03:28 -08:00
2008-01-28 15:11:27 -08:00
2008-12-16 01:23:49 -08:00
2008-10-17 02:38:35 +11:00
2008-10-27 17:06:18 -07:00
2008-11-10 15:11:56 -05:00
2009-01-07 17:56:54 -08:00
2008-08-07 02:20:57 -04:00
2009-01-07 17:35:41 -08:00
2007-10-16 21:10:29 -04:00
2008-08-07 01:55:50 -04:00
2008-01-28 15:11:27 -08:00
2009-01-07 18:09:36 -08:00
2008-10-27 17:06:18 -07:00
2009-01-29 17:30:00 -08:00
2007-07-16 15:02:47 +02:00
2008-04-16 20:06:50 -04:00
2009-01-07 17:58:17 -08:00
2008-11-25 18:25:49 -08:00
2008-12-08 01:14:16 -08:00
2008-12-08 01:14:16 -08:00
2008-08-29 02:13:33 -07:00
2009-01-07 17:58:43 -08:00
2008-01-28 15:07:10 -08:00
2008-08-29 02:14:29 -07:00
2009-02-02 21:39:02 -08:00
2008-08-29 02:14:43 -07:00
2007-10-10 16:51:34 -07:00
2009-02-12 16:33:27 -08:00
2009-01-19 16:57:45 -08:00
2009-01-07 17:27:15 -08:00
2008-05-30 22:18:02 -04:00
2009-02-08 17:49:17 -08:00
2009-01-07 17:29:46 -08:00
2009-01-20 14:44:01 -08:00
2009-01-11 00:06:36 -08:00
2008-10-27 17:06:18 -07:00