mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
lan78xx: Fix boot-time RTNL warning
lan78xx_set_eee calls phylink_ethtool_set_eee, which WARNs if rtnl_lock has not been called. This is fine when called via the ethtool_ops .set_eee entry point, presumably because the lock is already held, but lan78xx_probe also calls lan78xx_set_eee via lan78xx_phy_init, which requires an explicit rtnl_lock/unlock pair to avoid the warning. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
This commit is contained in:
@@ -2935,7 +2935,9 @@ static int lan78xx_phy_init(struct lan78xx_net *dev)
|
||||
"microchip,tx-lpi-timer",
|
||||
&edata.tx_lpi_timer))
|
||||
edata.tx_lpi_timer = 600; /* non-aggressive */
|
||||
rtnl_lock();
|
||||
(void)lan78xx_set_eee(dev->net, &edata);
|
||||
rtnl_unlock();
|
||||
|
||||
phy_support_eee(phydev);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user