From: Brian Somers <brian.somers@sun.com>
To: "David S. Miller" <davem@redhat.com>
Cc: Michael.Waychison@sun.com, linux-kernel@vger.kernel.org
Subject: Re: TG3 doesn't work in kernel 2.4.27 (David S. Miller)
Date: Fri, 10 Sep 2004 13:35:14 +0100 [thread overview]
Message-ID: <41419F82.10109@sun.com> (raw)
In-Reply-To: <20040826123730.375ce5d2.davem@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1367 bytes --]
David S. Miller wrote:
> On Thu, 26 Aug 2004 11:49:57 +0100
> Brian Somers <brian.somers@sun.com> wrote:
>
>
>>Can we get this guy to try running an older version of tg3 to see
>>what change introduce the issue?
>
>
> Brian, we already narrowed it down to exactly the hw autoneg
> changes Sun wrote. It breaks the IBM blades onboard 5704
> fibre chips. Reverting your change or disabling hw autoneg
> in the new code both fix the problem.
The problem seems to be that autoneg is disabled on the IBM switches.
After disabling autoneg on the Sun shelf switches, I see the problem.
This patch fixes things by reverting to sw autoneg which defaults to
a 1000Mbps/full-duplex link but with no flow control when it fails
(IBM should really have autoneg enabled!) - I'd appreciate it if
someone could test this against an IBM blade.
The patch is against the 2.6.8-1.521 version of tg3.c but should
hopefully apply to other recent versions. If there are problems,
because tw32_f() isn't defined, change
tw32_f(x, y);
to
tw32(x, y);
tr32(x);
Cheers.
--
Brian Somers Sun Microsystems
Sparc House, Guillemont Park
Software Engineer - LSE Minley Road, Blackwater
Tel: +44 1252 421 263 Ext: 21263 Camberley GU17 9QG
[-- Attachment #2: tg3.c.patch --]
[-- Type: text/plain, Size: 1030 bytes --]
--- tg3.c.orig 2004-09-10 13:24:28.000000000 +0100
+++ tg3.c 2004-09-10 13:24:14.000000000 +0100
@@ -2051,9 +2051,25 @@
break;
udelay(1);
}
- if (tick >= 195000)
- printk(KERN_INFO PFX "%s: HW autoneg failed !\n",
+ if (tick >= 195000) {
+ u32 digctrl, txctrl;
+
+ printk(KERN_INFO PFX
+ "%s: HW autoneg failed - disabled\n",
tp->dev->name);
+
+ digctrl = tr32(SG_DIG_CTRL);
+ digctrl &= ~SG_DIG_USING_HW_AUTONEG;
+
+ txctrl = tr32(MAC_SERDES_CFG);
+ txctrl &= ~MAC_SERDES_CFG_EDGE_SELECT;
+ tw32_f(MAC_SERDES_CFG, txctrl);
+ tw32_f(SG_DIG_CTRL, digctrl | SG_DIG_SOFT_RESET);
+ udelay(5);
+ tw32_f(SG_DIG_CTRL, digctrl);
+
+ tp->tg3_flags2 &= ~TG3_FLG2_HW_AUTONEG;
+ }
}
/* Reset when initting first time or we have a link. */
@@ -5280,7 +5296,6 @@
txctrl = tr32(MAC_SERDES_CFG);
tw32_f(MAC_SERDES_CFG, txctrl | MAC_SERDES_CFG_EDGE_SELECT);
tw32_f(SG_DIG_CTRL, digctrl | SG_DIG_SOFT_RESET);
- tr32(SG_DIG_CTRL);
udelay(5);
tw32_f(SG_DIG_CTRL, digctrl);
next prev parent reply other threads:[~2004-09-10 12:35 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20040816110000.1120.31256.Mailman@lists.us.dell.com>
2004-08-16 11:51 ` TG3 doesn't work in kernel 2.4.27 (David S. Miller) Tetsuo Handa
2004-08-16 21:38 ` David S. Miller
2004-08-25 17:48 ` Mike Waychison
2004-08-25 19:08 ` David S. Miller
2004-08-25 20:04 ` Mike Waychison
2004-08-26 0:58 ` David S. Miller
2004-08-26 10:49 ` Brian Somers
2004-08-26 19:37 ` David S. Miller
2004-08-29 9:56 ` Pekka Pietikainen
2004-09-10 12:35 ` Brian Somers [this message]
2004-09-10 19:40 ` Roland Dreier
2004-09-10 20:53 ` David S. Miller
2004-09-10 21:05 ` Roland Dreier
2004-09-10 21:45 ` David S. Miller
2004-09-10 22:14 ` Brian Somers
2004-08-30 23:11 ` David S. Miller
2004-09-03 19:12 ` Paul Larson
2004-09-03 19:19 ` Mike Waychison
2004-09-03 20:18 ` Roland Dreier
2004-09-03 20:30 ` David S. Miller
2004-09-03 20:40 ` Roland Dreier
2004-09-03 23:24 ` Roland Dreier
2004-09-07 18:33 ` Jake Moilanen
2004-09-07 19:52 ` Roland Dreier
2004-09-08 12:34 ` Jake Moilanen
2004-09-08 13:07 ` Anton Blanchard
2004-09-13 22:48 ` David S. Miller
2004-09-14 22:20 ` Mike Waychison
2004-09-14 22:36 ` David S. Miller
2004-09-14 22:58 ` Jake Moilanen
2004-09-15 0:34 ` Roland Dreier
2004-09-08 13:55 ` Paul Larson
2004-09-10 16:00 ` Paul Larson
2004-09-03 20:08 ` David S. Miller
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=41419F82.10109@sun.com \
--to=brian.somers@sun.com \
--cc=Michael.Waychison@sun.com \
--cc=davem@redhat.com \
--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