Skip to contentSkip to conversation

r8169: switch to new function phy_support_eee

PATCH Applied Heiner Kallweit 3 participants 4 messages Mar 7, 2024 – Mar 11, 2024

Subsystems (3)
lore
Share & tools
lore

Heiner Kallweit

author maintainer
#0 lore raw

PATCH 1/1 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().

---
 drivers/net/ethernet/realtek/r8169_main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/realtek/r8169_main.c +1 -2
index 0d2cbb32c..5c879a5c8 100644
@@ -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() */
Signature · 1 line
2.44.0
#1 lore raw

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

Quoted 45 lines

-----Original Message-----
From: Heiner Kallweit <[email protected]>
Sent: Friday, March 8, 2024 2:53 AM
To: Realtek linux nic maintainers <[email protected]>; Paolo Abeni <[email protected]>; Jakub Kicinski <[email protected]>; David Miller <[email protected]>; Eric Dumazet <[email protected]>
Cc: [email protected]
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().

---
drivers/net/ethernet/realtek/r8169_main.c | 3 +--

1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/realtek/r8169_main.c +0 -1
index 0d2cbb32c..5c879a5c8 100644
@@ -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;
}
drivers/net/ethernet/realtek/r8169_main.c +1 -1
@@ -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

author maintainer
#2 lore raw
Quoted 5 lines · Suman Ghosh

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.

Quoted 49 lines

Regards,
Suman

Quoted 45 lines

-----Original Message-----
From: Heiner Kallweit <[email protected]>
Sent: Friday, March 8, 2024 2:53 AM
To: Realtek linux nic maintainers <[email protected]>; Paolo Abeni <[email protected]>; Jakub Kicinski <[email protected]>; David Miller <[email protected]>; Eric Dumazet <[email protected]>
Cc: [email protected]
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().

---
drivers/net/ethernet/realtek/r8169_main.c | 3 +--

1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/realtek/r8169_main.c +0 -1
index 0d2cbb32c..5c879a5c8 100644
@@ -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;
}
drivers/net/ethernet/realtek/r8169_main.c +1 -1
@@ -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

#3 lore raw
In reply to Heiner Kallweit
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · 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().

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

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html