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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190528162356.xjq53h4z7edvr3gl@shell.armlinux.org.uk>
Date:   Tue, 28 May 2019 17:23:56 +0100
From:   Russell King - ARM Linux admin <linux@...linux.org.uk>
To:     Andrew Lunn <andrew@...n.ch>
Cc:     Florian Fainelli <f.fainelli@...il.com>,
        Heiner Kallweit <hkallweit1@...il.com>,
        Maxime Chevallier <maxime.chevallier@...tlin.com>,
        "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH] net: phy: marvell10g: report if the PHY fails to boot
 firmware

On Tue, May 28, 2019 at 06:11:39PM +0200, Andrew Lunn wrote:
> > One question: are we happy with failing the probe like this, or would it
> > be better to allow the probe to suceed?
> > 
> > As has been pointed out in the C45 MII access patch, we need the PHY
> > to bind to the network driver for the MII bus to be accessible to
> > userspace, so if we're going to have userspace tools to upload the
> > firmware, rather than using u-boot, we need the PHY to be present and
> > bound to the network interface.
> 
> Hi Russell
> 
> It is an interesting question. Failing the probe is the simple
> solution. If we don't fail the probe, we then need to allow the
> attach, but fail all normal operations, with a noisy kernel log.  That
> probably means adding a new state to the state machine, PHY_BROKEN.
> Enter that state if phy_start_aneg() returns an error?

Hi Andrew,

I don't think we need a new state - I think we can trap it in
the link_change_notify() method, and force phydev->state to
PHY_HALTED if it's in phy_is_started() mode.

Maybe something like:

	if (phy_is_started(phydev) && priv->firmware_failed) {
		dev_warn(&phydev->mdio.dev,
			 "PHY firmware failure: link forced down");
		phydev->state = PHY_HALTED;
	}

Or maybe we just need to do that if phydev->state == PHY_UP or
PHY_RESUMING (the two states entered from phy_start())?

Russell.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ