[PATCH net-next 0/4] Remove legacy phylink behaviour

Daniel Golle daniel at makrotopia.org
Fri Jul 21 15:40:25 PDT 2023


Hi Russell,

On Fri, Jul 21, 2023 at 12:33:52PM +0100, Russell King (Oracle) wrote:
> Hi,
> 
> This series removes the - as far as I can tell - unreachable code in
> mtk_eth_soc that relies upon legacy phylink behaviour, and then removes
> the support in phylink for this legacy behaviour.
> 
> Patch 1 removes the clocking configuration from mtk_eth_soc for non-
> TRGMII, non-serdes based interface modes, and disables those interface
> modes prior to phylink configuration.
> 
> Patch 2 removes the mac_pcs_get_state() method from mtk_eth_soc which
> I believe is also not used - mtk_eth_soc appears not to be used with
> SFPs (which would use a kind of in-band mode) nor does any DT appear
> to specify in-band mode for any non-serdes based interface mode.
> 
> With both of those dealt with, the kernel is now free of any driver
> relying on the phylink legacy mode. Therefore, patch 3 removes support
> for this.
> 
> Finally, with the advent of a new driver being submitted today that
> makes use of state->speed in the mac_config() path, patch 4 ensures that
> any phylink_link_state member that should not be used in mac_config is
> either cleared or set to an invalid value.

Thank you for taking care of this!

For the whole series:

Reviewed-by: Daniel Golle <daniel at makrotopia.org>
Tested-by: Daniel Golle <daniel at makrotopia.org>

Tested on BPi-R2 (MT7623N), BPi-R3 (MT7986A) and BPi-R64 (MT7622A).
All works fine as expected.

To apply the series I needed to resolve a minor conflict due to
net: ethernet: mtk_ppe: add MTK_FOE_ENTRY_V{1,2}_SIZE macros
being applied in the meantime.


> 
>  drivers/net/ethernet/mediatek/mtk_eth_soc.c | 94 +++++------------------------
>  drivers/net/ethernet/mediatek/mtk_eth_soc.h |  1 +
>  drivers/net/phy/phylink.c                   | 48 ++++++---------
>  include/linux/phylink.h                     | 45 ++------------
>  4 files changed, 42 insertions(+), 146 deletions(-)
> -- 
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!



More information about the Linux-mediatek mailing list