Re: [PATCH net-next 1/2] net: phy: introduce core support for phy-mode = "10g-qxgmii"

Russell King (Oracle)
2024-06-13T07:54:59Z

On Wed, Jun 12, 2024 at 05:53:16PM +0800, Luo Jie wrote:
> @@ -1865,7 +1872,8 @@ static int phylink_validate_phy(struct phylink *pl, struct phy_device *phy,
> if (phy->is_c45 && state->rate_matching == RATE_MATCH_NONE &&
> state->interface != PHY_INTERFACE_MODE_RXAUI &&
> state->interface != PHY_INTERFACE_MODE_XAUI &&
> - state->interface != PHY_INTERFACE_MODE_USXGMII)
> + state->interface != PHY_INTERFACE_MODE_USXGMII &&
> + state->interface != PHY_INTERFACE_MODE_10G_QXGMII)
> state->interface = PHY_INTERFACE_MODE_NA;

It would be better, rather than extending this workaround, instead to
have the PHY driver set phy->possible_interfaces in its .config_init
method. phy->possible_interfaces should be the set of interfaces that
the PHY _will_ use given its configuration for the different media
speeds. I think that means just PHY_INTERFACE_MODE_10G_QXGMII for
your configuration.

Thanks.

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!