Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98761
b: refs/heads/master
c: 97bff09
h: refs/heads/master
i:
  98759: 30e51f9
v: v3
  • Loading branch information
Tobias Diedrich authored and Jeff Garzik committed Jul 4, 2008
1 parent 067d360 commit 56f18be
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 54364b752ef0c91fe92684df000cc4593d1e8963
refs/heads/master: 97bff0953dd45a633fa69e1a650d612f5610a60b
15 changes: 13 additions & 2 deletions trunk/drivers/net/forcedeth.c
Original file line number Diff line number Diff line change
Expand Up @@ -4194,12 +4194,23 @@ static int nv_set_settings(struct net_device *dev, struct ethtool_cmd *ecmd)

netif_carrier_off(dev);
if (netif_running(dev)) {
unsigned long flags;

nv_disable_irq(dev);
netif_tx_lock_bh(dev);
spin_lock(&np->lock);
/* with plain spinlock lockdep complains */
spin_lock_irqsave(&np->lock, flags);
/* stop engines */
/* FIXME:
* this can take some time, and interrupts are disabled
* due to spin_lock_irqsave, but let's hope no daemon
* is going to change the settings very often...
* Worst case:
* NV_RXSTOP_DELAY1MAX + NV_TXSTOP_DELAY1MAX
* + some minor delays, which is up to a second approximately
*/
nv_stop_rxtx(dev);
spin_unlock(&np->lock);
spin_unlock_irqrestore(&np->lock, flags);
netif_tx_unlock_bh(dev);
}

Expand Down

0 comments on commit 56f18be

Please sign in to comment.