[net-next PATCH v5 13/15] phylink: introduce phylink_fwnode_phy_connect()

Russell King - ARM Linux admin linux at armlinux.org.uk
Mon Feb 8 10:31:11 EST 2021


On Mon, Feb 08, 2021 at 08:42:42PM +0530, Calvin Johnson wrote:
> +int phylink_fwnode_phy_connect(struct phylink *pl,
> +			       struct fwnode_handle *fwnode,
> +			       u32 flags)
> +{
> +	struct fwnode_handle *phy_fwnode;
> +	struct phy_device *phy_dev;
> +	int ret;
> +
> +	if (is_of_node(fwnode)) {
> +		/* Fixed links and 802.3z are handled without needing a PHY */
> +		if (pl->cfg_link_an_mode == MLO_AN_FIXED ||
> +		    (pl->cfg_link_an_mode == MLO_AN_INBAND &&
> +		     phy_interface_mode_is_8023z(pl->link_interface)))
> +			return 0;

This difference between ACPI and DT really needs to be described in the
commit description.

For example, why is it acceptable to have a PHY in fixed-link mode if
we're using ACPI, and not DT?

If we look at the phylink code, accepting a PHY when in fixed-link mode
is basically not supported... so why should ACPI allow this?

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



More information about the linux-arm-kernel mailing list