]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Forcedeth fix from Manfred, fwd from Daniel Drake.
authorChris Wright <chrisw@osdl.org>
Mon, 12 Sep 2005 18:38:20 +0000 (11:38 -0700)
committerChris Wright <chrisw@osdl.org>
Mon, 12 Sep 2005 18:38:20 +0000 (11:38 -0700)
queue/forcedeth-init-link-settings-in-nv_open.patch [new file with mode: 0644]
queue/series [new file with mode: 0644]

diff --git a/queue/forcedeth-init-link-settings-in-nv_open.patch b/queue/forcedeth-init-link-settings-in-nv_open.patch
new file mode 100644 (file)
index 0000000..94c39e3
--- /dev/null
@@ -0,0 +1,41 @@
+From stable-bounces@linux.kernel.org  Sun Sep 11 13:33:43 2005
+Date: Sun, 11 Sep 2005 21:33:28 +0100
+From: Daniel Drake <dsd@gentoo.org>
+To: stable@kernel.org
+Cc: manfred@colorfullife.com
+Subject: [PATCH] forcedeth: Initialize link settings in every nv_open()
+
+From: Manfred Spraul <manfred@colorfullife.com>
+
+R�diger found a bug in nv_open that explains some of the reports
+with duplex mismatches:
+nv_open calls nv_update_link_speed for initializing the hardware link speed
+registers. If current link setting matches the values in np->linkspeed and
+np->duplex, then the function does nothing.
+Usually, doing nothing is the right thing, but not in nv_open: During
+nv_open, the registers must be initialized because the nic was reset.
+
+The attached patch fixes that by setting np->linkspeed to an invalid value
+before calling nv_update_link_speed from nv_open.
+
+Signed-Off-By: Manfred Spraul <manfred@colorfullife.com>
+Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
+Signed-off-by: Chris Wright <chrisw@osdl.org>
+---
+ drivers/net/forcedeth.c |    3 +++
+ 1 files changed, 3 insertions(+)
+
+Index: linux-2.6.13.y/drivers/net/forcedeth.c
+===================================================================
+--- linux-2.6.13.y.orig/drivers/net/forcedeth.c
++++ linux-2.6.13.y/drivers/net/forcedeth.c
+@@ -1888,6 +1888,9 @@ static int nv_open(struct net_device *de
+               writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus);
+               dprintk(KERN_INFO "startup: got 0x%08x.\n", miistat);
+       }
++      /* set linkspeed to invalid value, thus force nv_update_linkspeed
++       * to init hw */
++      np->linkspeed = 0; 
+       ret = nv_update_linkspeed(dev);
+       nv_start_rx(dev);
+       nv_start_tx(dev);
diff --git a/queue/series b/queue/series
new file mode 100644 (file)
index 0000000..68c8918
--- /dev/null
@@ -0,0 +1 @@
+forcedeth-init-link-settings-in-nv_open.patch