From: "Dale Farnsworth" <dale@farnsworth.org>
To: Jeff Garzik <jeff@garzik.org>
Cc: akpm@linux-foundation.org, netdev@vger.kernel.org,
giri@lmc.cs.sunysb.edu, Giridhar Pemmasani <pgiri@yahoo.com>
Subject: [PATCH] mv643xx: Clear pending interrupts before calling request_irq
Date: Wed, 7 Mar 2007 22:21:23 -0700 [thread overview]
Message-ID: <20070308052123.GA5077@xyzzy.farnsworth.org> (raw)
In-Reply-To: <983376.58847.qm@web32410.mail.mud.yahoo.com>
From: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Dale Farnsworth <dale@farnsworth.org>
Acked-by: Giridhar Pemmasani <pgiri@yahoo.com>
---
Giri, thank you very much for reporting the problem and confirming
the fix.
Jeff, please apply.
Andrew, this patch supersedes the -mm patch:
mv643xx-ethernet-driver-irq-registration-fix.patch
drivers/net/mv643xx_eth.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 3e045a6..192b390 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -787,6 +787,12 @@ static int mv643xx_eth_open(struct net_device *dev)
unsigned int size;
int err;
+ /* Clear any pending ethernet port interrupts */
+ mv_write(MV643XX_ETH_INTERRUPT_CAUSE_REG(port_num), 0);
+ mv_write(MV643XX_ETH_INTERRUPT_CAUSE_EXTEND_REG(port_num), 0);
+ /* wait for previous write to complete */
+ mv_read (MV643XX_ETH_INTERRUPT_CAUSE_EXTEND_REG(port_num));
+
err = request_irq(dev->irq, mv643xx_eth_int_handler,
IRQF_SHARED | IRQF_SAMPLE_RANDOM, dev->name, dev);
if (err) {
@@ -875,10 +881,6 @@ static int mv643xx_eth_open(struct net_device *dev)
mv643xx_eth_rx_refill_descs(dev); /* Fill RX ring with skb's */
- /* Clear any pending ethernet port interrupts */
- mv_write(MV643XX_ETH_INTERRUPT_CAUSE_REG(port_num), 0);
- mv_write(MV643XX_ETH_INTERRUPT_CAUSE_EXTEND_REG(port_num), 0);
-
eth_port_start(dev);
/* Interrupt Coalescing */
next prev parent reply other threads:[~2007-03-08 5:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-06 10:42 [patch 18/19] mv643xx ethernet driver IRQ registration fix akpm
2007-03-06 11:16 ` Jeff Garzik
2007-03-06 16:46 ` Dale Farnsworth
2007-03-06 17:35 ` Giridhar Pemmasani
2007-03-08 0:05 ` Giridhar Pemmasani
2007-03-08 5:21 ` Dale Farnsworth [this message]
2007-03-09 16:52 ` [PATCH] mv643xx: Clear pending interrupts before calling request_irq Jeff Garzik
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=20070308052123.GA5077@xyzzy.farnsworth.org \
--to=dale@farnsworth.org \
--cc=akpm@linux-foundation.org \
--cc=giri@lmc.cs.sunysb.edu \
--cc=jeff@garzik.org \
--cc=netdev@vger.kernel.org \
--cc=pgiri@yahoo.com \
/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;
as well as URLs for NNTP newsgroup(s).