Re: [PATCH] net: phy: marvell: add special handling of Finisar modules with 81E1111

2020-10-19 Thread Robert Hancock
On Tue, 2020-10-20 at 00:12 +0200, Andrew Lunn wrote: > > I think in my case those extra modes only supported in SGMII mode, > > like > > 10 and 100Mbps modes, effectively get filtered out because the MAC > > doesn't support them in the 1000BaseX mode either. > > There are different things here. W

Re: [PATCH] net: phy: marvell: add special handling of Finisar modules with 81E1111

2020-10-19 Thread Russell King - ARM Linux admin
On Tue, Oct 20, 2020 at 12:12:32AM +0200, Andrew Lunn wrote: > > The auto-negotiation is a bit of a weird thing in this case, as there > > are two negotiations occurring, the 1000BaseX between the PCS/PMA PHY > > and the module PHY, and the 1000BaseT between the module PHY and the > > copper link p

Re: [PATCH] net: phy: marvell: add special handling of Finisar modules with 81E1111

2020-10-19 Thread Andrew Lunn
> I think in my case those extra modes only supported in SGMII mode, like > 10 and 100Mbps modes, effectively get filtered out because the MAC > doesn't support them in the 1000BaseX mode either. There are different things here. What ethtool reports, and what is programmed into the advertise regis

Re: [PATCH] net: phy: marvell: add special handling of Finisar modules with 81E1111

2020-10-19 Thread Robert Hancock
On Mon, 2020-10-19 at 23:59 +0200, Andrew Lunn wrote: > > I suppose that part would be pretty harmless, as you would likely > > want > > that behavior whenever that if condition was triggered. So > > m88e_finisar_config_init could likely be merged into > > m88e_config_init. > > I think so

Re: [PATCH] net: phy: marvell: add special handling of Finisar modules with 81E1111

2020-10-19 Thread Russell King - ARM Linux admin
On Mon, Oct 19, 2020 at 09:32:56PM +, Robert Hancock wrote: > On Mon, 2020-10-19 at 22:08 +0100, Russell King - ARM Linux admin > wrote: > > On Mon, Oct 19, 2020 at 02:49:13PM -0600, Robert Hancock wrote: > > > The Finisar FCLF8520P2BTL 1000BaseT SFP module uses a Marvel > > > 81E PHY > >

Re: [PATCH] net: phy: marvell: add special handling of Finisar modules with 81E1111

2020-10-19 Thread Robert Hancock
On Mon, 2020-10-19 at 23:45 +0200, Andrew Lunn wrote: > > I have a local patch that just falls back to trying 1000BaseX mode > > if the driver reports SGMII isn't supported and it seems like it > > might be a copper module, but that is a bit of a hack that may need > > to be handled differently. >

Re: [PATCH] net: phy: marvell: add special handling of Finisar modules with 81E1111

2020-10-19 Thread Andrew Lunn
> I suppose that part would be pretty harmless, as you would likely want > that behavior whenever that if condition was triggered. So > m88e_finisar_config_init could likely be merged into > m88e_config_init. I think so as well. > Mainly what stopped me from making all of these changes ge

Re: [PATCH] net: phy: marvell: add special handling of Finisar modules with 81E1111

2020-10-19 Thread Andrew Lunn
> I have a local patch that just falls back to trying 1000BaseX mode > if the driver reports SGMII isn't supported and it seems like it > might be a copper module, but that is a bit of a hack that may need > to be handled differently. Do you also modify what the PHY is advertising to remove the mo

Re: [PATCH] net: phy: marvell: add special handling of Finisar modules with 81E1111

2020-10-19 Thread Robert Hancock
On Mon, 2020-10-19 at 23:00 +0200, Andrew Lunn wrote: > > +static int m88e_finisar_config_init(struct phy_device *phydev) > > +{ > > + int err; > > + int extsr = phy_read(phydev, MII_M_PHY_EXT_SR); > > + > > + if (extsr < 0) > > + return extsr; > > + > > + /* If using 1000

Re: [PATCH] net: phy: marvell: add special handling of Finisar modules with 81E1111

2020-10-19 Thread Robert Hancock
On Mon, 2020-10-19 at 22:08 +0100, Russell King - ARM Linux admin wrote: > On Mon, Oct 19, 2020 at 02:49:13PM -0600, Robert Hancock wrote: > > The Finisar FCLF8520P2BTL 1000BaseT SFP module uses a Marvel > > 81E PHY > > You mean 88E here. > Whoops, will fix in an updated version. > > wi

Re: [PATCH] net: phy: marvell: add special handling of Finisar modules with 81E1111

2020-10-19 Thread Russell King - ARM Linux admin
On Mon, Oct 19, 2020 at 11:06:54PM +0200, Andrew Lunn wrote: > On Mon, Oct 19, 2020 at 02:49:13PM -0600, Robert Hancock wrote: > > The Finisar FCLF8520P2BTL 1000BaseT SFP module uses a Marvel 81E PHY > > with a modified PHY ID, and by default does not have 1000BaseX > > auto-negotiation enabled

Re: [PATCH] net: phy: marvell: add special handling of Finisar modules with 81E1111

2020-10-19 Thread Russell King - ARM Linux admin
On Mon, Oct 19, 2020 at 02:49:13PM -0600, Robert Hancock wrote: > The Finisar FCLF8520P2BTL 1000BaseT SFP module uses a Marvel 81E PHY You mean 88E here. > with a modified PHY ID, and by default does not have 1000BaseX > auto-negotiation enabled, which is not generally desirable with Linu

Re: [PATCH] net: phy: marvell: add special handling of Finisar modules with 81E1111

2020-10-19 Thread Andrew Lunn
On Mon, Oct 19, 2020 at 02:49:13PM -0600, Robert Hancock wrote: > The Finisar FCLF8520P2BTL 1000BaseT SFP module uses a Marvel 81E PHY > with a modified PHY ID, and by default does not have 1000BaseX > auto-negotiation enabled, which is not generally desirable with Linux > networking drivers.

Re: [PATCH] net: phy: marvell: add special handling of Finisar modules with 81E1111

2020-10-19 Thread Andrew Lunn
> +static int m88e_finisar_config_init(struct phy_device *phydev) > +{ > + int err; > + int extsr = phy_read(phydev, MII_M_PHY_EXT_SR); > + > + if (extsr < 0) > + return extsr; > + > + /* If using 1000BaseX and 1000BaseX auto-negotiation is disabled, > enable it

[PATCH] net: phy: marvell: add special handling of Finisar modules with 81E1111

2020-10-19 Thread Robert Hancock
The Finisar FCLF8520P2BTL 1000BaseT SFP module uses a Marvel 81E PHY with a modified PHY ID, and by default does not have 1000BaseX auto-negotiation enabled, which is not generally desirable with Linux networking drivers. Add handling to enable 1000BaseX auto-negotiation. Also, it requires some