summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/net/phy/sfp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c
index 1f5edc351b2d..294f59e140b0 100644
--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
@@ -1236,10 +1236,11 @@ static int sfp_probe(struct platform_device *pdev)
phylink_register_module(sfp->phylink, sfp, &sfp_module_ops);
}
- sfp->state = sfp_get_state(sfp);
- if (sfp->gpio[GPIO_TX_DISABLE] &&
- gpiod_get_value_cansleep(sfp->gpio[GPIO_TX_DISABLE]))
- sfp->state |= SFP_F_TX_DISABLE;
+ /* Get the initial state, and always signal TX disable,
+ * since the network interface will not be up.
+ */
+ sfp->state = sfp_get_state(sfp) | SFP_F_TX_DISABLE;
+
if (sfp->gpio[GPIO_RATE_SELECT] &&
gpiod_get_value_cansleep(sfp->gpio[GPIO_RATE_SELECT]))
sfp->state |= SFP_F_RATE_SELECT;