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] [day] [month] [year] [list]
Date:   Sun, 18 Jun 2017 00:39:18 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Zach Brown <zach.brown@...com>
Cc:     f.fainelli@...il.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net/phy: micrel: configure intterupts after autoneg
 workaround

On Fri, Jun 16, 2017 at 12:20:07PM -0500, Zach Brown wrote:
> The commit ("net/phy: micrel: Add workaround for bad autoneg") fixes
> an autoneg failure case by resetting the hardware. This turns off
> intterupts. Things will work themselves out if the phy
> polls, as it will figure out it's state during a poll. However if the
> phy uses only intterupts, the phy will stall, since interrupts
> are off.
> 
> This patch fixes the issue by calling config_intr after resetting the
> phy.
> 
> Fixes: d2fd719bcb0e ("net/phy: micrel: Add workaround for bad autoneg ")
> Signed-off-by: Zach Brown <zach.brown@...com>
> ---
>  drivers/net/phy/micrel.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
> index 9365b07..bc2a0a4 100644
> --- a/drivers/net/phy/micrel.c
> +++ b/drivers/net/phy/micrel.c
> @@ -620,6 +620,8 @@ static int ksz9031_read_status(struct phy_device *phydev)
>  	if ((regval & 0xFF) == 0xFF) {
>  		phy_init_hw(phydev);
>  		phydev->link = 0;
> +		if (phydev->drv->config_intr)
> +			phydev->drv->config_intr(phydev);

The core will only call the config_intr() method if
phy_interrupt_is_valid() is true.

I would suggest you do the same here. Otherwise there is a danger of
enabling interrupts without having an interrupt handler registered.

  Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ