* [PATCH net-next] r8169: set EEE speed down ratio to 1
@ 2025-09-04 2:11 ChunHao Lin
2025-09-04 6:16 ` Heiner Kallweit
2025-09-05 19:56 ` Heiner Kallweit
0 siblings, 2 replies; 8+ messages in thread
From: ChunHao Lin @ 2025-09-04 2:11 UTC (permalink / raw)
To: hkallweit1, nic_swsd, andrew+netdev, davem, edumazet, kuba,
pabeni
Cc: netdev, linux-kernel, ChunHao Lin
EEE speed down ratio (mac ocp 0xe056[7:4]) is used to control EEE speed down
rate. The larger this value is, the more power can save. But it actually save
less power then expected, but will impact compatibility. So set it to 1 (mac
ocp 0xe056[7:4] = 0) to improve compatibility.
Signed-off-by: ChunHao Lin <hau@realtek.com>
---
drivers/net/ethernet/realtek/r8169_main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 9c601f271c02..e5427dfce268 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -3409,7 +3409,7 @@ static void rtl_hw_start_8168h_1(struct rtl8169_private *tp)
r8168_mac_ocp_modify(tp, 0xd412, 0x0fff, sw_cnt_1ms_ini);
}
- r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0070);
+ r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0000);
r8168_mac_ocp_modify(tp, 0xe052, 0x6000, 0x8008);
r8168_mac_ocp_modify(tp, 0xe0d6, 0x01ff, 0x017f);
r8168_mac_ocp_modify(tp, 0xd420, 0x0fff, 0x047f);
@@ -3514,7 +3514,7 @@ static void rtl_hw_start_8117(struct rtl8169_private *tp)
r8168_mac_ocp_modify(tp, 0xd412, 0x0fff, sw_cnt_1ms_ini);
}
- r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0070);
+ r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0000);
r8168_mac_ocp_write(tp, 0xea80, 0x0003);
r8168_mac_ocp_modify(tp, 0xe052, 0x0000, 0x0009);
r8168_mac_ocp_modify(tp, 0xd420, 0x0fff, 0x047f);
@@ -3715,7 +3715,7 @@ static void rtl_hw_start_8125_common(struct rtl8169_private *tp)
r8168_mac_ocp_modify(tp, 0xc0b4, 0x0000, 0x000c);
r8168_mac_ocp_modify(tp, 0xeb6a, 0x00ff, 0x0033);
r8168_mac_ocp_modify(tp, 0xeb50, 0x03e0, 0x0040);
- r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0030);
+ r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0000);
r8168_mac_ocp_modify(tp, 0xe040, 0x1000, 0x0000);
r8168_mac_ocp_modify(tp, 0xea1c, 0x0003, 0x0001);
if (tp->mac_version == RTL_GIGA_MAC_VER_70 ||
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH net-next] r8169: set EEE speed down ratio to 1
2025-09-04 2:11 [PATCH net-next] r8169: set EEE speed down ratio to 1 ChunHao Lin
@ 2025-09-04 6:16 ` Heiner Kallweit
2025-09-05 13:43 ` Hau
2025-09-05 19:56 ` Heiner Kallweit
1 sibling, 1 reply; 8+ messages in thread
From: Heiner Kallweit @ 2025-09-04 6:16 UTC (permalink / raw)
To: ChunHao Lin, nic_swsd, andrew+netdev, davem, edumazet, kuba,
pabeni
Cc: netdev, linux-kernel
On 9/4/2025 4:11 AM, ChunHao Lin wrote:
> EEE speed down ratio (mac ocp 0xe056[7:4]) is used to control EEE speed down
> rate. The larger this value is, the more power can save. But it actually save
> less power then expected, but will impact compatibility. So set it to 1 (mac
> ocp 0xe056[7:4] = 0) to improve compatibility.
>
Hi Hau,
what kind of speed is this referring to? Some clock, or link speed, or ..?
Is EEE speed down a Realtek-specific feature?
Are there known issues with the values used currently? Depending on the
answer we might consider this a fix.
Heiner
> Signed-off-by: ChunHao Lin <hau@realtek.com>
> ---
> drivers/net/ethernet/realtek/r8169_main.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
> index 9c601f271c02..e5427dfce268 100644
> --- a/drivers/net/ethernet/realtek/r8169_main.c
> +++ b/drivers/net/ethernet/realtek/r8169_main.c
> @@ -3409,7 +3409,7 @@ static void rtl_hw_start_8168h_1(struct rtl8169_private *tp)
> r8168_mac_ocp_modify(tp, 0xd412, 0x0fff, sw_cnt_1ms_ini);
> }
>
> - r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0070);
> + r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0000);
> r8168_mac_ocp_modify(tp, 0xe052, 0x6000, 0x8008);
> r8168_mac_ocp_modify(tp, 0xe0d6, 0x01ff, 0x017f);
> r8168_mac_ocp_modify(tp, 0xd420, 0x0fff, 0x047f);
> @@ -3514,7 +3514,7 @@ static void rtl_hw_start_8117(struct rtl8169_private *tp)
> r8168_mac_ocp_modify(tp, 0xd412, 0x0fff, sw_cnt_1ms_ini);
> }
>
> - r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0070);
> + r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0000);
> r8168_mac_ocp_write(tp, 0xea80, 0x0003);
> r8168_mac_ocp_modify(tp, 0xe052, 0x0000, 0x0009);
> r8168_mac_ocp_modify(tp, 0xd420, 0x0fff, 0x047f);
> @@ -3715,7 +3715,7 @@ static void rtl_hw_start_8125_common(struct rtl8169_private *tp)
> r8168_mac_ocp_modify(tp, 0xc0b4, 0x0000, 0x000c);
> r8168_mac_ocp_modify(tp, 0xeb6a, 0x00ff, 0x0033);
> r8168_mac_ocp_modify(tp, 0xeb50, 0x03e0, 0x0040);
> - r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0030);
> + r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0000);
> r8168_mac_ocp_modify(tp, 0xe040, 0x1000, 0x0000);
> r8168_mac_ocp_modify(tp, 0xea1c, 0x0003, 0x0001);
> if (tp->mac_version == RTL_GIGA_MAC_VER_70 ||
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH net-next] r8169: set EEE speed down ratio to 1
2025-09-04 6:16 ` Heiner Kallweit
@ 2025-09-05 13:43 ` Hau
2025-09-05 19:57 ` Heiner Kallweit
0 siblings, 1 reply; 8+ messages in thread
From: Hau @ 2025-09-05 13:43 UTC (permalink / raw)
To: Heiner Kallweit, nic_swsd, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
>
> On 9/4/2025 4:11 AM, ChunHao Lin wrote:
> > EEE speed down ratio (mac ocp 0xe056[7:4]) is used to control EEE
> > speed down rate. The larger this value is, the more power can save.
> > But it actually save less power then expected, but will impact
> > compatibility. So set it to 1 (mac ocp 0xe056[7:4] = 0) to improve
> compatibility.
> >
> Hi Hau,
>
> what kind of speed is this referring to? Some clock, or link speed, or ..?
> Is EEE speed down a Realtek-specific feature?
>
> Are there known issues with the values used currently? Depending on the
> answer we might consider this a fix.
>
It means clock (MAC MCU) speed down. It is not from spec, so it is kind of Realtek specific feature.
It may cause packet drop or interrupt loss (different hardware may have different issue).
>
> > Signed-off-by: ChunHao Lin <hau@realtek.com>
> > ---
> > drivers/net/ethernet/realtek/r8169_main.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/realtek/r8169_main.c
> > b/drivers/net/ethernet/realtek/r8169_main.c
> > index 9c601f271c02..e5427dfce268 100644
> > --- a/drivers/net/ethernet/realtek/r8169_main.c
> > +++ b/drivers/net/ethernet/realtek/r8169_main.c
> > @@ -3409,7 +3409,7 @@ static void rtl_hw_start_8168h_1(struct
> rtl8169_private *tp)
> > r8168_mac_ocp_modify(tp, 0xd412, 0x0fff, sw_cnt_1ms_ini);
> > }
> >
> > - r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0070);
> > + r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0000);
> > r8168_mac_ocp_modify(tp, 0xe052, 0x6000, 0x8008);
> > r8168_mac_ocp_modify(tp, 0xe0d6, 0x01ff, 0x017f);
> > r8168_mac_ocp_modify(tp, 0xd420, 0x0fff, 0x047f); @@ -3514,7
> > +3514,7 @@ static void rtl_hw_start_8117(struct rtl8169_private *tp)
> > r8168_mac_ocp_modify(tp, 0xd412, 0x0fff, sw_cnt_1ms_ini);
> > }
> >
> > - r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0070);
> > + r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0000);
> > r8168_mac_ocp_write(tp, 0xea80, 0x0003);
> > r8168_mac_ocp_modify(tp, 0xe052, 0x0000, 0x0009);
> > r8168_mac_ocp_modify(tp, 0xd420, 0x0fff, 0x047f); @@ -3715,7
> > +3715,7 @@ static void rtl_hw_start_8125_common(struct rtl8169_private
> *tp)
> > r8168_mac_ocp_modify(tp, 0xc0b4, 0x0000, 0x000c);
> > r8168_mac_ocp_modify(tp, 0xeb6a, 0x00ff, 0x0033);
> > r8168_mac_ocp_modify(tp, 0xeb50, 0x03e0, 0x0040);
> > - r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0030);
> > + r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0000);
> > r8168_mac_ocp_modify(tp, 0xe040, 0x1000, 0x0000);
> > r8168_mac_ocp_modify(tp, 0xea1c, 0x0003, 0x0001);
> > if (tp->mac_version == RTL_GIGA_MAC_VER_70 ||
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next] r8169: set EEE speed down ratio to 1
2025-09-04 2:11 [PATCH net-next] r8169: set EEE speed down ratio to 1 ChunHao Lin
2025-09-04 6:16 ` Heiner Kallweit
@ 2025-09-05 19:56 ` Heiner Kallweit
2025-09-17 14:48 ` Hau
1 sibling, 1 reply; 8+ messages in thread
From: Heiner Kallweit @ 2025-09-05 19:56 UTC (permalink / raw)
To: ChunHao Lin, nic_swsd, andrew+netdev, davem, edumazet, kuba,
pabeni
Cc: netdev, linux-kernel
On 9/4/2025 4:11 AM, ChunHao Lin wrote:
> EEE speed down ratio (mac ocp 0xe056[7:4]) is used to control EEE speed down
> rate. The larger this value is, the more power can save. But it actually save
> less power then expected, but will impact compatibility. So set it to 1 (mac
> ocp 0xe056[7:4] = 0) to improve compatibility.
>
> Signed-off-by: ChunHao Lin <hau@realtek.com>
> ---
Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next] r8169: set EEE speed down ratio to 1
2025-09-05 13:43 ` Hau
@ 2025-09-05 19:57 ` Heiner Kallweit
0 siblings, 0 replies; 8+ messages in thread
From: Heiner Kallweit @ 2025-09-05 19:57 UTC (permalink / raw)
To: Hau, nic_swsd, andrew+netdev@lunn.ch, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
On 9/5/2025 3:43 PM, Hau wrote:
>>
>> On 9/4/2025 4:11 AM, ChunHao Lin wrote:
>>> EEE speed down ratio (mac ocp 0xe056[7:4]) is used to control EEE
>>> speed down rate. The larger this value is, the more power can save.
>>> But it actually save less power then expected, but will impact
>>> compatibility. So set it to 1 (mac ocp 0xe056[7:4] = 0) to improve
>> compatibility.
>>>
>> Hi Hau,
>>
>> what kind of speed is this referring to? Some clock, or link speed, or ..?
>> Is EEE speed down a Realtek-specific feature?
>>
>> Are there known issues with the values used currently? Depending on the
>> answer we might consider this a fix.
>>
> It means clock (MAC MCU) speed down. It is not from spec, so it is kind of Realtek specific feature.
> It may cause packet drop or interrupt loss (different hardware may have different issue).
>
Thanks, Hau!
>>
>>> Signed-off-by: ChunHao Lin <hau@realtek.com>
>>> ---
>>> drivers/net/ethernet/realtek/r8169_main.c | 6 +++---
>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/net/ethernet/realtek/r8169_main.c
>>> b/drivers/net/ethernet/realtek/r8169_main.c
>>> index 9c601f271c02..e5427dfce268 100644
>>> --- a/drivers/net/ethernet/realtek/r8169_main.c
>>> +++ b/drivers/net/ethernet/realtek/r8169_main.c
>>> @@ -3409,7 +3409,7 @@ static void rtl_hw_start_8168h_1(struct
>> rtl8169_private *tp)
>>> r8168_mac_ocp_modify(tp, 0xd412, 0x0fff, sw_cnt_1ms_ini);
>>> }
>>>
>>> - r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0070);
>>> + r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0000);
>>> r8168_mac_ocp_modify(tp, 0xe052, 0x6000, 0x8008);
>>> r8168_mac_ocp_modify(tp, 0xe0d6, 0x01ff, 0x017f);
>>> r8168_mac_ocp_modify(tp, 0xd420, 0x0fff, 0x047f); @@ -3514,7
>>> +3514,7 @@ static void rtl_hw_start_8117(struct rtl8169_private *tp)
>>> r8168_mac_ocp_modify(tp, 0xd412, 0x0fff, sw_cnt_1ms_ini);
>>> }
>>>
>>> - r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0070);
>>> + r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0000);
>>> r8168_mac_ocp_write(tp, 0xea80, 0x0003);
>>> r8168_mac_ocp_modify(tp, 0xe052, 0x0000, 0x0009);
>>> r8168_mac_ocp_modify(tp, 0xd420, 0x0fff, 0x047f); @@ -3715,7
>>> +3715,7 @@ static void rtl_hw_start_8125_common(struct rtl8169_private
>> *tp)
>>> r8168_mac_ocp_modify(tp, 0xc0b4, 0x0000, 0x000c);
>>> r8168_mac_ocp_modify(tp, 0xeb6a, 0x00ff, 0x0033);
>>> r8168_mac_ocp_modify(tp, 0xeb50, 0x03e0, 0x0040);
>>> - r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0030);
>>> + r8168_mac_ocp_modify(tp, 0xe056, 0x00f0, 0x0000);
>>> r8168_mac_ocp_modify(tp, 0xe040, 0x1000, 0x0000);
>>> r8168_mac_ocp_modify(tp, 0xea1c, 0x0003, 0x0001);
>>> if (tp->mac_version == RTL_GIGA_MAC_VER_70 ||
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH net-next] r8169: set EEE speed down ratio to 1
2025-09-05 19:56 ` Heiner Kallweit
@ 2025-09-17 14:48 ` Hau
2025-09-17 17:17 ` Heiner Kallweit
0 siblings, 1 reply; 8+ messages in thread
From: Hau @ 2025-09-17 14:48 UTC (permalink / raw)
To: Heiner Kallweit, nic_swsd, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
>
> External mail : This email originated from outside the organization. Do not
> reply, click links, or open attachments unless you recognize the sender and
> know the content is safe.
>
>
>
> On 9/4/2025 4:11 AM, ChunHao Lin wrote:
> > EEE speed down ratio (mac ocp 0xe056[7:4]) is used to control EEE
> > speed down rate. The larger this value is, the more power can save.
> > But it actually save less power then expected, but will impact
> > compatibility. So set it to 1 (mac ocp 0xe056[7:4] = 0) to improve
> compatibility.
> >
> > Signed-off-by: ChunHao Lin <hau@realtek.com>
> > ---
>
> Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>
This patch seems has been reviewed. But I did not see it been accepted. Should I resubmit the patch?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next] r8169: set EEE speed down ratio to 1
2025-09-17 14:48 ` Hau
@ 2025-09-17 17:17 ` Heiner Kallweit
2025-09-17 17:26 ` Hau
0 siblings, 1 reply; 8+ messages in thread
From: Heiner Kallweit @ 2025-09-17 17:17 UTC (permalink / raw)
To: Hau, nic_swsd, andrew+netdev@lunn.ch, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
On 9/17/2025 4:48 PM, Hau wrote:
>>
>> External mail : This email originated from outside the organization. Do not
>> reply, click links, or open attachments unless you recognize the sender and
>> know the content is safe.
>>
>>
>>
>> On 9/4/2025 4:11 AM, ChunHao Lin wrote:
>>> EEE speed down ratio (mac ocp 0xe056[7:4]) is used to control EEE
>>> speed down rate. The larger this value is, the more power can save.
>>> But it actually save less power then expected, but will impact
>>> compatibility. So set it to 1 (mac ocp 0xe056[7:4] = 0) to improve
>> compatibility.
>>>
>>> Signed-off-by: ChunHao Lin <hau@realtek.com>
>>> ---
>>
>> Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>
>
> This patch seems has been reviewed. But I did not see it been accepted. Should I resubmit the patch?
Its status in patchwork is "changes requested", likely due to the fact that we had a conversation
about the patch. So yes, please resubmit, with my Rb, and best also add the following, that you wrote,
to the commit message.
It means clock (MAC MCU) speed down. It is not from spec, so it is kind of Realtek specific feature.
It may cause packet drop or interrupt loss (different hardware may have different issue).
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH net-next] r8169: set EEE speed down ratio to 1
2025-09-17 17:17 ` Heiner Kallweit
@ 2025-09-17 17:26 ` Hau
0 siblings, 0 replies; 8+ messages in thread
From: Hau @ 2025-09-17 17:26 UTC (permalink / raw)
To: Heiner Kallweit, nic_swsd, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
> >>
> >> External mail : This email originated from outside the organization.
> >> Do not reply, click links, or open attachments unless you recognize
> >> the sender and know the content is safe.
> >>
> >>
> >>
> >> On 9/4/2025 4:11 AM, ChunHao Lin wrote:
> >>> EEE speed down ratio (mac ocp 0xe056[7:4]) is used to control EEE
> >>> speed down rate. The larger this value is, the more power can save.
> >>> But it actually save less power then expected, but will impact
> >>> compatibility. So set it to 1 (mac ocp 0xe056[7:4] = 0) to improve
> >> compatibility.
> >>>
> >>> Signed-off-by: ChunHao Lin <hau@realtek.com>
> >>> ---
> >>
> >> Reviewed-by: Heiner Kallweit <hkallweit1@gmail.com>
> >
> > This patch seems has been reviewed. But I did not see it been accepted.
> Should I resubmit the patch?
>
> Its status in patchwork is "changes requested", likely due to the fact that we
> had a conversation about the patch. So yes, please resubmit, with my Rb,
> and best also add the following, that you wrote, to the commit message.
>
I will resubmit the patch. Thanks.
> It means clock (MAC MCU) speed down. It is not from spec, so it is kind of
> Realtek specific feature.
> It may cause packet drop or interrupt loss (different hardware may have
> different issue).
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-09-17 17:26 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-04 2:11 [PATCH net-next] r8169: set EEE speed down ratio to 1 ChunHao Lin
2025-09-04 6:16 ` Heiner Kallweit
2025-09-05 13:43 ` Hau
2025-09-05 19:57 ` Heiner Kallweit
2025-09-05 19:56 ` Heiner Kallweit
2025-09-17 14:48 ` Hau
2025-09-17 17:17 ` Heiner Kallweit
2025-09-17 17:26 ` Hau
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).