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

From: Calvin Johnson
Date: Mon Feb 15 2021 - 01:03:48 EST


On Mon, Feb 08, 2021 at 03:31:11PM +0000, Russell King - ARM Linux admin wrote:
> 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?

DT and ACPI should handle fixed-link in similar manner. I'll remove the OF
check.

Thanks
Calvin