[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210701231253.GM22278@shell.armlinux.org.uk>
Date: Fri, 2 Jul 2021 00:12:53 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Robert Hancock <robert.hancock@...ian.com>
Cc: andrew@...n.ch, hkallweit1@...il.com, davem@...emloft.net,
kuba@...nel.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 2/2] net: phy: at803x: Support downstream SFP
cage
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!
Powered by blists - more mailing lists