Skip to content

Commit d003d86

Browse files
pelwellpopcornmix
authored andcommitted
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>
1 parent b2f773b commit d003d86

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/usb/lan78xx.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2935,7 +2935,9 @@ static int lan78xx_phy_init(struct lan78xx_net *dev)
29352935
"microchip,tx-lpi-timer",
29362936
&edata.tx_lpi_timer))
29372937
edata.tx_lpi_timer = 600; /* non-aggressive */
2938+
rtnl_lock();
29382939
(void)lan78xx_set_eee(dev->net, &edata);
2940+
rtnl_unlock();
29392941

29402942
phy_support_eee(phydev);
29412943
}

0 commit comments

Comments
 (0)