/[linux-patches]/genpatches-2.6/tags/2.6.13-4/1012_2_forcedeth-init-link-settings-in-nv_open.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.13-4/1012_2_forcedeth-init-link-settings-in-nv_open.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 168 - (show annotations) (download)
Sun Sep 18 11:19:29 2005 UTC (9 years ago) by dsd
File size: 1654 byte(s)
2.6.13-4 release
1 From stable-bounces@linux.kernel.org Sun Sep 11 13:33:43 2005
2 Date: Sun, 11 Sep 2005 21:33:28 +0100
3 From: Daniel Drake <dsd@gentoo.org>
4 To: stable@kernel.org
5 Cc: manfred@colorfullife.com
6 Subject: [PATCH] forcedeth: Initialize link settings in every nv_open()
7
8 From: Manfred Spraul <manfred@colorfullife.com>
9
10 R�diger found a bug in nv_open that explains some of the reports
11 with duplex mismatches:
12 nv_open calls nv_update_link_speed for initializing the hardware link speed
13 registers. If current link setting matches the values in np->linkspeed and
14 np->duplex, then the function does nothing.
15 Usually, doing nothing is the right thing, but not in nv_open: During
16 nv_open, the registers must be initialized because the nic was reset.
17
18 The attached patch fixes that by setting np->linkspeed to an invalid value
19 before calling nv_update_link_speed from nv_open.
20
21 Signed-Off-By: Manfred Spraul <manfred@colorfullife.com>
22 Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
23 Signed-off-by: Chris Wright <chrisw@osdl.org>
24 ---
25 drivers/net/forcedeth.c | 3 +++
26 1 files changed, 3 insertions(+)
27
28 Index: linux-2.6.13.y/drivers/net/forcedeth.c
29 ===================================================================
30 --- linux-2.6.13.y.orig/drivers/net/forcedeth.c
31 +++ linux-2.6.13.y/drivers/net/forcedeth.c
32 @@ -1888,6 +1888,9 @@ static int nv_open(struct net_device *de
33 writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus);
34 dprintk(KERN_INFO "startup: got 0x%08x.\n", miistat);
35 }
36 + /* set linkspeed to invalid value, thus force nv_update_linkspeed
37 + * to init hw */
38 + np->linkspeed = 0;
39 ret = nv_update_linkspeed(dev);
40 nv_start_rx(dev);
41 nv_start_tx(dev);

  ViewVC Help
Powered by ViewVC 1.1.20