r8169: remember WOL preferences on driver load
PATCH 1/1 r8169: remember WOL preferences on driver load
From: Peter Wu <[email protected]>
Do not clear Broadcast/Multicast/Unicast Wake Flag or LanWake in Config5. This is necessary to preserve WOL state when the driver is loaded. Although the r8168 vendor driver does not write Config5 (it has been commented out), Hayes Wang from Realtek said that masking bits like this is more sensible.
--- drivers/net/ethernet/realtek/r8169.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/realtek/r8169.c +1 -1
@@ -7092,7 +7092,7 @@ rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)RTL_W8 (Cfg9346, Cfg9346_Unlock);RTL_W8 (Config1,RTL_R8 (Config1) | PMEnable); -RTL_W8 (Config5,RTL_R8 (Config5) & PMEStatus); +RTL_W8 (Config5,RTL_R8 (Config5) & (BWF |MWF |UWF | LanWake | PMEStatus));if ((RTL_R8 (Config3) & (LinkUp | MagicPacket)) !=0 ) tp->features |=RTL_FEATURE_WOL ;if ((RTL_R8 (Config5) & (UWF |BWF |MWF )) !=0 )
Signature · 1 line
1.8.3.4
David Miller
maintainerFrom: Peter Wu <[email protected]>
Date: Sat, 17 Aug 2013 11:00:02 +0200
Quoted 9 lines
From: Peter Wu <[email protected]>
Do not clear Broadcast/Multicast/Unicast Wake Flag or LanWake in Config5. This is necessary to preserve WOL state when the driver is loaded. Although the r8168 vendor driver does not write Config5 (it has been commented out), Hayes Wang from Realtek said that masking bits like this is more sensible.
Signed-off-by Peter Wu <[email protected]>
Can I get some reviews and Ack's for this?
Thanks.
Francois Romieu
Acked-byDavid Miller <[email protected]> :
[...]
Quoted 3 lines
Quoted 1 line
Signed-off-by Peter Wu <[email protected]>Can I get some reviews and Ack's for this?
It's more consistent with the {get / set}_wol parts of the driver and it's done in a way both Hayes and myself agreed on during the previous messages.
So you can consider it:
Signature · 1 line
Ueimor
From: Francois Romieu <[email protected]>
Date: Wed, 21 Aug 2013 01:12:01 +0200
Quoted 6 lines
David Miller <[email protected]> :
[...]Quoted 3 lines
Quoted 1 line
Signed-off-by Peter Wu <[email protected]>Can I get some reviews and Ack's for this?
Quoted 7 lines
It's more consistent with the {get / set}_wol parts of the driver and it's done in a way both Hayes and myself agreed on during the previous messages.
So you can consider it:
Acked-by Francois Romieu <[email protected]>
Thanks, applied.