diff mbox series

[net-next] r8169: switch to new function phy_support_eee

Message ID 92462328-5c9b-4d82-9ce4-ea974cda4900@gmail.com (mailing list archive)
State Accepted
Commit 031a239c2209522520936238f1d71615eb5634e0
Delegated to: Netdev Maintainers
Headers show
Series [net-next] r8169: switch to new function phy_support_eee | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 940 this patch: 940
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 956 this patch: 956
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 956 this patch: 956
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 15 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-03-08--09-00 (tests: 890)

Commit Message

Heiner Kallweit March 7, 2024, 9:23 p.m. UTC
Switch to new function phy_support_eee. This allows to simplify
the code because data->tx_lpi_enabled is now populated by
phy_ethtool_get_eee().

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/ethernet/realtek/r8169_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Suman Ghosh March 8, 2024, 7:37 a.m. UTC | #1
Hi Heiner,

To me it looks like both patches, 
r8169: switch to new function phy_support_eee and net: phy: simplify a check in phy_check_link_status is related and can be pushed as a series. This will make change more harmonic. Because, you are moving setting of enable_tx_lpi in one patch and removing from the other one.

Regards,
Suman

>-----Original Message-----
>From: Heiner Kallweit <hkallweit1@gmail.com>
>Sent: Friday, March 8, 2024 2:53 AM
>To: Realtek linux nic maintainers <nic_swsd@realtek.com>; Paolo Abeni
><pabeni@redhat.com>; Jakub Kicinski <kuba@kernel.org>; David Miller
><davem@davemloft.net>; Eric Dumazet <edumazet@google.com>
>Cc: netdev@vger.kernel.org
>Subject: [EXTERNAL] [PATCH net-next] r8169: switch to new function
>phy_support_eee
>Switch to new function phy_support_eee. This allows to simplify the code
>because data->tx_lpi_enabled is now populated by phy_ethtool_get_eee().
>
>Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
>---
> drivers/net/ethernet/realtek/r8169_main.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
>diff --git a/drivers/net/ethernet/realtek/r8169_main.c
>b/drivers/net/ethernet/realtek/r8169_main.c
>index 0d2cbb32c..5c879a5c8 100644
>--- a/drivers/net/ethernet/realtek/r8169_main.c
>+++ b/drivers/net/ethernet/realtek/r8169_main.c
>@@ -2079,7 +2079,6 @@ static int rtl8169_get_eee(struct net_device *dev,
>struct ethtool_keee *data)
> 		return ret;
>
> 	data->tx_lpi_timer = r8169_get_tx_lpi_timer_us(tp);
>-	data->tx_lpi_enabled = data->tx_lpi_timer ? data->eee_enabled :
>false;
>
> 	return 0;
> }
>@@ -5174,7 +5173,7 @@ static int r8169_mdio_register(struct
>rtl8169_private *tp)
>
> 	tp->phydev->mac_managed_pm = true;
> 	if (rtl_supports_eee(tp))
>-		phy_advertise_eee_all(tp->phydev);
>+		phy_support_eee(tp->phydev);
> 	phy_support_asym_pause(tp->phydev);
>
> 	/* PHY will be woken up in rtl_open() */
>--
>2.44.0
>
Heiner Kallweit March 8, 2024, 7:48 a.m. UTC | #2
On 08.03.2024 08:37, Suman Ghosh wrote:
> Hi Heiner,
> 
> To me it looks like both patches, 
> r8169: switch to new function phy_support_eee and net: phy: simplify a check in phy_check_link_status is related and can be pushed as a series. This will make change more harmonic. Because, you are moving setting of enable_tx_lpi in one patch and removing from the other one.
> 
Both patches are unrelated. The phylib change is just a minor cleanup
w/o functional change.

> Regards,
> Suman
> 
>> -----Original Message-----
>> From: Heiner Kallweit <hkallweit1@gmail.com>
>> Sent: Friday, March 8, 2024 2:53 AM
>> To: Realtek linux nic maintainers <nic_swsd@realtek.com>; Paolo Abeni
>> <pabeni@redhat.com>; Jakub Kicinski <kuba@kernel.org>; David Miller
>> <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>
>> Cc: netdev@vger.kernel.org
>> Subject: [EXTERNAL] [PATCH net-next] r8169: switch to new function
>> phy_support_eee
>> Switch to new function phy_support_eee. This allows to simplify the code
>> because data->tx_lpi_enabled is now populated by phy_ethtool_get_eee().
>>
>> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
>> ---
>> drivers/net/ethernet/realtek/r8169_main.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/realtek/r8169_main.c
>> b/drivers/net/ethernet/realtek/r8169_main.c
>> index 0d2cbb32c..5c879a5c8 100644
>> --- a/drivers/net/ethernet/realtek/r8169_main.c
>> +++ b/drivers/net/ethernet/realtek/r8169_main.c
>> @@ -2079,7 +2079,6 @@ static int rtl8169_get_eee(struct net_device *dev,
>> struct ethtool_keee *data)
>> 		return ret;
>>
>> 	data->tx_lpi_timer = r8169_get_tx_lpi_timer_us(tp);
>> -	data->tx_lpi_enabled = data->tx_lpi_timer ? data->eee_enabled :
>> false;
>>
>> 	return 0;
>> }
>> @@ -5174,7 +5173,7 @@ static int r8169_mdio_register(struct
>> rtl8169_private *tp)
>>
>> 	tp->phydev->mac_managed_pm = true;
>> 	if (rtl_supports_eee(tp))
>> -		phy_advertise_eee_all(tp->phydev);
>> +		phy_support_eee(tp->phydev);
>> 	phy_support_asym_pause(tp->phydev);
>>
>> 	/* PHY will be woken up in rtl_open() */
>> --
>> 2.44.0
>>
>
patchwork-bot+netdevbpf@kernel.org March 11, 2024, 9:10 p.m. UTC | #3
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 7 Mar 2024 22:23:20 +0100 you wrote:
> Switch to new function phy_support_eee. This allows to simplify
> the code because data->tx_lpi_enabled is now populated by
> phy_ethtool_get_eee().
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
>  drivers/net/ethernet/realtek/r8169_main.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Here is the summary with links:
  - [net-next] r8169: switch to new function phy_support_eee
    https://git.kernel.org/netdev/net-next/c/031a239c2209

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 0d2cbb32c..5c879a5c8 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -2079,7 +2079,6 @@  static int rtl8169_get_eee(struct net_device *dev, struct ethtool_keee *data)
 		return ret;
 
 	data->tx_lpi_timer = r8169_get_tx_lpi_timer_us(tp);
-	data->tx_lpi_enabled = data->tx_lpi_timer ? data->eee_enabled : false;
 
 	return 0;
 }
@@ -5174,7 +5173,7 @@  static int r8169_mdio_register(struct rtl8169_private *tp)
 
 	tp->phydev->mac_managed_pm = true;
 	if (rtl_supports_eee(tp))
-		phy_advertise_eee_all(tp->phydev);
+		phy_support_eee(tp->phydev);
 	phy_support_asym_pause(tp->phydev);
 
 	/* PHY will be woken up in rtl_open() */