]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: improve handling of PHY_RUNNING in state machine
authorHeiner Kallweit <hkallweit1@gmail.com>
Thu, 11 Oct 2018 20:36:56 +0000 (22:36 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Oct 2018 05:06:38 +0000 (22:06 -0700)
commit0f9b9222fa61ef372fa083d168f28b6bd967379e
tree638910c925464a35fd1575734e42479dff9e8479
parentd0e10f5652f225b8b3cf4d000ba8dd1f9e6833e8
net: phy: improve handling of PHY_RUNNING in state machine

Handling of state PHY_RUNNING seems to be more complex than it needs
to be. If not polling, then we don't have to do anything, we'll
receive an interrupt and go to state PHY_CHANGELINK once the link
goes down. If polling and link is down, we don't have to go the
extra mile over PHY_CHANGELINK and call phy_read_status() again
but can set status PHY_NOLINK directly.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy.c