All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Robert Hancock <hancock@sedsystems.ca>, netdev@vger.kernel.org
Cc: linux@armlinux.org.uk
Subject: Re: [PATCH net-next] net: phy: phylink: add fallback from SGMII to 1000BaseX
Date: Sat, 1 Jun 2019 12:46:15 +0300	[thread overview]
Message-ID: <3e14a072-07c7-d7e0-a6ef-26643b0bb21b@cogentembedded.com> (raw)
In-Reply-To: <1559330285-30246-4-git-send-email-hancock@sedsystems.ca>

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@sedsystems.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

  parent reply	other threads:[~2019-06-01  9:46 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31 19:18 [PATCH net-next] net: sfp: Set 1000BaseX support flag for 1000BaseT modules Robert Hancock
2019-05-31 19:18 ` [PATCH net-next] net: sfp: Stop SFP polling during shutdown Robert Hancock
2019-05-31 20:12   ` Russell King - ARM Linux admin
2019-05-31 22:40     ` Robert Hancock
2019-05-31 19:18 ` [PATCH net-next] net: sfp: Use smaller chunk size when reading I2C data Robert Hancock
2019-05-31 20:13   ` Russell King - ARM Linux admin
2019-05-31 19:18 ` [PATCH net-next] net: phy: phylink: add fallback from SGMII to 1000BaseX Robert Hancock
2019-05-31 20:18   ` Russell King - ARM Linux admin
2019-06-01  0:17     ` Robert Hancock
2019-06-02 15:15       ` Russell King - ARM Linux admin
2019-06-07 18:10         ` Robert Hancock
2019-06-07 18:34           ` Russell King - ARM Linux admin
2019-06-01  9:46   ` Sergei Shtylyov [this message]
2019-05-31 19:18 ` [PATCH net-next] net: phy: phylink: support using device PHY in fixed or 802.3z mode Robert Hancock
2019-05-31 19:29   ` David Miller
2019-05-31 19:41     ` Robert Hancock
2019-05-31 19:42       ` David Miller
2019-05-31 20:31   ` Russell King - ARM Linux admin
2019-06-01  0:33     ` Robert Hancock
2019-06-01 20:10       ` Russell King - ARM Linux admin
2019-06-07 18:15         ` Robert Hancock
2019-05-31 20:11 ` [PATCH net-next] net: sfp: Set 1000BaseX support flag for 1000BaseT modules Russell King - ARM Linux admin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3e14a072-07c7-d7e0-a6ef-26643b0bb21b@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=hancock@sedsystems.ca \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.