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] [day] [month] [year] [list]
Message-Id: <20181218.151204.439006573694790621.davem@davemloft.net>
Date:   Tue, 18 Dec 2018 15:12:04 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     hkallweit1@...il.com
Cc:     andrew@...n.ch, f.fainelli@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH v3 net-next] net: phy: improve phy state checking

From: Heiner Kallweit <hkallweit1@...il.com>
Date: Sun, 16 Dec 2018 18:30:14 +0100

> Add helpers phy_is_started() and __phy_is_started() to avoid open-coded
> checks whether PHY has been started. To make the check easier move
> PHY_HALTED before PHY_UP in enum phy_state. Further improvements:
> 
> phy_start_aneg():
> Return -EBUSY and print warning if function is called from a non-started
> state (DOWN, READY, HALTED). Better check because function is exported
> and drivers may use it incorrectly.
> 
> phy_interrupt():
> Return IRQ_NONE also if state is DOWN or READY. We should never receive
> an interrupt in one of these states, but better play safe.
> 
> phy_stop():
> Just return and print a warning if PHY is in a non-started state.
> This warning should help to identify drivers with unbalanced calls to
> phy_start() / phy_stop().
> 
> phy_state_machine():
> Schedule state machine run only if PHY is in a started state.
> E.g. if state is READY we don't need the state machine, it will be
> started by phy_start().
> 
> v2:
> - don't use __func__ within phy_warn_state
> v3:
> - use WARN() instead of printing error message to facilitate debugging
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>

Applied.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ