netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brent Cook <bcook@bpointsys.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: netdev@vger.kernel.org
Subject: [PATCH 1/3] mv643xx fixes - Disable interrupts on all ports during initialization
Date: Mon, 3 Jul 2006 13:11:54 -0500	[thread overview]
Message-ID: <200607031311.54328.bcook@bpointsys.com> (raw)
In-Reply-To: <44A54F5B.4030902@garzik.org>

That's the last time I hand-edit a patch - this is really more of a workaround 
since I've learned that the interrupts should have been disabled by the 
firmware anyway. But, it doesn't hurt. Updated description

This patch disable interrupts on all ports during initialization. The
current driver assumes that the firmware has already disabled all interrupts 
on all ports. We have encountered some boards that do not always disable
interrupts (XES XPedite 6200 for instance) on a soft reset on all ethernet 
ports. This patch prevents a kernel panic if a packet is received before the 
DMA ring buffers are setup for a port on which interrupts are left enabled by 
the firmware.

Signed-off-by: Brent Cook <bcook@bpointsys.com>

Index: current/drivers/net/mv643xx_eth.c
===================================================================
--- current/drivers/net/mv643xx_eth.c	(revision 101)
+++ current/drivers/net/mv643xx_eth.c	(working copy)
@@ -777,6 +777,12 @@
 	unsigned int size;
 	int err;
 
+	/* Mask all interrupts on ethernet port */
+	mv_write(MV643XX_ETH_INTERRUPT_MASK_REG(port_num),
+		ETH_INT_MASK_ALL);
+	/* wait for previous write to complete */
+	mv_read(MV643XX_ETH_INTERRUPT_MASK_REG(port_num));
+
 	err = request_irq(dev->irq, mv643xx_eth_int_handler,
 			SA_SHIRQ | SA_SAMPLE_RANDOM, dev->name, dev);
 	if (err) {

      reply	other threads:[~2006-07-03 18:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-27 14:51 [PATCH 1/3] mv643xx fixes - Disable interrupts on all ports during initialization Brent Cook
2006-06-27 15:16 ` John Haller
2006-06-27 16:09   ` Nathaniel Case
2006-06-30 16:20 ` Jeff Garzik
2006-07-03 18:11   ` Brent Cook [this message]

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=200607031311.54328.bcook@bpointsys.com \
    --to=bcook@bpointsys.com \
    --cc=jeff@garzik.org \
    --cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).