diff options
author | Timo Jantunen <jeti@iki.fi> | 2007-08-14 14:56:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-18 12:58:51 -0400 |
commit | 1a2b73302aacddf2543f9d7a25936e4323fa1486 (patch) | |
tree | cf69d0e212c9187696c205e9f9330e09f44c4c87 /drivers/net | |
parent | 62be90012c507b2bf1047eb2eaa1e9151f7172fe (diff) |
fix random hang in forcedeth driver when using netconsole
If the forcedeth driver receives too much work in an interrupt, it
assumes it has a broken hardware with stuck IRQ. It works around the
problem by disabling interrupts on the nic but makes a printk while
holding device spinlog - which isn't smart thing to do if you have
netconsole on the same nic.
This patch moves the printk's out of the spinlock protected area.
Without this patch the machine hangs hard. With this patch everything
still works even when there is significant increase on CPU usage while
using the nic.
Signed-off-by: Timo Jantunen <jeti@iki.fi>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/forcedeth.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 69f5f365239a..10f4e3b55168 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -3068,8 +3068,8 @@ static irqreturn_t nv_nic_irq(int foo, void *data) | |||
3068 | np->nic_poll_irq = np->irqmask; | 3068 | np->nic_poll_irq = np->irqmask; |
3069 | mod_timer(&np->nic_poll, jiffies + POLL_WAIT); | 3069 | mod_timer(&np->nic_poll, jiffies + POLL_WAIT); |
3070 | } | 3070 | } |
3071 | printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq.\n", dev->name, i); | ||
3072 | spin_unlock(&np->lock); | 3071 | spin_unlock(&np->lock); |
3072 | printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq.\n", dev->name, i); | ||
3073 | break; | 3073 | break; |
3074 | } | 3074 | } |
3075 | 3075 | ||
@@ -3186,8 +3186,8 @@ static irqreturn_t nv_nic_irq_optimized(int foo, void *data) | |||
3186 | np->nic_poll_irq = np->irqmask; | 3186 | np->nic_poll_irq = np->irqmask; |
3187 | mod_timer(&np->nic_poll, jiffies + POLL_WAIT); | 3187 | mod_timer(&np->nic_poll, jiffies + POLL_WAIT); |
3188 | } | 3188 | } |
3189 | printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq.\n", dev->name, i); | ||
3190 | spin_unlock(&np->lock); | 3189 | spin_unlock(&np->lock); |
3190 | printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq.\n", dev->name, i); | ||
3191 | break; | 3191 | break; |
3192 | } | 3192 | } |
3193 | 3193 | ||
@@ -3233,8 +3233,8 @@ static irqreturn_t nv_nic_irq_tx(int foo, void *data) | |||
3233 | np->nic_poll_irq |= NVREG_IRQ_TX_ALL; | 3233 | np->nic_poll_irq |= NVREG_IRQ_TX_ALL; |
3234 | mod_timer(&np->nic_poll, jiffies + POLL_WAIT); | 3234 | mod_timer(&np->nic_poll, jiffies + POLL_WAIT); |
3235 | } | 3235 | } |
3236 | printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_tx.\n", dev->name, i); | ||
3237 | spin_unlock_irqrestore(&np->lock, flags); | 3236 | spin_unlock_irqrestore(&np->lock, flags); |
3237 | printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_tx.\n", dev->name, i); | ||
3238 | break; | 3238 | break; |
3239 | } | 3239 | } |
3240 | 3240 | ||
@@ -3348,8 +3348,8 @@ static irqreturn_t nv_nic_irq_rx(int foo, void *data) | |||
3348 | np->nic_poll_irq |= NVREG_IRQ_RX_ALL; | 3348 | np->nic_poll_irq |= NVREG_IRQ_RX_ALL; |
3349 | mod_timer(&np->nic_poll, jiffies + POLL_WAIT); | 3349 | mod_timer(&np->nic_poll, jiffies + POLL_WAIT); |
3350 | } | 3350 | } |
3351 | printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_rx.\n", dev->name, i); | ||
3352 | spin_unlock_irqrestore(&np->lock, flags); | 3351 | spin_unlock_irqrestore(&np->lock, flags); |
3352 | printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_rx.\n", dev->name, i); | ||
3353 | break; | 3353 | break; |
3354 | } | 3354 | } |
3355 | } | 3355 | } |
@@ -3421,8 +3421,8 @@ static irqreturn_t nv_nic_irq_other(int foo, void *data) | |||
3421 | np->nic_poll_irq |= NVREG_IRQ_OTHER; | 3421 | np->nic_poll_irq |= NVREG_IRQ_OTHER; |
3422 | mod_timer(&np->nic_poll, jiffies + POLL_WAIT); | 3422 | mod_timer(&np->nic_poll, jiffies + POLL_WAIT); |
3423 | } | 3423 | } |
3424 | printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_other.\n", dev->name, i); | ||
3425 | spin_unlock_irqrestore(&np->lock, flags); | 3424 | spin_unlock_irqrestore(&np->lock, flags); |
3425 | printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_other.\n", dev->name, i); | ||
3426 | break; | 3426 | break; |
3427 | } | 3427 | } |
3428 | 3428 | ||