Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cab6715c authored by Yang Wei's avatar Yang Wei Committed by David S. Miller
Browse files

net: driver: stmicro: Remove some useless the lock protection



kernel always invokes a pair of rtnl_lock adn rtnl_unlock to
protect dev_ethtool(), so its not neccessary to invoke spin_lock/unlock
in ethtool_ops.

Signed-off-by: default avatarYang Wei <Wei.Yang@windriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ea5930f4
Loading
Loading
Loading
Loading
+0 −6
Original line number Original line Diff line number Diff line
@@ -322,9 +322,7 @@ static int stmmac_ethtool_getsettings(struct net_device *dev,
		return -EBUSY;
		return -EBUSY;
	}
	}
	cmd->transceiver = XCVR_INTERNAL;
	cmd->transceiver = XCVR_INTERNAL;
	spin_lock_irq(&priv->lock);
	rc = phy_ethtool_gset(phy, cmd);
	rc = phy_ethtool_gset(phy, cmd);
	spin_unlock_irq(&priv->lock);
	return rc;
	return rc;
}
}


@@ -442,7 +440,6 @@ stmmac_get_pauseparam(struct net_device *netdev,
	if (priv->flow_ctrl & FLOW_TX)
	if (priv->flow_ctrl & FLOW_TX)
		pause->tx_pause = 1;
		pause->tx_pause = 1;


	spin_unlock(&priv->lock);
}
}


static int
static int
@@ -457,8 +454,6 @@ stmmac_set_pauseparam(struct net_device *netdev,
	if (priv->pcs)	/* FIXME */
	if (priv->pcs)	/* FIXME */
		return -EOPNOTSUPP;
		return -EOPNOTSUPP;


	spin_lock(&priv->lock);

	if (pause->rx_pause)
	if (pause->rx_pause)
		new_pause |= FLOW_RX;
		new_pause |= FLOW_RX;
	if (pause->tx_pause)
	if (pause->tx_pause)
@@ -473,7 +468,6 @@ stmmac_set_pauseparam(struct net_device *netdev,
	} else
	} else
		priv->hw->mac->flow_ctrl(priv->ioaddr, phy->duplex,
		priv->hw->mac->flow_ctrl(priv->ioaddr, phy->duplex,
					 priv->flow_ctrl, priv->pause);
					 priv->flow_ctrl, priv->pause);
	spin_unlock(&priv->lock);
	return ret;
	return ret;
}
}