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