lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 19 Oct 2020 21:43:18 +0000
From:   Robert Hancock <robert.hancock@...ian.com>
To:     "andrew@...n.ch" <andrew@...n.ch>
CC:     "linux@...linux.org.uk" <linux@...linux.org.uk>,
        "hkallweit1@...il.com" <hkallweit1@...il.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH] net: phy: marvell: add special handling of Finisar
 modules with 81E1111

On Mon, 2020-10-19 at 23:00 +0200, Andrew Lunn wrote:
> > +static int m88e1111_finisar_config_init(struct phy_device *phydev)
> > +{
> > +	int err;
> > +	int extsr = phy_read(phydev, MII_M1111_PHY_EXT_SR);
> > +
> > +	if (extsr < 0)
> > +		return extsr;
> > +
> > +	/* If using 1000BaseX and 1000BaseX auto-negotiation is
> > disabled, enable it */
> > +	if (phydev->interface == PHY_INTERFACE_MODE_1000BASEX &&
> > +	    (extsr & MII_M1111_HWCFG_MODE_MASK) ==
> > +	    MII_M1111_HWCFG_MODE_COPPER_1000BX_NOAN) {
> > +		err = phy_modify(phydev, MII_M1111_PHY_EXT_SR,
> > +				 MII_M1111_HWCFG_MODE_MASK |
> > +				 MII_M1111_HWCFG_SERIAL_AN_BYPASS,
> > +				 MII_M1111_HWCFG_MODE_COPPER_1000BX_AN
> > |
> > +				 MII_M1111_HWCFG_SERIAL_AN_BYPASS);
> > +		if (err < 0)
> > +			return err;
> > +	}
> > +
> > +	return m88e1111_config_init(phydev);
> > +}
> 
> Hi Robert
> 
> Is this really specific to the Finisar? It seems like any application
> of the m88e1111 in 1000BaseX would benefit from this?

I suppose that part would be pretty harmless, as you would likely want
that behavior whenever that if condition was triggered. So
m88e1111_finisar_config_init could likely be merged into
m88e1111_config_init.

Mainly what stopped me from making all of these changes generic to all
88E1111 is that I'm a bit less confident in the different config_aneg
behavior, it might be more specific to this SFP copper module case? 

-- 
Robert Hancock
Senior Hardware Designer, Advanced Technologies 
www.calian.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ