public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: Christian Kujau <evil@g-house.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: forcedeth as a module only?
Date: Fri, 17 Jun 2005 22:47:56 +0200	[thread overview]
Message-ID: <42B336FC.9000400@colorfullife.com> (raw)
In-Reply-To: <42B31749.90208@g-house.de>

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

Christian Kujau wrote:

>are there any known issues with the forcedeth driver when statically
>compiled in? 
>
No.
But there are known issues with link detection: Some users report bad 
performance, and misconfigured links are one possible explanation.

>eth0: forcedeth.c: subsystem: 01462:0250 bound to 0000:00:05.0
>eth0: no link during initialization
>
>  
>
Very interesting.  The message itself is not fatal: It merely means that 
there was no link during ifup. This typically happens when the hardware 
initialization was not yet finished during ifup. Theoretically, an 
interrupt should happen when the hardware initialization is completed 
and that interrupt then sets up the link.
Somehow it doesn't work for you.

Could you try the attached patch? It polls for link changes instead of 
relying on the irq. Additionally, I have enabled some debug output.

--
    Manfred



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

--- 2.6/drivers/net/forcedeth.c	2005-06-05 17:29:12.000000000 +0200
+++ build-2.6/drivers/net/forcedeth.c	2005-06-17 22:44:18.000000000 +0200
@@ -1298,7 +1299,7 @@
 	mii_status = mii_rw(dev, np->phyaddr, MII_BMSR, MII_READ);
 
 	if (!(mii_status & BMSR_LSTATUS)) {
-		dprintk(KERN_DEBUG "%s: no link detected by phy - falling back to 10HD.\n",
+		printk(KERN_DEBUG "%s: no link detected by phy - falling back to 10HD.\n",
 				dev->name);
 		newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10;
 		newdup = 0;
@@ -1307,7 +1308,7 @@
 	}
 
 	if (np->autoneg == 0) {
-		dprintk(KERN_DEBUG "%s: nv_update_linkspeed: autoneg off, PHY set to 0x%04x.\n",
+		printk(KERN_DEBUG "%s: nv_update_linkspeed: autoneg off, PHY set to 0x%04x.\n",
 				dev->name, np->fixed_mode);
 		if (np->fixed_mode & LPA_100FULL) {
 			newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_100;
@@ -1331,7 +1332,7 @@
 		newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10;
 		newdup = 0;
 		retval = 0;
-		dprintk(KERN_DEBUG "%s: autoneg not completed - falling back to 10HD.\n", dev->name);
+		printk(KERN_DEBUG "%s: autoneg not completed - falling back to 10HD.\n", dev->name);
 		goto set_speed;
 	}
 
@@ -1342,7 +1343,7 @@
 
 		if ((control_1000 & ADVERTISE_1000FULL) &&
 			(status_1000 & LPA_1000FULL)) {
-			dprintk(KERN_DEBUG "%s: nv_update_linkspeed: GBit ethernet detected.\n",
+			printk(KERN_DEBUG "%s: nv_update_linkspeed: GBit ethernet detected.\n",
 				dev->name);
 			newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_1000;
 			newdup = 1;
@@ -1352,7 +1353,7 @@
 
 	adv = mii_rw(dev, np->phyaddr, MII_ADVERTISE, MII_READ);
 	lpa = mii_rw(dev, np->phyaddr, MII_LPA, MII_READ);
-	dprintk(KERN_DEBUG "%s: nv_update_linkspeed: PHY advertises 0x%04x, lpa 0x%04x.\n",
+	printk(KERN_DEBUG "%s: nv_update_linkspeed: PHY advertises 0x%04x, lpa 0x%04x.\n",
 				dev->name, adv, lpa);
 
 	/* FIXME: handle parallel detection properly */
@@ -1370,7 +1371,7 @@
 		newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10;
 		newdup = 0;
 	} else {
-		dprintk(KERN_DEBUG "%s: bad ability %04x - falling back to 10HD.\n", dev->name, lpa);
+		printk(KERN_DEBUG "%s: bad ability %04x - falling back to 10HD.\n", dev->name, lpa);
 		newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10;
 		newdup = 0;
 	}
@@ -1379,7 +1380,7 @@
 	if (np->duplex == newdup && np->linkspeed == newls)
 		return retval;
 
-	dprintk(KERN_INFO "%s: changing link setting from %d/%d to %d/%d.\n",
+	printk(KERN_INFO "%s: changing link setting from %d/%d to %d/%d.\n",
 			dev->name, np->linkspeed, np->duplex, newls, newdup);
 
 	np->duplex = newdup;
@@ -1442,11 +1443,11 @@
 
 	miistat = readl(base + NvRegMIIStatus);
 	writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus);
-	dprintk(KERN_INFO "%s: link change irq, status 0x%x.\n", dev->name, miistat);
+	printk(KERN_INFO "%s: link change irq, status 0x%x.\n", dev->name, miistat);
 
 	if (miistat & (NVREG_MIISTAT_LINKCHANGE))
 		nv_linkchange(dev);
-	dprintk(KERN_DEBUG "%s: link change notification done.\n", dev->name);
+	printk(KERN_DEBUG "%s: link change notification done.\n", dev->name);
 }
 
 static irqreturn_t nv_nic_irq(int foo, void *data, struct pt_regs *regs)
@@ -2088,8 +2091,8 @@
 		np->irqmask = NVREG_IRQMASK_WANTED_2;
 	if (id->driver_data & DEV_NEED_TIMERIRQ)
 		np->irqmask |= NVREG_IRQ_TIMER;
-	if (id->driver_data & DEV_NEED_LINKTIMER) {
-		dprintk(KERN_INFO "%s: link timer on.\n", pci_name(pci_dev));
+	if (id->driver_data & DEV_NEED_LINKTIMER || 1) {
+		printk(KERN_INFO "%s: link timer on.\n", pci_name(pci_dev));
 		np->need_linktimer = 1;
 		np->link_timeout = jiffies + LINK_TIMEOUT;
 	} else {

       reply	other threads:[~2005-06-17 20:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200506171804.j5HI4qoh027680@dbl.q-ag.de>
     [not found] ` <42B31749.90208@g-house.de>
2005-06-17 20:47   ` Manfred Spraul [this message]
2005-06-17 22:22     ` forcedeth as a module only? Christian Kujau
2005-06-17 22:36       ` Christian Kujau
2005-06-18 10:44     ` marvin24
2005-06-18 12:53       ` Manfred Spraul
2005-06-17 17:41 Christian Kujau

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=42B336FC.9000400@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=evil@g-house.de \
    --cc=linux-kernel@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