Subject: Re: [PATCH net-next v4 0/3] at803x fiber/SFP support

From: "Russell King (Oracle)" <[email-masked]>
Date: Wed, 26 Jan 2022 14:06:55 +0000

On Wed, Jan 26, 2022 at 04:56:40PM +0300, Andrey Jr. Melnikov wrote:
> On Tue, Jan 25, 2022 at 10:54:07AM -0600, Robert Hancock wrote:
> > Add support for 1000Base-X fiber modes to the at803x PHY driver, as
> > well as support for connecting a downstream SFP cage.
> > 
> > Changes since v3:
> > -Renamed some constants with OHM suffix for clarity
> > 
> > Changes since v2:
> > -fixed tabs/spaces issue in one patch
> > 
> > Changes since v1:
> > -moved page selection to config_init so it is handled properly
> > after suspend/resume
> > -added explicit check for empty sfp_support bitmask
> > 
> > Robert Hancock (3):
> >   net: phy: at803x: move page selection fix to config_init
> >   net: phy: at803x: add fiber support
> >   net: phy: at803x: Support downstream SFP cage
> > 
> Backported this series to 5.15.16 and tested on Ubiquiti EdgeRouter X SFP
> hardware. Optical SFP modules working without problems, but cooper SFP with
> Marvell 88E1111 not work - link is up but no packets sent/recieved via
> interface.

Could be that the 88E1111 is in SGMII mode, and with the 803x in
1000base-x mode, they just don't want to talk... and having a link up
event with an optical SFP (in 1000base-x mode) changes the state in the
803x so it somehow works.

SGMII and 1000base-x are similar enough that it can appear to work at
gigabit speeds if everything is just right.

> Can someone explain - why copper module not work from boot? And how controll 88E1111
> inside SFP ?

The Linux networking layer only permits one PHY per network interface,
so in the case of a SFP with a PHY connected to another PHY, the only
PHY we can expose is the PHY closest to the network interface. There
is no way e.g. via ethtool to be able to direct the PHY specific
ethtool calls to a specific PHY.

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