[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3e14a072-07c7-d7e0-a6ef-26643b0bb21b@cogentembedded.com>
Date: Sat, 1 Jun 2019 12:46:15 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Robert Hancock <hancock@...systems.ca>, netdev@...r.kernel.org
Cc: linux@...linux.org.uk
Subject: Re: [PATCH net-next] net: phy: phylink: add fallback from SGMII to
1000BaseX
Hello!
On 31.05.2019 22:18, Robert Hancock wrote:
> Some copper SFP modules support both SGMII and 1000BaseX, but some
> drivers/devices only support the 1000BaseX mode. Currently SGMII mode is
> always being selected as the desired mode for such modules, and this
> fails if the controller doesn't support SGMII. Add a fallback for this
> case by trying 1000BaseX instead if the controller rejects SGMII mode.
>
> Signed-off-by: Robert Hancock <hancock@...systems.ca>
> ---
> drivers/net/phy/phylink.c | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
> index 68d0a89..4fd72c2 100644
> --- a/drivers/net/phy/phylink.c
> +++ b/drivers/net/phy/phylink.c
[...]
> @@ -1663,6 +1665,25 @@ static int phylink_sfp_module_insert(void *upstream,
>
> config.interface = iface;
> ret = phylink_validate(pl, support, &config);
> +
> + if (ret && iface == PHY_INTERFACE_MODE_SGMII &&
> + phylink_test(orig_support, 1000baseX_Full)) {
> + /* Copper modules may select SGMII but the interface may not
> + * support that mode, try 1000BaseX if supported.
> + */
> +
> + netdev_warn(pl->netdev, "validation of %s/%s with support %*pb "
> + "failed: %d, trying 1000BaseX\n",
Don't break the messages like this, scripts/checkpatch.pl shouldn't
complain about too long lines in this case.
[...]
MBR, Sergei
Powered by blists - more mailing lists