Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: stmmac: mdio: update runtime PM

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) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/E1urv09-00000000gJ1-3SxO@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Russell King (Oracle) and committed by
Jakub Kicinski
ec0b1eee c85ae024

+4 -8
+4 -8
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
··· 303 303 u32 value = MII_BUSY; 304 304 int data = 0; 305 305 306 - data = pm_runtime_get_sync(priv->device); 307 - if (data < 0) { 308 - pm_runtime_put_noidle(priv->device); 306 + data = pm_runtime_resume_and_get(priv->device); 307 + if (data < 0) 309 308 return data; 310 - } 311 309 312 310 value |= (phyaddr << priv->hw->mii.addr_shift) 313 311 & priv->hw->mii.addr_mask; ··· 397 399 int ret, data = phydata; 398 400 u32 value = MII_BUSY; 399 401 400 - ret = pm_runtime_get_sync(priv->device); 401 - if (ret < 0) { 402 - pm_runtime_put_noidle(priv->device); 402 + ret = pm_runtime_resume_and_get(priv->device); 403 + if (ret < 0) 403 404 return ret; 404 - } 405 405 406 406 value |= (phyaddr << priv->hw->mii.addr_shift) 407 407 & priv->hw->mii.addr_mask;