net: phy: don't double-read link status register if link is up
authorHeiner Kallweit <hkallweit1@gmail.com>
Thu, 7 Feb 2019 19:22:20 +0000 (20:22 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 9 Feb 2019 07:01:49 +0000 (23:01 -0800)
commitc397ab21ba362d5c5215e53f36685a9fffc45f66
tree7a96407c8fcaff6869aa3e42c4b892c5f31381f3
parent9a00536c38e9df8b6d942316888990d849fe1d01
net: phy: don't double-read link status register if link is up

The link status register latches link-down events. Therefore, if link
is reported as being up, there's no need for a second read.

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