Skip to content

Commit

Permalink
mv643xx_eth: fix inconsistent lock semantics
Browse files Browse the repository at this point in the history
Nicolas Pitre noted that mv643xx_eth_poll was incorrectly using
non-IRQ-safe locks while checking whether to wake up the netdevice's
transmit queue.  Convert the locking to *_irq() variants, since we
are running from softirq context where interrupts are enabled.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
  • Loading branch information
Lennert Buytenhek authored and Lennert Buytenhek committed Aug 24, 2008
1 parent 92c70f2 commit 8e0b1bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/mv643xx_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -634,9 +634,9 @@ static int mv643xx_eth_poll(struct napi_struct *napi, int budget)
txq_reclaim(mp->txq + i, 0);

if (netif_carrier_ok(mp->dev)) {
spin_lock(&mp->lock);
spin_lock_irq(&mp->lock);
__txq_maybe_wake(mp->txq + mp->txq_primary);
spin_unlock(&mp->lock);
spin_unlock_irq(&mp->lock);
}
}
#endif
Expand Down

0 comments on commit 8e0b1bf

Please sign in to comment.