Commit 78654ea7 authored by David S. Miller's avatar David S. Miller

[TG3]: Fix bugs in ETHTOOL_SSET introduced by ethtool_ops conversion.

- Missing spin_lock*() calls before tp->link_config twiddling.
- Missing assignment to tp->link_config.autoneg
parent 848fd5f3
...@@ -5935,6 +5935,10 @@ static int tg3_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) ...@@ -5935,6 +5935,10 @@ static int tg3_set_settings(struct net_device *dev, struct ethtool_cmd *cmd)
tp->link_config.phy_is_low_power) tp->link_config.phy_is_low_power)
return -EAGAIN; return -EAGAIN;
spin_lock_irq(&tp->lock);
spin_lock(&tp->tx_lock);
tp->link_config.autoneg = cmd->autoneg;
if (cmd->autoneg == AUTONEG_ENABLE) { if (cmd->autoneg == AUTONEG_ENABLE) {
tp->link_config.advertising = cmd->advertising; tp->link_config.advertising = cmd->advertising;
tp->link_config.speed = SPEED_INVALID; tp->link_config.speed = SPEED_INVALID;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment