All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: ktech@wanadoo.es,
	Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Jeff Garzik <jgarzik@pobox.com>
Subject: Re: 2.6.7-rc1 breaks forcedeth
Date: Sun, 06 Jun 2004 10:36:16 +0200	[thread overview]
Message-ID: <40C2D780.4010009@colorfullife.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0406051958150.7010@ppc970.osdl.org>

[-- Attachment #1: Type: text/plain, Size: 923 bytes --]

Linus Torvalds wrote:

>I suspect that the driver should at the very least make sure to disable
>any potentially pending interrupts in the "nv_probe()" function. I have no 
>idea how to do that, but it looks like something like
>
>	writel(0, base + NvRegIrqMask);
>	writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus);
>
>should probably do it. It would be better to reset the thing completely, 
>methinks, but whatever.
>
>  
>
I'll add that, but it's only a partial fix: what if ehci_hcd is loaded 
before the forcedeth driver?

Luis, could you apply the patch and boot with it? It should print 
something like

forcedeth: irq line 11, Status 0x00000020, Mask 0x00000020

If mask and status are really not zero, then it explains your problems. 
Additionally I try to reset the nic in nv_probe - there were a few 
reports seemed to indicate that the nic generates timer interrupts even 
if the mask is zero.

--
    Manfred

[-- Attachment #2: patch-forcedeth-test --]
[-- Type: text/plain, Size: 1728 bytes --]

--- 2.6/drivers/net/forcedeth.c	2004-05-10 04:31:59.000000000 +0200
+++ build-2.6/drivers/net/forcedeth.c	2004-06-06 10:31:43.826368991 +0200
@@ -1195,16 +1195,13 @@
 	enable_irq(dev->irq);
 }
 
-static int nv_open(struct net_device *dev)
+static void nv_reset(struct net_device *dev)
 {
-	struct fe_priv *np = get_nvpriv(dev);
 	u8 *base = get_hwbase(dev);
-	int ret, oom, i;
 
-	dprintk(KERN_DEBUG "nv_open: begin\n");
+	writel(0, base + NvRegIrqMask);
+	writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus);
 
-	/* 1) erase previous misconfiguration */
-	/* 4.1-1: stop adapter: ignored, 4.3 seems to be overkill */
 	writel(NVREG_MCASTADDRA_FORCE, base + NvRegMulticastAddrA);
 	writel(0, base + NvRegMulticastAddrB);
 	writel(0, base + NvRegMulticastMaskA);
@@ -1215,6 +1212,20 @@
 	writel(0, base + NvRegUnknownTransmitterReg);
 	nv_txrx_reset(dev);
 	writel(0, base + NvRegUnknownSetupReg6);
+	pci_push(base);
+}
+
+static int nv_open(struct net_device *dev)
+{
+	struct fe_priv *np = get_nvpriv(dev);
+	u8 *base = get_hwbase(dev);
+	int ret, oom, i;
+
+	dprintk(KERN_DEBUG "nv_open: begin\n");
+
+	/* 1) erase previous misconfiguration */
+	/* 4.1-1: stop adapter: ignored, 4.3 seems to be overkill */
+	nv_reset(dev);
 
 	/* 2) initialize descriptor rings */
 	np->in_shutdown = 0;
@@ -1506,6 +1517,11 @@
 	writel(0, base + NvRegWakeUpFlags);
 	np->wolenabled = 0;
 
+printk(KERN_ERR "forcedeth: irq line %d, Status 0x%8x, Mask %0x8x\n",
+		       		pci_dev->irq, readl(base + NvRegIrqStatus),
+				readl(base + NvRegIrqMask));
+	nv_reset(dev);
+
 	np->tx_flags = cpu_to_le16(NV_TX_LASTPACKET|NV_TX_LASTPACKET1|NV_TX_VALID);
 	if (id->driver_data & DEV_NEED_LASTPACKET1)
 		np->tx_flags |= cpu_to_le16(NV_TX_LASTPACKET1);

  reply	other threads:[~2004-06-06  8:36 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-06  1:59 2.6.7-rc1 breaks forcedeth ktech
2004-06-06  3:14 ` Linus Torvalds
2004-06-06  8:36   ` Manfred Spraul [this message]
2004-06-06 17:04     ` Linus Torvalds
2004-06-06 18:13       ` Jeff Garzik
2004-06-06 18:21   ` Jeff Garzik
2004-06-06 18:32     ` Linus Torvalds
  -- strict thread matches above, loose matches on Subject: below --
2004-06-16 18:40 David Mansfield
2004-06-06 13:49 jjluza
     [not found] <E1BWxTh-0002dx-KR@mb06.in.mad.eresmas.com>
2004-06-06 13:31 ` Daniel Schmitt
2004-06-06 12:10 ktech
2004-06-06 12:53 ` Vincent van de Camp
2004-06-06 13:40   ` Manfred Spraul
2004-06-06 14:17 ` Manfred Spraul
2004-06-05 23:41 Luis Miguel García Mancebo
2004-06-05 23:50 ` Linus Torvalds
2004-05-31  0:29 jjluza
2004-05-30 17:54 Luis Miguel García Mancebo
2004-05-30 20:47 ` Jeff Garzik
2004-05-30 15:57 Lee Howard
2004-05-30 17:20 ` Jeff Garzik
2004-05-30 22:59   ` Lee Howard

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=40C2D780.4010009@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=jgarzik@pobox.com \
    --cc=ktech@wanadoo.es \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.