* [PATCH net] r8169: fix rtl8168h rx crc error
@ 2023-03-22 6:45 ChunHao Lin
2023-03-22 8:21 ` Horatiu Vultur
0 siblings, 1 reply; 5+ messages in thread
From: ChunHao Lin @ 2023-03-22 6:45 UTC (permalink / raw)
To: hkallweit1; +Cc: netdev, nic_swsd, ChunHao Lin
When link speed is 10 Mbps and temperature is under -20°C, rtl8168h may
have rx crc error. Disable phy 10 Mbps pll off to fix this issue.
Signed-off-by: ChunHao Lin <hau@realtek.com>
---
drivers/net/ethernet/realtek/r8169_phy_config.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/realtek/r8169_phy_config.c b/drivers/net/ethernet/realtek/r8169_phy_config.c
index 930496cd34ed..b50f16786c24 100644
--- a/drivers/net/ethernet/realtek/r8169_phy_config.c
+++ b/drivers/net/ethernet/realtek/r8169_phy_config.c
@@ -826,6 +826,9 @@ static void rtl8168h_2_hw_phy_config(struct rtl8169_private *tp,
/* disable phy pfm mode */
phy_modify_paged(phydev, 0x0a44, 0x11, BIT(7), 0);
+ /* disable 10m pll off */
+ phy_modify_paged(phydev, 0x0a43, 0x10, BIT(0), 0);
+
rtl8168g_disable_aldps(phydev);
rtl8168g_config_eee_phy(phydev);
}
--
2.37.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net] r8169: fix rtl8168h rx crc error
2023-03-22 6:45 [PATCH net] r8169: fix rtl8168h rx crc error ChunHao Lin
@ 2023-03-22 8:21 ` Horatiu Vultur
2023-03-22 12:13 ` Hau
0 siblings, 1 reply; 5+ messages in thread
From: Horatiu Vultur @ 2023-03-22 8:21 UTC (permalink / raw)
To: ChunHao Lin; +Cc: hkallweit1, netdev, nic_swsd
The 03/22/2023 14:45, ChunHao Lin wrote:
>
> When link speed is 10 Mbps and temperature is under -20°C, rtl8168h may
> have rx crc error. Disable phy 10 Mbps pll off to fix this issue.
Don't forget to add the fixes tag.
Another comment that I usually get is to replace hardcoded values with
defines, but on the other side I can see that this file already has
plently of hardcoded values.
Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com>
>
> Signed-off-by: ChunHao Lin <hau@realtek.com>
> ---
> drivers/net/ethernet/realtek/r8169_phy_config.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/ethernet/realtek/r8169_phy_config.c b/drivers/net/ethernet/realtek/r8169_phy_config.c
> index 930496cd34ed..b50f16786c24 100644
> --- a/drivers/net/ethernet/realtek/r8169_phy_config.c
> +++ b/drivers/net/ethernet/realtek/r8169_phy_config.c
> @@ -826,6 +826,9 @@ static void rtl8168h_2_hw_phy_config(struct rtl8169_private *tp,
> /* disable phy pfm mode */
> phy_modify_paged(phydev, 0x0a44, 0x11, BIT(7), 0);
>
> + /* disable 10m pll off */
> + phy_modify_paged(phydev, 0x0a43, 0x10, BIT(0), 0);
> +
> rtl8168g_disable_aldps(phydev);
> rtl8168g_config_eee_phy(phydev);
> }
> --
> 2.37.2
>
--
/Horatiu
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH net] r8169: fix rtl8168h rx crc error
2023-03-22 8:21 ` Horatiu Vultur
@ 2023-03-22 12:13 ` Hau
2023-03-22 19:59 ` Jakub Kicinski
0 siblings, 1 reply; 5+ messages in thread
From: Hau @ 2023-03-22 12:13 UTC (permalink / raw)
To: Horatiu Vultur; +Cc: hkallweit1@gmail.com, netdev@vger.kernel.org, nic_swsd
> The 03/22/2023 14:45, ChunHao Lin wrote:
> >
> > When link speed is 10 Mbps and temperature is under -20°C, rtl8168h
> > may have rx crc error. Disable phy 10 Mbps pll off to fix this issue.
>
> Don't forget to add the fixes tag.
> Another comment that I usually get is to replace hardcoded values with
> defines, but on the other side I can see that this file already has plently of
> hardcoded values.
>
It is not a fix for a specific commit. PHY 10m pll off is an power saving feature which is enabled by H/W default.
This issue can be fixed by disable PHY 10m pll off.
> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com>
>
> >
> > Signed-off-by: ChunHao Lin <hau@realtek.com>
> > ---
> > drivers/net/ethernet/realtek/r8169_phy_config.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/net/ethernet/realtek/r8169_phy_config.c
> > b/drivers/net/ethernet/realtek/r8169_phy_config.c
> > index 930496cd34ed..b50f16786c24 100644
> > --- a/drivers/net/ethernet/realtek/r8169_phy_config.c
> > +++ b/drivers/net/ethernet/realtek/r8169_phy_config.c
> > @@ -826,6 +826,9 @@ static void rtl8168h_2_hw_phy_config(struct
> rtl8169_private *tp,
> > /* disable phy pfm mode */
> > phy_modify_paged(phydev, 0x0a44, 0x11, BIT(7), 0);
> >
> > + /* disable 10m pll off */
> > + phy_modify_paged(phydev, 0x0a43, 0x10, BIT(0), 0);
> > +
> > rtl8168g_disable_aldps(phydev);
> > rtl8168g_config_eee_phy(phydev); }
> > --
> > 2.37.2
> >
>
> --
> /Horatiu
>
> ------Please consider the environment before printing this e-mail.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net] r8169: fix rtl8168h rx crc error
2023-03-22 12:13 ` Hau
@ 2023-03-22 19:59 ` Jakub Kicinski
2023-03-23 13:57 ` Hau
0 siblings, 1 reply; 5+ messages in thread
From: Jakub Kicinski @ 2023-03-22 19:59 UTC (permalink / raw)
To: Hau; +Cc: Horatiu Vultur, hkallweit1@gmail.com, netdev@vger.kernel.org,
nic_swsd
On Wed, 22 Mar 2023 12:13:12 +0000 Hau wrote:
> > Don't forget to add the fixes tag.
> > Another comment that I usually get is to replace hardcoded values with
> > defines, but on the other side I can see that this file already has plently of
> > hardcoded values.
>
> It is not a fix for a specific commit. PHY 10m pll off is an power
> saving feature which is enabled by H/W default. This issue can be
> fixed by disable PHY 10m pll off.
How far back can the issue be reproduced? Is it only possible with
certain device types? Then the Fixes tag should point at the commit
which added support for the devices. Was it always present since 2.6
kernels? Put the first commit in the git history as Fixes.
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH net] r8169: fix rtl8168h rx crc error
2023-03-22 19:59 ` Jakub Kicinski
@ 2023-03-23 13:57 ` Hau
0 siblings, 0 replies; 5+ messages in thread
From: Hau @ 2023-03-23 13:57 UTC (permalink / raw)
To: Jakub Kicinski
Cc: Horatiu Vultur, hkallweit1@gmail.com, netdev@vger.kernel.org,
nic_swsd
> On Wed, 22 Mar 2023 12:13:12 +0000 Hau wrote:
> > > Don't forget to add the fixes tag.
> > > Another comment that I usually get is to replace hardcoded values
> > > with defines, but on the other side I can see that this file already
> > > has plently of hardcoded values.
> >
> > It is not a fix for a specific commit. PHY 10m pll off is an power
> > saving feature which is enabled by H/W default. This issue can be
> > fixed by disable PHY 10m pll off.
>
> How far back can the issue be reproduced? Is it only possible with certain
> device types? Then the Fixes tag should point at the commit which added
> support for the devices. Was it always present since 2.6 kernels? Put the first
> commit in the git history as Fixes.
>
RTL8168H is the only chip we know that has this issue. This issue is related to the H/W default setting.
So I will add a Fixes tag to the commit which added support for this chip and submit the patch again.
------Please consider the environment before printing this e-mail.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-03-23 13:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-22 6:45 [PATCH net] r8169: fix rtl8168h rx crc error ChunHao Lin
2023-03-22 8:21 ` Horatiu Vultur
2023-03-22 12:13 ` Hau
2023-03-22 19:59 ` Jakub Kicinski
2023-03-23 13:57 ` 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).