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]
Message-ID: <20201030163158.GE1551@shell.armlinux.org.uk>
Date:   Fri, 30 Oct 2020 16:31:58 +0000
From:   Russell King - ARM Linux admin <linux@...linux.org.uk>
To:     Marek BehĂșn <kabel@...nel.org>
Cc:     netdev@...r.kernel.org, davem@...emloft.net,
        Andrew Lunn <andrew@...n.ch>
Subject: Re: [PATCH net-next v2 3/5] net: sfp: create/destroy I2C mdiobus
 before PHY probe/after PHY release

On Thu, Oct 29, 2020 at 11:25:07PM +0100, Marek BehĂșn wrote:
> @@ -1936,8 +1950,10 @@ static void sfp_sm_main(struct sfp *sfp, unsigned int event)
>  			sfp_sm_link_down(sfp);
>  		if (sfp->sm_state > SFP_S_INIT)
>  			sfp_module_stop(sfp->sfp_bus);
> -		if (sfp->mod_phy)
> +		if (sfp->mod_phy) {
>  			sfp_sm_phy_detach(sfp);
> +			sfp_i2c_mdiobus_destroy(sfp);
> +		}

		if (sfp->mod_phy)
			sfp_sm_phy_detach(sfp);
		if (sfp->i2c_mii)
			sfp_i2c_mdiobus_destroy(sfp);

would be better IMHO, in case we end up with the MDIO bus registered
but don't discover a PHY. (which is entirely possible with Mikrotik
SFPs where the PHY is not accessible.)

Other than that, I don't see any obvious issues.

Thanks.

-- 
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ