net: phy: fix PHY_RUNNING in phy_state_machine
authorShaohui Xie <Shaohui.Xie@freescale.com>
Fri, 14 Aug 2015 04:23:40 +0000 (12:23 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Aug 2015 19:18:09 +0000 (12:18 -0700)
commit11e122cbe90ea5079622fb57bdf2dffe8cf68e57
tree3080f5a6d8efb6859d8256bced3ea08eb75bfe62
parent5d37852bf7d48e5afb5238a658cc167e7b78b381
net: phy: fix PHY_RUNNING in phy_state_machine

Currently, if phy state is PHY_RUNNING, we always register a CHANGE
when phy works in polling or interrupt ignored, this will make the
adjust_link being called even the phy link did Not changed.

checking the phy link to make sure the link did changed before we
register a CHANGE, if link did not changed, we do nothing.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy.c