diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2022-04-21 11:16:09 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-04-21 11:16:09 +0200 |
commit | 4811863eae2d1e710862e10d7171edbe8041056f (patch) | |
tree | 8899ceeff211b381ec7f08e2dc6c8a3d44f4a1e7 /drivers/net/phy/phy.c | |
parent | 7a942b81e4d10b4f729c19b09b5d330bfeb6ba0e (diff) | |
parent | aaac1c35ed14c81a8ffc93874f8b004deae9e172 (diff) | |
download | barebox-4811863eae2d1e710862e10d7171edbe8041056f.tar.gz barebox-4811863eae2d1e710862e10d7171edbe8041056f.tar.xz |
Merge branch 'for-next/misc'
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r-- | drivers/net/phy/phy.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 85cdd7862f..adff9dadd1 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -54,6 +54,13 @@ int phy_update_status(struct phy_device *phydev) return ret; } + /* + * If the phy is a fixed-link, set it to active state to trigger + * MAC configuration + */ + if (!phydev->bus && !phydev->link) + phydev->link = 1; + if (phydev->speed == oldspeed && phydev->duplex == oldduplex && phydev->link == oldlink) return 0; @@ -311,7 +318,7 @@ struct phy_device *of_phy_register_fixed_link(struct device_node *np, phydev->dev.parent = &edev->dev; phydev->registered = 1; - phydev->link = 1; + phydev->link = 0; if (of_property_read_u32(np, "speed", &phydev->speed)) return NULL; @@ -401,10 +408,6 @@ static int phy_device_attach(struct phy_device *phy, struct eth_device *edev, phy->adjust_link = adjust_link; - /* If the phy is a fixed-link, then call adjust_link directly */ - if (!phy->bus && adjust_link) - adjust_link(edev); - return 0; } |