Skip to content

Commit 7df0b33

Browse files
david-mlekuba-moo
authored andcommitted
net: phy: mscc: remove unnecessary phydev locking
Holding the struct phy_device (phydev) lock is unnecessary when accessing phydev->interface in the PHY driver .config_init method, which is the only place that vsc85xx_rgmii_set_skews() is called from. The phy_modify_paged() function implements required MDIO bus level locking, which can not be achieved by a phydev lock. Signed-off-by: David Epping <[email protected]> Reviewed-by: Russell King (Oracle) <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent fb055ce commit 7df0b33

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/net/phy/mscc/mscc_main.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,6 @@ static int vsc85xx_rgmii_set_skews(struct phy_device *phydev, u32 rgmii_cntl,
528528
u16 reg_val = 0;
529529
int rc;
530530

531-
mutex_lock(&phydev->lock);
532-
533531
if (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID ||
534532
phydev->interface == PHY_INTERFACE_MODE_RGMII_ID)
535533
reg_val |= RGMII_CLK_DELAY_2_0_NS << rgmii_rx_delay_pos;
@@ -542,8 +540,6 @@ static int vsc85xx_rgmii_set_skews(struct phy_device *phydev, u32 rgmii_cntl,
542540
rgmii_rx_delay_mask | rgmii_tx_delay_mask,
543541
reg_val);
544542

545-
mutex_unlock(&phydev->lock);
546-
547543
return rc;
548544
}
549545

0 commit comments

Comments
 (0)