[BUG] sky2 wol broken for Marvell 88E8053 rev 19

From: Knut Petersen
Date: Wed Nov 02 2011 - 10:17:10 EST


WOL is broken on an AOpen i915GMm-hfs mobo with kernel 3.1.

lspci
===
02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller (rev 19)
Subsystem: AOPEN Inc. Marvell 88E8053 Gigabit Ethernet Controller (Aopen)
Flags: bus master, fast devsel, latency 0, IRQ 44
Memory at d0020000 (64-bit, non-prefetchable) [size=16K]
I/O ports at c000 [size=256]
[virtual] Expansion ROM at 80900000 [disabled] [size=128K]
Capabilities: [48] Power Management version 2
Capabilities: [50] Vital Product Data
Capabilities: [5c] MSI: Enable+ Count=1/2 Maskable- 64bit+
Capabilities: [e0] Express Legacy Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Kernel driver in use: sky2

03:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller (rev 19)
Subsystem: AOPEN Inc. Marvell 88E8053 Gigabit Ethernet Controller (Aopen)
Flags: bus master, fast devsel, latency 0, IRQ 45
Memory at d0120000 (64-bit, non-prefetchable) [size=16K]
I/O ports at d000 [size=256]
[virtual] Expansion ROM at 80600000 [disabled] [size=128K]
Capabilities: [48] Power Management version 2
Capabilities: [50] Vital Product Data
Capabilities: [5c] MSI: Enable+ Count=1/2 Maskable- 64bit+
Capabilities: [e0] Express Legacy Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Kernel driver in use: sky2

fix:
==

WOL does work with the following two changes:

diff original/drivers/net/sky2.c new/drivers/net/sky2.c
826a827
> u32 reg1;
878a880,884
>
> /* Turn on legacy PCI-Express PME mode */
> reg1 = sky2_pci_read32(hw, PCI_DEV_REG1);
> reg1 |= PCI_Y2_PME_LEGACY;
> sky2_pci_write32(hw, PCI_DEV_REG1, reg1);

diff original/drivers/net/sky2.h new/drivers/net/sky2.h
374,375c374,375
< Y2_HW_WOL_ON = 1<<15,/* HW WOL On (Yukon-EC Ultra A1 only) */
< Y2_HW_WOL_OFF = 1<<14,/* HW WOL On (Yukon-EC Ultra A1 only) */
---
> Y2_HW_WOL_OFF = 1<<15,/* HW WOL On (Yukon-EC Ultra A1 only) */
> Y2_HW_WOL_ON = 1<<14,/* HW WOL On (Yukon-EC Ultra A1 only) */

The first change reverts commit 87b09f1f25cd1e01d7c50bf423c7fe33027d7511,
both changes are based on suggestions found in the www.

WOL only works here if I apply both of them.

Some authors suggest fix 1, some suggested fix 2, I found no msg requesting to
apply both. Several bugzilla references are still unreachable ;-(


So the big question is:
=================

Do those changes fix one system but break other systems?

cu,
Knut
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/