This patch series is based on two axioms: - During autoneg a PHY always reports the link being down
- Info in clause 22/45 registers doesn't allow to differentiate between these two states: 1. Link is physically down 2. A link partner is connected and PHY is autonegotiating In both cases "link up" and "aneg finished" bits aren't set. One consequence is that having separate states PHY_NOLINK and PHY_AN isn't needed. By using these two axioms the state machine can be significantly simplified. Heiner Kallweit (5): net: phy: remove useless check in state machine case PHY_NOLINK net: phy: remove useless check in state machine case PHY_RESUMING net: phy: add phy_check_link_status net: phy: remove state PHY_AN net: phy: use phy_check_link_status in more places in the state machine drivers/net/phy/phy.c | 172 +++++++++++------------------------------- include/linux/phy.h | 19 +---- 2 files changed, 46 insertions(+), 145 deletions(-) -- 2.19.1