net: sfp: ensure TX_FAULT has deasserted before probing the PHY
authorRussell King <rmk+kernel@armlinux.org.uk>
Sun, 10 Nov 2019 14:07:09 +0000 (14:07 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Nov 2019 00:17:01 +0000 (16:17 -0800)
commitd23751a094012f7d0d7b6fb694f3c1ecb19e4a41
tree947155dcdfe48445fc65875c38f2dffb28ac1294
parent63ec1c7c3f3b55b7e126d5fb54744869f2b6608e
net: sfp: ensure TX_FAULT has deasserted before probing the PHY

TX_FAULT should be deasserted to indicate that the module has completed
its initialisation.  This may include the on-board PHY, so wait until
the module has deasserted TX_FAULT before probing the PHY.

This means that we need an extra state to handle a TX_FAULT that
remains set for longer than t_init, since using the existing handling
state would bypass the PHY probe.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/sfp.c