All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Robert Hancock <robert.hancock@calian.com>
Cc: andrew@lunn.ch, hkallweit1@gmail.com, davem@davemloft.net,
	kuba@kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 2/2] net: phy: at803x: Support downstream SFP cage
Date: Fri, 2 Jul 2021 00:12:53 +0100	[thread overview]
Message-ID: <20210701231253.GM22278@shell.armlinux.org.uk> (raw)
In-Reply-To: <20210630180146.1121925-3-robert.hancock@calian.com>

On Wed, Jun 30, 2021 at 12:01:46PM -0600, Robert Hancock wrote:
> Add support for downstream SFP cages for AR8031 and AR8033. This is
> primarily intended for fiber modules or direct-attach cables, however
> copper modules which work in 1000Base-X mode may also function. Such
> modules are allowed with a warning.

Possibly that's because they default to 1000Base-X mode for
compatibility, but there are some (MikroTik S-RJ01) for example
where the PHY definitely is in SGMII mode and will negotiate
10/100Mbit on its media side which won't work with an AR803x.

> +	/* Some modules support 10G modes as well as others we support.
> +	 * Mask out non-supported modes so the correct interface is picked.
> +	 */
> +	linkmode_and(sfp_support, phy_support, sfp_support);

I think rather than relying on sfp_select_interface() complaining when
sfp_support is empty, do an explicit check here (phylink code
effectively does this via the phylink_validate() check.)

You'll then either be given SGMII or 1000BASE-X by
sfp_select_interface().

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

      reply	other threads:[~2021-07-01 23:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-30 18:01 [PATCH net-next 0/2] at803x fiber/SFP support Robert Hancock
2021-06-30 18:01 ` [PATCH net-next 1/2] net: phy: at803x: add fiber support Robert Hancock
2021-07-01 23:05   ` Russell King (Oracle)
2021-06-30 18:01 ` [PATCH net-next 2/2] net: phy: at803x: Support downstream SFP cage Robert Hancock
2021-07-01 23:12   ` Russell King (Oracle) [this message]

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=20210701231253.GM22278@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=robert.hancock@calian.com \
    /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.