The irq handling thread (b44_interrupt) uses the same lock as the NAPI thread. This change should prevent a deadlock if something interrupts the b44 NAPI thread and tries to printk through netconsole.
Signed-off-by: Francois Romieu <[EMAIL PROTECTED]> --- drivers/net/b44.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/b44.c b/drivers/net/b44.c index 879a2ff..64d75e4 100644 --- a/drivers/net/b44.c +++ b/drivers/net/b44.c @@ -853,16 +853,18 @@ static int b44_rx(struct b44 *bp, int budget) static int b44_poll(struct net_device *netdev, int *budget) { struct b44 *bp = netdev_priv(netdev); + unsigned long flags; int done; - spin_lock_irq(&bp->lock); + spin_lock_irqsave(&bp->lock, flags); if (bp->istat & (ISTAT_TX | ISTAT_TO)) { /* spin_lock(&bp->tx_lock); */ b44_tx(bp); /* spin_unlock(&bp->tx_lock); */ } - spin_unlock_irq(&bp->lock); + + spin_unlock_irqrestore(&bp->lock, flags); done = 1; if (bp->istat & ISTAT_RX) { @@ -882,8 +884,6 @@ static int b44_poll(struct net_device *netdev, int *budget) } if (bp->istat & ISTAT_ERRORS) { - unsigned long flags; - spin_lock_irqsave(&bp->lock, flags); b44_halt(bp); b44_init_rings(bp); -- 1.5.2 - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html