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:   Sun, 16 Dec 2018 18:19:23 +0100
From:   Heiner Kallweit <hkallweit1@...il.com>
To:     Florian Fainelli <f.fainelli@...il.com>,
        Andrew Lunn <andrew@...n.ch>,
        David Miller <davem@...emloft.net>
Cc:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net: phy: print error message in phy_error

On 16.12.2018 18:02, Florian Fainelli wrote:
> Le 12/16/18 à 7:52 AM, Heiner Kallweit a écrit :
>> So far phy_error() silently stops the PHY state machine. If the network
>> driver doesn't inform about a  MDIO error then the user may wonder why
>> his network is down. So let's inform the user.
>>
>> Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
> 
> Reviewed-by: Florian Fainelli <f.fainelli@...il.com>
> 
> Kind of similar to the netdev watchdog on a TX timeout, I wonder if we
> should not just put a WARN() here to get a complete stack trace to help
> debug those events?
> 
But it's good that you mention the WARN(). This is the better option in
the other patch I submitted today. I'll prepare an update to this patch.

>> ---
>>  drivers/net/phy/phy.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
>> index 890ae1d73..a898fa411 100644
>> --- a/drivers/net/phy/phy.c
>> +++ b/drivers/net/phy/phy.c
>> @@ -739,6 +739,8 @@ static void phy_error(struct phy_device *phydev)
>>  	phydev->state = PHY_HALTED;
>>  	mutex_unlock(&phydev->lock);
>>  
>> +	phydev_err(phydev, "stopping PHY state machine due to error\n");
>> +
>>  	phy_trigger_machine(phydev);
>>  }
>>  
>>
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ