netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v0] net: phy-c45: Fix genphy_c45_ethtool_set_eee description
@ 2023-06-18 18:01 Andrew Lunn
  2023-06-18 20:32 ` Andrew Lunn
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Lunn @ 2023-06-18 18:01 UTC (permalink / raw)
  To: netdev; +Cc: Russell King, Heiner Kallweit, Andrew Lunn

The text has been cut/paste from  genphy_c45_ethtool_get_eee but not
changed to reflect it performs set.

Additionally, extend the comment. This function implements the logic
that eee_enabled has global control over EEE. When eee_enabled is
false, no link modes will be advertised, and as a result, the MAC
should not transmit LPI.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 drivers/net/phy/phy-c45.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/phy/phy-c45.c b/drivers/net/phy/phy-c45.c
index fee514b96ab1..d1d7cf34ac0b 100644
--- a/drivers/net/phy/phy-c45.c
+++ b/drivers/net/phy/phy-c45.c
@@ -1425,12 +1425,15 @@ int genphy_c45_ethtool_get_eee(struct phy_device *phydev,
 EXPORT_SYMBOL(genphy_c45_ethtool_get_eee);
 
 /**
- * genphy_c45_ethtool_set_eee - get EEE supported and status
+ * genphy_c45_ethtool_set_eee - set EEE supported and status
  * @phydev: target phy_device struct
  * @data: ethtool_eee data
  *
- * Description: it reportes the Supported/Advertisement/LP Advertisement
- * capabilities.
+ * Description: it set the Supported/Advertisement/LP Advertisement
+ * capabilities. If eee_enabled is false, no links modes are
+ * advertised, but the previously advertised link modes are
+ * retained. This allows EEE to be enabled/disabled in a none
+ * destructive way.
  */
 int genphy_c45_ethtool_set_eee(struct phy_device *phydev,
 			       struct ethtool_eee *data)
-- 
2.40.1


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

* Re: [PATCH net-next v0] net: phy-c45: Fix genphy_c45_ethtool_set_eee description
  2023-06-18 18:01 [PATCH net-next v0] net: phy-c45: Fix genphy_c45_ethtool_set_eee description Andrew Lunn
@ 2023-06-18 20:32 ` Andrew Lunn
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2023-06-18 20:32 UTC (permalink / raw)
  To: netdev; +Cc: Russell King, Heiner Kallweit

On Sun, Jun 18, 2023 at 08:01:30PM +0200, Andrew Lunn wrote:
> The text has been cut/paste from  genphy_c45_ethtool_get_eee but not
> changed to reflect it performs set.
> 
> Additionally, extend the comment. This function implements the logic
> that eee_enabled has global control over EEE. When eee_enabled is
> false, no link modes will be advertised, and as a result, the MAC
> should not transmit LPI.
> 
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>

Russell has suggested some changes in another thread.

    Andrew

---
pw-bot: cr

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

end of thread, other threads:[~2023-06-18 20:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-18 18:01 [PATCH net-next v0] net: phy-c45: Fix genphy_c45_ethtool_set_eee description Andrew Lunn
2023-06-18 20:32 ` Andrew Lunn

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