RE: [PATCH] r8169: remember WOL preferences on driver load
From: hayeswang <hidden>
Date: 2013-08-15 06:09:44
Peter Wu [mailto:lekensteyn@gmail.com]
Sent: Wednesday, August 14, 2013 8:57 PM To: Francois Romieu Cc: netdev@vger.kernel.org; nic_swsd; Hayeswang Subject: Re: [PATCH] r8169: remember WOL preferences on driver load On Tuesday 13 August 2013 23:28:43 Francois Romieu wrote:quoted
quoted
The r8168 vendor driver used to write to both Config1 andConfig5, butquoted
quoted
in recent versions, this is commented out. Here we keepwriting PMEnablequoted
quoted
to Config1 because there may be older chips wherePMEnable is not sticky.quoted
<sneak regression paranoia> Please include the bits you want to keep in the "&" mask. </sneak regression paranoia>I previously tried: RTL_W8(Config5, RTL_R8(Config5) & (BWF | MWF | UWF | LanWake | PMEStatus));
I think this way is better and safe.
but then I realized that the Realtek r8168 vendor driver does not touch this register on load. The bits not included in the above mask are 2, 3 and 7. On most datasheets for recent hardware, these are marked reserved.
Some settings would be in rtl8168_hw_start() for different chips. We sure only correct bit would be enabled. The simple way is to clear bit 2, 3 and 7 for all chips. Or set desired bit which you want. Best Regards, Hayes