aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/forcedeth.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 2cb244763292..20d4fe96a81c 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -4194,12 +4194,23 @@ static int nv_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)
4194 4194
4195 netif_carrier_off(dev); 4195 netif_carrier_off(dev);
4196 if (netif_running(dev)) { 4196 if (netif_running(dev)) {
4197 unsigned long flags;
4198
4197 nv_disable_irq(dev); 4199 nv_disable_irq(dev);
4198 netif_tx_lock_bh(dev); 4200 netif_tx_lock_bh(dev);
4199 spin_lock(&np->lock); 4201 /* with plain spinlock lockdep complains */
4202 spin_lock_irqsave(&np->lock, flags);
4200 /* stop engines */ 4203 /* stop engines */
4204 /* FIXME:
4205 * this can take some time, and interrupts are disabled
4206 * due to spin_lock_irqsave, but let's hope no daemon
4207 * is going to change the settings very often...
4208 * Worst case:
4209 * NV_RXSTOP_DELAY1MAX + NV_TXSTOP_DELAY1MAX
4210 * + some minor delays, which is up to a second approximately
4211 */
4201 nv_stop_rxtx(dev); 4212 nv_stop_rxtx(dev);
4202 spin_unlock(&np->lock); 4213 spin_unlock_irqrestore(&np->lock, flags);
4203 netif_tx_unlock_bh(dev); 4214 netif_tx_unlock_bh(dev);
4204 } 4215 }
4205 4216