Re: [PATCH v14 12/12] net: airoha: add phylink support

[email protected]
Newsgroups org.kernel.vger.linux-devicetree
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Missing `.nway_reset` callback in `ethtool_ops`, preventing users from restarting autonegotiation.
--

--- Patch [12]: [PATCH v14 12/12] net: airoha: add phylink support ---
commit 04ce17914816acfbcbe80f577754f5b7cd6c55ff
Author: Christian Marangi <[email protected]>

net: airoha: add phylink support

This commit adds phylink support for each GDM port, configuring internal
interface modes for GDM1 and necessary PCS settings for external PHYs or SFP
cages on GDM2/3/4. It also updates the ethtool get and set link ksettings
functions to use phylink.

> diff --git a/drivers/net/ethernet/airoha/airoha_eth.c b/drivers/net/ethernet/airoha/airoha_eth.c
> index 64619e9a704dd..c3827bf9791b6 100644
> --- a/drivers/net/ethernet/airoha/airoha_eth.c
> +++ b/drivers/net/ethernet/airoha/airoha_eth.c
[ ... ]
> @@ -3353,7 +3392,8 @@ static const struct ethtool_ops airoha_ethtool_ops = {
>  	.get_drvinfo		= airoha_ethtool_get_drvinfo,
>  	.get_eth_mac_stats      = airoha_ethtool_get_mac_stats,
>  	.get_rmon_stats		= airoha_ethtool_get_rmon_stats,
> -	.get_link_ksettings	= phy_ethtool_get_link_ksettings,
> +	.get_link_ksettings	= airoha_ethtool_get_link_ksettings,
> +	.set_link_ksettings	= airoha_ethtool_set_link_ksettings,
>  	.get_link		= ethtool_op_get_link,
>  };

[Severity: Low]
Since this patch fully supports phylink and implements set_link_ksettings,
should airoha_ethtool_ops in drivers/net/ethernet/airoha/airoha_eth.c also
include the .nway_reset callback?

Without this callback, userspace attempts to manually restart
autonegotiation via "ethtool -r <interface>" will receive -EOPNOTSUPP. It
is standard in phylink conversions to also provide an nway_reset wrapper
that calls phylink_ethtool_nway_reset(dev->phylink) to allow administrators
to trigger autonegotiation restarts.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=12
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.