Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Heiner Kallweit and committed by
David S. Miller
edcde3ee 91c6bfb8

+6 -2
+6 -2
drivers/net/ethernet/realtek/r8169_main.c
··· 1414 1414 } 1415 1415 1416 1416 switch (tp->mac_version) { 1417 - case RTL_GIGA_MAC_VER_02 ... RTL_GIGA_MAC_VER_17: 1417 + case RTL_GIGA_MAC_VER_02 ... RTL_GIGA_MAC_VER_06: 1418 1418 options = RTL_R8(tp, Config1) & ~PMEnable; 1419 1419 if (wolopts) 1420 1420 options |= PMEnable; 1421 1421 RTL_W8(tp, Config1, options); 1422 1422 break; 1423 - default: 1423 + case RTL_GIGA_MAC_VER_34: 1424 + case RTL_GIGA_MAC_VER_37: 1425 + case RTL_GIGA_MAC_VER_39 ... RTL_GIGA_MAC_VER_51: 1424 1426 options = RTL_R8(tp, Config2) & ~PME_SIGNAL; 1425 1427 if (wolopts) 1426 1428 options |= PME_SIGNAL; 1427 1429 RTL_W8(tp, Config2, options); 1430 + break; 1431 + default: 1428 1432 break; 1429 1433 } 1430 1434