From: Timo Jantunen <jeti@iki.fi>
To: LKML <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Cc: stable@kernel.org
Subject: [PATCH] fix random hang in forcedeth driver when using netconsole
Date: Tue, 14 Aug 2007 21:56:57 +0300 (EEST) [thread overview]
Message-ID: <Pine.LNX.4.64.0708142147130.6769@limbo> (raw)
Heip!
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.
//T
Signed-off-by: Timo Jantunen <jeti@iki.fi>
diff -uprN -X linux-2.6.22.2/Documentation/dontdiff linux-2.6.22.2.original/drivers/net/forcedeth.c linux-2.6.22.2/drivers/net/forcedeth.c
--- linux-2.6.22.2.original/drivers/net/forcedeth.c 2007-08-10 08:20:27.761813671 +0300
+++ linux-2.6.22.2/drivers/net/forcedeth.c 2007-08-14 21:03:14.109056661 +0300
@@ -3067,8 +3067,8 @@ static irqreturn_t nv_nic_irq(int foo, v
np->nic_poll_irq = np->irqmask;
mod_timer(&np->nic_poll, jiffies + POLL_WAIT);
}
- printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq.\n", dev->name, i);
spin_unlock(&np->lock);
+ printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq.\n", dev->name, i);
break;
}
@@ -3185,8 +3185,8 @@ static irqreturn_t nv_nic_irq_optimized(
np->nic_poll_irq = np->irqmask;
mod_timer(&np->nic_poll, jiffies + POLL_WAIT);
}
- printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq.\n", dev->name, i);
spin_unlock(&np->lock);
+ printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq.\n", dev->name, i);
break;
}
@@ -3232,8 +3232,8 @@ static irqreturn_t nv_nic_irq_tx(int foo
np->nic_poll_irq |= NVREG_IRQ_TX_ALL;
mod_timer(&np->nic_poll, jiffies + POLL_WAIT);
}
- printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_tx.\n", dev->name, i);
spin_unlock_irqrestore(&np->lock, flags);
+ printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_tx.\n", dev->name, i);
break;
}
@@ -3347,8 +3347,8 @@ static irqreturn_t nv_nic_irq_rx(int foo
np->nic_poll_irq |= NVREG_IRQ_RX_ALL;
mod_timer(&np->nic_poll, jiffies + POLL_WAIT);
}
- printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_rx.\n", dev->name, i);
spin_unlock_irqrestore(&np->lock, flags);
+ printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_rx.\n", dev->name, i);
break;
}
}
@@ -3420,8 +3420,8 @@ static irqreturn_t nv_nic_irq_other(int
np->nic_poll_irq |= NVREG_IRQ_OTHER;
mod_timer(&np->nic_poll, jiffies + POLL_WAIT);
}
- printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_other.\n", dev->name, i);
spin_unlock_irqrestore(&np->lock, flags);
+ printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq_other.\n", dev->name, i);
break;
}
reply other threads:[~2007-08-14 19:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0708142147130.6769@limbo \
--to=jeti@iki.fi \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®