Commit edcde3ee authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

r8169: align setting PME with vendor driver

Align setting PME with the vendor driver. PMEnable is writable on
RTL8169 only, on later chip versions it's read-only. PME_SIGNAL is
used on chip versions from RTL8168evl with the exception of the
RTL8168f family.
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 91c6bfb8
...@@ -1414,18 +1414,22 @@ static void __rtl8169_set_wol(struct rtl8169_private *tp, u32 wolopts) ...@@ -1414,18 +1414,22 @@ static void __rtl8169_set_wol(struct rtl8169_private *tp, u32 wolopts)
} }
switch (tp->mac_version) { switch (tp->mac_version) {
case RTL_GIGA_MAC_VER_02 ... RTL_GIGA_MAC_VER_17: case RTL_GIGA_MAC_VER_02 ... RTL_GIGA_MAC_VER_06:
options = RTL_R8(tp, Config1) & ~PMEnable; options = RTL_R8(tp, Config1) & ~PMEnable;
if (wolopts) if (wolopts)
options |= PMEnable; options |= PMEnable;
RTL_W8(tp, Config1, options); RTL_W8(tp, Config1, options);
break; break;
default: case RTL_GIGA_MAC_VER_34:
case RTL_GIGA_MAC_VER_37:
case RTL_GIGA_MAC_VER_39 ... RTL_GIGA_MAC_VER_51:
options = RTL_R8(tp, Config2) & ~PME_SIGNAL; options = RTL_R8(tp, Config2) & ~PME_SIGNAL;
if (wolopts) if (wolopts)
options |= PME_SIGNAL; options |= PME_SIGNAL;
RTL_W8(tp, Config2, options); RTL_W8(tp, Config2, options);
break; break;
default:
break;
} }
rtl_lock_config_regs(tp); rtl_lock_config_regs(tp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment