[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210113103841.hq2cjzf22ytgcwd7@pali>
Date: Wed, 13 Jan 2021 11:38:41 +0100
From: Pali Rohár <pali@...nel.org>
To: Marek Behún <kabel@...nel.org>
Cc: netdev@...r.kernel.org, Russell King <rmk+kernel@...linux.org.uk>,
Andrew Lunn <andrew@...n.ch>, Jakub Kicinski <kuba@...nel.org>,
davem@...emloft.net
Subject: Re: [PATCH net-next v4 2/4] net: phylink: allow attaching phy for
SFP modules on 802.3z mode
On Monday 11 January 2021 06:00:42 Marek Behún wrote:
> Some SFPs may contain an internal PHY which may in some cases want to
> connect with the host interface in 1000base-x/2500base-x mode.
> Do not fail if such PHY is being attached in one of these PHY interface
> modes.
>
> Signed-off-by: Marek Behún <kabel@...nel.org>
> Reviewed-by: Russell King <rmk+kernel@...linux.org.uk>
> Cc: Andrew Lunn <andrew@...n.ch>
Reviewed-by: Pali Rohár <pali@...nel.org>
> ---
> drivers/net/phy/phylink.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
> index 84f6e197f965..f97d041f82f4 100644
> --- a/drivers/net/phy/phylink.c
> +++ b/drivers/net/phy/phylink.c
> @@ -1018,7 +1018,7 @@ static int phylink_attach_phy(struct phylink *pl, struct phy_device *phy,
> {
> if (WARN_ON(pl->cfg_link_an_mode == MLO_AN_FIXED ||
> (pl->cfg_link_an_mode == MLO_AN_INBAND &&
> - phy_interface_mode_is_8023z(interface))))
> + phy_interface_mode_is_8023z(interface) && !pl->sfp_bus)))
> return -EINVAL;
>
> if (pl->phydev)
> @@ -2069,9 +2069,6 @@ static int phylink_sfp_config(struct phylink *pl, u8 mode,
> phylink_an_mode_str(mode), phy_modes(config.interface),
> __ETHTOOL_LINK_MODE_MASK_NBITS, support);
>
> - if (phy_interface_mode_is_8023z(iface) && pl->phydev)
> - return -EINVAL;
> -
> changed = !linkmode_equal(pl->supported, support);
> if (changed) {
> linkmode_copy(pl->supported, support);
> --
> 2.26.2
>
Powered by blists - more mailing lists