diff mbox series

[v4,net-next,1/9] net: phy-c45: Fix genphy_c45_ethtool_set_eee description

Message ID 20230618184119.4017149-2-andrew@lunn.ch (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series net: ethernet: Rework EEE | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
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: 8 this patch: 8
netdev/cc_maintainers warning 4 maintainers not CCed: kuba@kernel.org davem@davemloft.net pabeni@redhat.com edumazet@google.com
netdev/build_clang success Errors and warnings before: 8 this patch: 8
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: 8 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 18 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Andrew Lunn June 18, 2023, 6:41 p.m. UTC
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(-)

Comments

Russell King (Oracle) June 18, 2023, 7:18 p.m. UTC | #1
On Sun, Jun 18, 2023 at 08:41:11PM +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>
> ---
>  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

      Description: sets the ...

> + * capabilities. If eee_enabled is false, no links modes are
> + * advertised, but the previously advertised link modes are

I'd suggest moving "advertised," to the preceding line to fill it
more...

> + * retained. This allows EEE to be enabled/disabled in a none
> + * destructive way.

which then would allow "non-destructive" here rather than the slightly
more awkward (but correct) "non-
destructive" formatting here.

Thanks!
Andrew Lunn June 18, 2023, 8:30 p.m. UTC | #2
> >  /**
> > - * 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
> 
>       Description: sets the ...
> 
> > + * capabilities. If eee_enabled is false, no links modes are
> > + * advertised, but the previously advertised link modes are
> 
> I'd suggest moving "advertised," to the preceding line to fill it
> more...
> 
> > + * retained. This allows EEE to be enabled/disabled in a none
> > + * destructive way.
> 
> which then would allow "non-destructive" here rather than the slightly
> more awkward (but correct) "non-
> destructive" formatting here.

Thanks for the comments. I actually ended up submitting this patch
twice, one standalone and then again as part of this patchset. I
should stop submitting patches today, i'm getting too many things
wrong :-)

I will fixup the standalone version.

  Andrew
diff mbox series

Patch

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)