Commit 3c7826d0b106 ("net: stmmac: Separate C22 and C45 transactions for xgmac") missed a change that happened in commit e2d0acd40c87 ("net: stmmac: using pm_runtime_resume_and_get instead of pm_runtime_get_sync"). Update the two clause 45 functions that didn't get switched to pm_runtime_resume_and_get(). Signed-off-by: Russell King (Oracle) --- I don't have any way to test this on real hardware as the Jetson Xavier NX doesn't have a C45 PHY. drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c index da4542be756a..0a302b711bc2 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c @@ -303,11 +303,9 @@ static int stmmac_mdio_read_c45(struct mii_bus *bus, int phyaddr, int devad, u32 value = MII_BUSY; int data = 0; - data = pm_runtime_get_sync(priv->device); - if (data < 0) { - pm_runtime_put_noidle(priv->device); + data = pm_runtime_resume_and_get(priv->device); + if (data < 0) return data; - } value |= (phyaddr << priv->hw->mii.addr_shift) & priv->hw->mii.addr_mask; @@ -399,11 +397,9 @@ static int stmmac_mdio_write_c45(struct mii_bus *bus, int phyaddr, int ret, data = phydata; u32 value = MII_BUSY; - ret = pm_runtime_get_sync(priv->device); - if (ret < 0) { - pm_runtime_put_noidle(priv->device); + ret = pm_runtime_resume_and_get(priv->device); + if (ret < 0) return ret; - } value |= (phyaddr << priv->hw->mii.addr_shift) & priv->hw->mii.addr_mask; -- 2.47.2