netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] r8169: switch to new function phy_support_eee
@ 2024-03-07 21:23 Heiner Kallweit
  2024-03-08  7:37 ` [EXTERNAL] " Suman Ghosh
  2024-03-11 21:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Heiner Kallweit @ 2024-03-07 21:23 UTC (permalink / raw)
  To: Realtek linux nic maintainers, Paolo Abeni, Jakub Kicinski,
	David Miller, Eric Dumazet
  Cc: netdev@vger.kernel.org

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


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

* RE: [EXTERNAL] [PATCH net-next] r8169: switch to new function phy_support_eee
  2024-03-07 21:23 [PATCH net-next] r8169: switch to new function phy_support_eee Heiner Kallweit
@ 2024-03-08  7:37 ` Suman Ghosh
  2024-03-08  7:48   ` Heiner Kallweit
  2024-03-11 21:10 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Suman Ghosh @ 2024-03-08  7:37 UTC (permalink / raw)
  To: Heiner Kallweit, Realtek linux nic maintainers, Paolo Abeni,
	Jakub Kicinski, David Miller, Eric Dumazet
  Cc: netdev@vger.kernel.org

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
>


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

* Re: [EXTERNAL] [PATCH net-next] r8169: switch to new function phy_support_eee
  2024-03-08  7:37 ` [EXTERNAL] " Suman Ghosh
@ 2024-03-08  7:48   ` Heiner Kallweit
  0 siblings, 0 replies; 4+ messages in thread
From: Heiner Kallweit @ 2024-03-08  7:48 UTC (permalink / raw)
  To: Suman Ghosh, Realtek linux nic maintainers, Paolo Abeni,
	Jakub Kicinski, David Miller, Eric Dumazet,
	Russell King - ARM Linux, Andrew Lunn
  Cc: netdev@vger.kernel.org

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
>>
> 


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

* Re: [PATCH net-next] r8169: switch to new function phy_support_eee
  2024-03-07 21:23 [PATCH net-next] r8169: switch to new function phy_support_eee Heiner Kallweit
  2024-03-08  7:37 ` [EXTERNAL] " Suman Ghosh
@ 2024-03-11 21:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-03-11 21:10 UTC (permalink / raw)
  To: Heiner Kallweit; +Cc: nic_swsd, pabeni, kuba, davem, edumazet, netdev

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2024-03-11 21:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-07 21:23 [PATCH net-next] r8169: switch to new function phy_support_eee Heiner Kallweit
2024-03-08  7:37 ` [EXTERNAL] " Suman Ghosh
2024-03-08  7:48   ` Heiner Kallweit
2024-03-11 21:10 ` patchwork-bot+netdevbpf

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).