All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2] r8169: fix RTL8117 Wake-on-Lan in DASH mode
@ 2025-12-02 15:16 René Rebe
  2025-12-02 17:19 ` Heiner Kallweit
  0 siblings, 1 reply; 6+ messages in thread
From: René Rebe @ 2025-12-02 15:16 UTC (permalink / raw)
  To: netdev; +Cc: Heiner Kallweit, nic_swsd

Wake-on-Lan does currently not work in DASH mode, e.g. the ASUS Pro WS
X570-ACE with RTL8168fp/RTL8117.

Fix by not returning early in rtl_prepare_power_down when dash_enabled.
While this fixes WoL, it still kills the OOB RTL8117 remote management
BMC connection. Fix by not calling rtl8168_driver_stop if WoL is enabled.

Fixes: 065c27c184d6 ("r8169: phy power ops")
Signed-off-by: René Rebe <rene@exactco.de>
---
V2; DASH WoL fix only
Tested on ASUS Pro WS X570-ACE with RTL8168fp/RTL8117 running T2/Linux.
---
 drivers/net/ethernet/realtek/r8169_main.c | 5 +----
 1 file changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 853aabedb128..e2f9b9027fe2 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -2669,9 +2669,6 @@ static void rtl_wol_enable_rx(struct rtl8169_private *tp)
 
 static void rtl_prepare_power_down(struct rtl8169_private *tp)
 {
-	if (tp->dash_enabled)
-		return;
-
 	if (tp->mac_version == RTL_GIGA_MAC_VER_32 ||
 	    tp->mac_version == RTL_GIGA_MAC_VER_33)
 		rtl_ephy_write(tp, 0x19, 0xff64);
@@ -4807,7 +4804,7 @@ static void rtl8169_down(struct rtl8169_private *tp)
 	rtl_disable_exit_l1(tp);
 	rtl_prepare_power_down(tp);
 
-	if (tp->dash_type != RTL_DASH_NONE)
+	if (tp->dash_type != RTL_DASH_NONE && !tp->saved_wolopts)
 		rtl8168_driver_stop(tp);
 }
 
-- 
2.46.0

-- 
René Rebe, ExactCODE GmbH, Berlin, Germany
https://exactco.dehttps://t2linux.comhttps://patreon.com/renerebe

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH V2] r8169: fix RTL8117 Wake-on-Lan in DASH mode
  2025-12-02 15:16 [PATCH V2] r8169: fix RTL8117 Wake-on-Lan in DASH mode René Rebe
@ 2025-12-02 17:19 ` Heiner Kallweit
  2025-12-02 17:45   ` René Rebe
  0 siblings, 1 reply; 6+ messages in thread
From: Heiner Kallweit @ 2025-12-02 17:19 UTC (permalink / raw)
  To: René Rebe, netdev; +Cc: nic_swsd

On 12/2/2025 4:16 PM, René Rebe wrote:
> Wake-on-Lan does currently not work in DASH mode, e.g. the ASUS Pro WS
> X570-ACE with RTL8168fp/RTL8117.
> 
> Fix by not returning early in rtl_prepare_power_down when dash_enabled.
> While this fixes WoL, it still kills the OOB RTL8117 remote management
> BMC connection. Fix by not calling rtl8168_driver_stop if WoL is enabled.
> 
> Fixes: 065c27c184d6 ("r8169: phy power ops")
> Signed-off-by: René Rebe <rene@exactco.de>
> ---
> V2; DASH WoL fix only
> Tested on ASUS Pro WS X570-ACE with RTL8168fp/RTL8117 running T2/Linux.
> ---
>  drivers/net/ethernet/realtek/r8169_main.c | 5 +----
>  1 file changed, 1 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
> index 853aabedb128..e2f9b9027fe2 100644
> --- a/drivers/net/ethernet/realtek/r8169_main.c
> +++ b/drivers/net/ethernet/realtek/r8169_main.c
> @@ -2669,9 +2669,6 @@ static void rtl_wol_enable_rx(struct rtl8169_private *tp)
>  
>  static void rtl_prepare_power_down(struct rtl8169_private *tp)
>  {
> -	if (tp->dash_enabled)
> -		return;
> -
>  	if (tp->mac_version == RTL_GIGA_MAC_VER_32 ||
>  	    tp->mac_version == RTL_GIGA_MAC_VER_33)
>  		rtl_ephy_write(tp, 0x19, 0xff64);
> @@ -4807,7 +4804,7 @@ static void rtl8169_down(struct rtl8169_private *tp)
>  	rtl_disable_exit_l1(tp);
>  	rtl_prepare_power_down(tp);
>  
> -	if (tp->dash_type != RTL_DASH_NONE)
> +	if (tp->dash_type != RTL_DASH_NONE && !tp->saved_wolopts)
>  		rtl8168_driver_stop(tp);
>  }
>  

Patch itself is fine with me. ToDo's:
- target net tree
- cc stable
- include all maintainers / blamed authors
  -> get_maintainer.pl

--
pw-bot: cr

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V2] r8169: fix RTL8117 Wake-on-Lan in DASH mode
  2025-12-02 17:19 ` Heiner Kallweit
@ 2025-12-02 17:45   ` René Rebe
  2025-12-02 18:06     ` Heiner Kallweit
  0 siblings, 1 reply; 6+ messages in thread
From: René Rebe @ 2025-12-02 17:45 UTC (permalink / raw)
  To: hkallweit1; +Cc: netdev, nic_swsd

On Tue, 2 Dec 2025 18:19:02 +0100, Heiner Kallweit <hkallweit1@gmail.com> wrote:

> On 12/2/2025 4:16 PM, René Rebe wrote:
> > Wake-on-Lan does currently not work in DASH mode, e.g. the ASUS Pro WS
> > X570-ACE with RTL8168fp/RTL8117.
> > 
> > Fix by not returning early in rtl_prepare_power_down when dash_enabled.
> > While this fixes WoL, it still kills the OOB RTL8117 remote management
> > BMC connection. Fix by not calling rtl8168_driver_stop if WoL is enabled.
> > 
> > Fixes: 065c27c184d6 ("r8169: phy power ops")
> > Signed-off-by: René Rebe <rene@exactco.de>
> > ---
> > V2; DASH WoL fix only
> > Tested on ASUS Pro WS X570-ACE with RTL8168fp/RTL8117 running T2/Linux.
> > ---
> >  drivers/net/ethernet/realtek/r8169_main.c | 5 +----
> >  1 file changed, 1 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
> > index 853aabedb128..e2f9b9027fe2 100644
> > --- a/drivers/net/ethernet/realtek/r8169_main.c
> > +++ b/drivers/net/ethernet/realtek/r8169_main.c
> > @@ -2669,9 +2669,6 @@ static void rtl_wol_enable_rx(struct rtl8169_private *tp)
> >  
> >  static void rtl_prepare_power_down(struct rtl8169_private *tp)
> >  {
> > -	if (tp->dash_enabled)
> > -		return;
> > -
> >  	if (tp->mac_version == RTL_GIGA_MAC_VER_32 ||
> >  	    tp->mac_version == RTL_GIGA_MAC_VER_33)
> >  		rtl_ephy_write(tp, 0x19, 0xff64);
> > @@ -4807,7 +4804,7 @@ static void rtl8169_down(struct rtl8169_private *tp)
> >  	rtl_disable_exit_l1(tp);
> >  	rtl_prepare_power_down(tp);
> >  
> > -	if (tp->dash_type != RTL_DASH_NONE)
> > +	if (tp->dash_type != RTL_DASH_NONE && !tp->saved_wolopts)
> >  		rtl8168_driver_stop(tp);
> >  }
> >  
> 
> Patch itself is fine with me. ToDo's:
> - target net tree

What is the difference? The patch clearly git am applies to the net
tree with zero fuzz, not?

> - cc stable

I was under the impression this is automatic when patches are merged
with Fixes:, no? Do I need to manually cc stable? Nobody ever asked me
for that before.

> - include all maintainers / blamed authors
>   -> get_maintainer.pl

Of course I used get_maintainers.pl and thought I included all
relevant. I surely can include all of them it spits out. I usually
filter to the relevant ones to keep the noise level down.

	  René

-- 
René Rebe, ExactCODE GmbH, Berlin, Germany
https://exactco.dehttps://t2linux.comhttps://patreon.com/renerebe

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V2] r8169: fix RTL8117 Wake-on-Lan in DASH mode
  2025-12-02 17:45   ` René Rebe
@ 2025-12-02 18:06     ` Heiner Kallweit
  2025-12-04 15:32       ` Phil Sutter
  0 siblings, 1 reply; 6+ messages in thread
From: Heiner Kallweit @ 2025-12-02 18:06 UTC (permalink / raw)
  To: René Rebe; +Cc: netdev, nic_swsd

On 12/2/2025 6:45 PM, René Rebe wrote:
> On Tue, 2 Dec 2025 18:19:02 +0100, Heiner Kallweit <hkallweit1@gmail.com> wrote:
> 
>> On 12/2/2025 4:16 PM, René Rebe wrote:
>>> Wake-on-Lan does currently not work in DASH mode, e.g. the ASUS Pro WS
>>> X570-ACE with RTL8168fp/RTL8117.
>>>
>>> Fix by not returning early in rtl_prepare_power_down when dash_enabled.
>>> While this fixes WoL, it still kills the OOB RTL8117 remote management
>>> BMC connection. Fix by not calling rtl8168_driver_stop if WoL is enabled.
>>>
>>> Fixes: 065c27c184d6 ("r8169: phy power ops")
>>> Signed-off-by: René Rebe <rene@exactco.de>
>>> ---
>>> V2; DASH WoL fix only
>>> Tested on ASUS Pro WS X570-ACE with RTL8168fp/RTL8117 running T2/Linux.
>>> ---
>>>  drivers/net/ethernet/realtek/r8169_main.c | 5 +----
>>>  1 file changed, 1 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
>>> index 853aabedb128..e2f9b9027fe2 100644
>>> --- a/drivers/net/ethernet/realtek/r8169_main.c
>>> +++ b/drivers/net/ethernet/realtek/r8169_main.c
>>> @@ -2669,9 +2669,6 @@ static void rtl_wol_enable_rx(struct rtl8169_private *tp)
>>>  
>>>  static void rtl_prepare_power_down(struct rtl8169_private *tp)
>>>  {
>>> -	if (tp->dash_enabled)
>>> -		return;
>>> -
>>>  	if (tp->mac_version == RTL_GIGA_MAC_VER_32 ||
>>>  	    tp->mac_version == RTL_GIGA_MAC_VER_33)
>>>  		rtl_ephy_write(tp, 0x19, 0xff64);
>>> @@ -4807,7 +4804,7 @@ static void rtl8169_down(struct rtl8169_private *tp)
>>>  	rtl_disable_exit_l1(tp);
>>>  	rtl_prepare_power_down(tp);
>>>  
>>> -	if (tp->dash_type != RTL_DASH_NONE)
>>> +	if (tp->dash_type != RTL_DASH_NONE && !tp->saved_wolopts)
>>>  		rtl8168_driver_stop(tp);
>>>  }
>>>  
>>
>> Patch itself is fine with me. ToDo's:
>> - target net tree
> 
> What is the difference? The patch clearly git am applies to the net
> tree with zero fuzz, not?
> 
See netdev-FAQ. Always annotate whether you target net or net-next tree.

>> - cc stable
> 
> I was under the impression this is automatic when patches are merged
> with Fixes:, no? Do I need to manually cc stable? Nobody ever asked me
> for that before.
> 
https://docs.kernel.org/process/maintainer-netdev.html
See 1.5.7

>> - include all maintainers / blamed authors
>>   -> get_maintainer.pl
> 
> Of course I used get_maintainers.pl and thought I included all
> relevant. I surely can include all of them it spits out. I usually
> filter to the relevant ones to keep the noise level down.
> 
Please include all of them. CI also checks for it.

> 	  René
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V2] r8169: fix RTL8117 Wake-on-Lan in DASH mode
  2025-12-02 18:06     ` Heiner Kallweit
@ 2025-12-04 15:32       ` Phil Sutter
  2025-12-04 20:18         ` Heiner Kallweit
  0 siblings, 1 reply; 6+ messages in thread
From: Phil Sutter @ 2025-12-04 15:32 UTC (permalink / raw)
  To: Heiner Kallweit; +Cc: René Rebe, netdev, nic_swsd

On Tue, Dec 02, 2025 at 07:06:02PM +0100, Heiner Kallweit wrote:
> On 12/2/2025 6:45 PM, René Rebe wrote:
> > On Tue, 2 Dec 2025 18:19:02 +0100, Heiner Kallweit <hkallweit1@gmail.com> wrote:
[...]
> >> - cc stable
> > 
> > I was under the impression this is automatic when patches are merged
> > with Fixes:, no? Do I need to manually cc stable? Nobody ever asked me
> > for that before.
> > 
> https://docs.kernel.org/process/maintainer-netdev.html
> See 1.5.7

Which points to
https://docs.kernel.org/process/stable-kernel-rules.html#stable-kernel-rules
and the Option 1 instructions read: "Note, such tagging is unnecessary
if the stable team can derive the appropriate versions from Fixes:
tags."

Cheers, Phil

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V2] r8169: fix RTL8117 Wake-on-Lan in DASH mode
  2025-12-04 15:32       ` Phil Sutter
@ 2025-12-04 20:18         ` Heiner Kallweit
  0 siblings, 0 replies; 6+ messages in thread
From: Heiner Kallweit @ 2025-12-04 20:18 UTC (permalink / raw)
  To: Phil Sutter, René Rebe, netdev, nic_swsd

On 12/4/2025 4:32 PM, Phil Sutter wrote:
> On Tue, Dec 02, 2025 at 07:06:02PM +0100, Heiner Kallweit wrote:
>> On 12/2/2025 6:45 PM, René Rebe wrote:
>>> On Tue, 2 Dec 2025 18:19:02 +0100, Heiner Kallweit <hkallweit1@gmail.com> wrote:
> [...]
>>>> - cc stable
>>>
>>> I was under the impression this is automatic when patches are merged
>>> with Fixes:, no? Do I need to manually cc stable? Nobody ever asked me
>>> for that before.
>>>
>> https://docs.kernel.org/process/maintainer-netdev.html
>> See 1.5.7
> 
> Which points to
> https://docs.kernel.org/process/stable-kernel-rules.html#stable-kernel-rules
> and the Option 1 instructions read: "Note, such tagging is unnecessary
> if the stable team can derive the appropriate versions from Fixes:
> tags."
> 
This is about something different. "such tagging" refers to providing
applicable kernel versions like in the example:
Cc: <stable@vger.kernel.org> # 3.3.x

> Cheers, Phil


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-12-04 20:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-02 15:16 [PATCH V2] r8169: fix RTL8117 Wake-on-Lan in DASH mode René Rebe
2025-12-02 17:19 ` Heiner Kallweit
2025-12-02 17:45   ` René Rebe
2025-12-02 18:06     ` Heiner Kallweit
2025-12-04 15:32       ` Phil Sutter
2025-12-04 20:18         ` Heiner Kallweit

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.