2007-05-21 19:25:25

by Chris Wright

[permalink] [raw]
Subject: [patch 19/69] skge: default WOL should be magic only (rev2)

-stable review patch. If anyone has any objections, please let us know.
---------------------

From: Stephen Hemminger <[email protected]>

By default, the skge driver now enables wake on magic and wake on PHY.
This is a bad default (bug), wake on PHY means machine will never shutdown
if connected to a switch.

Signed-off-by: Stephen Hemminger <[email protected]>
Signed-off-by: Chris Wright <[email protected]>

---
drivers/net/skge.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

--- linux-2.6.21.1.orig/drivers/net/skge.c
+++ linux-2.6.21.1/drivers/net/skge.c
@@ -3583,7 +3583,9 @@ static struct net_device *skge_devinit(s
skge->duplex = -1;
skge->speed = -1;
skge->advertising = skge_supported_modes(hw);
- skge->wol = pci_wake_enabled(hw->pdev) ? wol_supported(hw) : 0;
+
+ if (pci_wake_enabled(hw->pdev))
+ skge->wol = wol_supported(hw) & WAKE_MAGIC;

hw->dev[port] = dev;


--