[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#647560: [squeeze] sky2: Wake on Lan is broken on ASUS P5LD2 motherboard with Marvell 88E8053 rev 19 (Re: Patch tested and working)



clone 647560 -1
tags -1 = upstream
retitle -1 sky2: Wake on Lan is broken on ASUS P5LD2 motherboard with Marvell 88E8053 rev 19
retitle 647560 [squeeze] please apply 5676cc7bfe1e (sky2: override for PCI legacy power management)
tags 647560 - moreinfo
# v3.2.14~10
fixed 647560 linux-2.6/3.2.14-1
quit

dilieto@lineone.net wrote:

> I created a new file /etc/modprobe.d/sky2.conf with a single line as 
> follows
>
> options sky2 legacy_pme=1
>
> With the file it works. If I remove 
> it, it doesn't as before.

Ok, excellent.

> Hope this helps, looking forward to see it 
> fixed in the stable kernel so I don't need to patch it every time a new 
> security update is released.

Yes, agreed.  I'm cloning the bug so we can separately track ways to
automatically set that parameter.

Patch applying 5676cc7bfe1e to the packaging repo attached for
convenience.

Jonathan
Index: debian/changelog
===================================================================
--- debian/changelog	(revision 18985)
+++ debian/changelog	(working copy)
@@ -1,3 +1,10 @@
+linux-2.6 (2.6.32-46) UNRELEASED; urgency=low
+
+  * sky2: Add 'legacy_pme' option for PCI legacy power management
+    (Closes: #647560; works around regression introduced in 2.6.32-22)
+
+ -- Jonathan Nieder <jrnieder@gmail.com>  Sun, 06 May 2012 16:48:30 -0500
+
 linux-2.6 (2.6.32-45) stable; urgency=high
 
   * Avoid ABI change on some archs due to a new #include in the
Index: debian/patches/series/46
===================================================================
--- debian/patches/series/46	(revision 0)
+++ debian/patches/series/46	(working copy)
@@ -0,0 +1 @@
++ features/all/sky2/0057-sky2-override-for-PCI-legacy-power-management.patch
Index: debian/patches/features/all/sky2/0057-sky2-override-for-PCI-legacy-power-management.patch
===================================================================
--- debian/patches/features/all/sky2/0057-sky2-override-for-PCI-legacy-power-management.patch	(revision 0)
+++ debian/patches/features/all/sky2/0057-sky2-override-for-PCI-legacy-power-management.patch	(working copy)
@@ -0,0 +1,52 @@
+From: stephen hemminger <shemminger@vyatta.com>
+Date: Wed, 21 Mar 2012 05:32:05 +0000
+Subject: sky2: override for PCI legacy power management
+
+[ Upstream commit 5676cc7bfe1e388e87843f71daa229610385b41e ]
+
+Some BIOS's don't setup power management correctly (what else is
+new) and don't allow use of PCI Express power control. Add a special
+exception module parameter to allow working around this issue.
+Based on slightly different patch by Knut Petersen.
+
+Reported-by: Arkadiusz Miskiewicz <arekm@maven.pl>
+Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
+---
+ drivers/net/sky2.c |   11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
+index 9c7a89fba483..c4f82be9af89 100644
+--- a/drivers/net/sky2.c
++++ b/drivers/net/sky2.c
+@@ -96,6 +96,10 @@ static int disable_msi = 0;
+ module_param(disable_msi, int, 0);
+ MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)");
+ 
++static int legacy_pme = 0;
++module_param(legacy_pme, int, 0);
++MODULE_PARM_DESC(legacy_pme, "Legacy power management");
++
+ static DEFINE_PCI_DEVICE_TABLE(sky2_id_table) = {
+ 	{ PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9000) }, /* SK-9Sxx */
+ 	{ PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9E00) }, /* SK-9Exx */
+@@ -796,6 +800,13 @@ static void sky2_wol_init(struct sky2_port *sky2)
+ 	/* Disable PiG firmware */
+ 	sky2_write16(hw, B0_CTST, Y2_HW_WOL_OFF);
+ 
++	/* Needed by some broken BIOSes, use PCI rather than PCI-e for WOL */
++	if (legacy_pme) {
++		u32 reg1 = sky2_pci_read32(hw, PCI_DEV_REG1);
++		reg1 |= PCI_Y2_PME_LEGACY;
++		sky2_pci_write32(hw, PCI_DEV_REG1, reg1);
++	}
++
+ 	/* block receiver */
+ 	sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET);
+ }
+-- 
+1.7.10.1
+

Reply to: