net: phy: marvell-88x2222: check that link is operational
authorIvan Bornyakov <i.bornyakov@metrotek.ru>
Tue, 13 Apr 2021 20:54:50 +0000 (23:54 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Apr 2021 19:56:44 +0000 (12:56 -0700)
commit58581478a734b07eb27032299fcb36caa4f9988b
tree63ccfacc2df415dea64de0cd4a2537347804ff17
parent87b7e5c05c98c5f3947345d7fba68472e43cf611
net: phy: marvell-88x2222: check that link is operational

Some SFP modules uses RX_LOS for link indication. In such cases link
will be always up, even without cable connected. RX_LOS changes will
trigger link_up()/link_down() upstream operations. Thus, check that SFP
link is operational before actual read link status.

If there is no SFP cage connected to the tranciever, check only PMD
Recieve Signal Detect register.

Signed-off-by: Ivan Bornyakov <i.bornyakov@metrotek.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/marvell-88x2222.c