Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-25 Thread Michael Chan
On Fri, 2006-08-25 at 16:48 -0700, Marc Bevand wrote: > > But I was able to turn TSO on via ethtool -K. This is exactly the behavior I > would like to see in tg3. So are you saying the patch I applied actually > breaks ASF ? > Yes, the TSO firmware code that tg3 downloads to the chip using your

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-25 Thread Marc Bevand
On 8/25/06, Michael Chan <[EMAIL PROTECTED]> wrote: The reason is that TSO on 5704 and older chips is done by firmware. ASF is also implemented by firmware. If ASF is enabled, there is no room to do TSO and ASF at the same time. Just for test purpose, I have applied the following patch to my

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-25 Thread Michael Chan
On Fri, 2006-08-25 at 22:33 +, Marc Bevand wrote: > Still, it would be great if ASF could be disabled, because I have > noticed that when ASF is enabled, the tg3 driver automatically disables > TSO (TCP Segmentation Offloading). Here is a dmesg output from a server > where I am seeing that beh

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-25 Thread Marc Bevand
Michael Chan broadcom.com> writes: > > Turning off ASF is just a matter of changing some bits in NVRAM > and recalculating the checksum. If you need the tool to do this, > I'll have someone send it to you. > > Note that on some of the blade servers, I believe ASF is vital > and should not be disa

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-09 Thread Roman Zippel
Hi, On Tue, 8 Aug 2006, Steven Rostedt wrote: > OK, but still, if it is expected to expire, which this one is, then it > should be converted to a hrtimer, instead of a normal timer. The hrtimers > were introduced to make it more efficient for expiring timers. Well, they > really were introduced

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-08 Thread Steven Rostedt
On Tue, 8 Aug 2006, David Miller wrote: > From: Steven Rostedt <[EMAIL PROTECTED]> > Date: Tue, 8 Aug 2006 08:24:10 -0400 (EDT) > > > Of the 4 timers, only one is a timeout. The other three expire every time, > > forcing the timer wheel into effect. Even though it's one timer > > implementing 4,

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-08 Thread David Miller
From: Steven Rostedt <[EMAIL PROTECTED]> Date: Tue, 8 Aug 2006 08:24:10 -0400 (EDT) > Of the 4 timers, only one is a timeout. The other three expire every time, > forcing the timer wheel into effect. Even though it's one timer > implementing 4, it's expensive to use it as a watchdog. It's not a

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-08 Thread Steven Rostedt
On Tue, 8 Aug 2006, Steven Rostedt wrote: > > On Sun, 6 Aug 2006, David Miller wrote: > > > From: Steven Rostedt <[EMAIL PROTECTED]> > > Date: Mon, 7 Aug 2006 01:34:56 -0400 (EDT) > > > > > My suggestion would be to separate that tg3_timer into 4 different > > > timers, which is what it actually

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-08 Thread Steven Rostedt
On Sun, 6 Aug 2006, David Miller wrote: > From: Steven Rostedt <[EMAIL PROTECTED]> > Date: Mon, 7 Aug 2006 01:34:56 -0400 (EDT) > > > My suggestion would be to separate that tg3_timer into 4 different > > timers, which is what it actually looks like. > > Timers have non-trivial cost. It's cheape

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-07 Thread Michael Chan
Theodore Tso wrote: > Thanks, that description was very helpful. Would you accept a patch > with adding a comment describing this? I will put it on my queue to add some comments for ASF. > > It appears that there is no way of disabling ASF; is that a true > statement? > Turning off ASF is ju

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-06 Thread David Miller
From: Steven Rostedt <[EMAIL PROTECTED]> Date: Mon, 7 Aug 2006 01:34:56 -0400 (EDT) > My suggestion would be to separate that tg3_timer into 4 different > timers, which is what it actually looks like. Timers have non-trivial cost. It's cheaper to have one and vector off to the necessary operatio

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-06 Thread Steven Rostedt
On Thu, 3 Aug 2006, Theodore Tso wrote: > On Thu, Aug 03, 2006 at 02:48:45PM -0700, David Miller wrote: > > > eth0: Tigon3 [partno(BCM95704s) rev 2100 PHY(serdes)] > > > (PCIX:100MHz:64-bit) 10/100/1000BaseT Ethernet 00:14:5e:86:44:24 > > > > The 5704 chip will set TG3_FLAG_TAGGED_STATUS, and th

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-05 Thread Theodore Tso
On Thu, Aug 03, 2006 at 08:45:31PM -0700, Michael Chan wrote: > ASF is firmware that monitors the system and sends out alerts whenever > certain events happen. So it needs to run before the OS boots or after > it has crashed. When the driver is up and running, the driver and ASF > run independent

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread Michael Chan
Theodore Tso wrote: > Parden me for asking a dumb question, but what's being accomplished by > resetting the chip if the system has crashed? Why not reset the chip > when the system reboots and it sees the PCI bus reset? I guess I'm > missing the purpose of the ASF heartbeat; why does the networ

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread Theodore Tso
On Thu, Aug 03, 2006 at 04:28:19PM -0700, Michael Chan wrote: > True. But they also have ASF enabled which requires tg3_timer() to send > the heartbeat periodically. If the heartbeat is late, ASF may reset the > chip believing that the system has crashed. Parden me for asking a dumb question, bu

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread Arjan van de Ven
Theodore Tso wrote: Removing the timer-based "ping" might be a good thing to do from the point of view of reducing power utilization of laptops (but hey, I don't have a tg3 in my laptop, so I won't worry about it a whole lot :-), but I agree that in general the RT patches need to be able to cal

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread David Miller
From: Theodore Tso <[EMAIL PROTECTED]> Date: Thu, 3 Aug 2006 20:07:07 -0400 > Removing the timer-based "ping" might be a good thing to do from the > point of view of reducing power utilization of laptops (but hey, I > don't have a tg3 in my laptop, so I won't worry about it a whole lot :-), You

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread Michael Chan
On Thu, 2006-08-03 at 17:01 -0700, David Miller wrote: > From: Herbert Xu <[EMAIL PROTECTED]> > Date: Fri, 4 Aug 2006 09:59:27 +1000 > > > Watchdogs usually require one heartbeat every 30 seconds or so. Does > > the ASF heartbeat need to be that frequent? > > The ASF heartbeat needs to be sent e

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread Theodore Tso
On Thu, Aug 03, 2006 at 04:43:11PM -0700, David Miller wrote: > From: "Michael Chan" <[EMAIL PROTECTED]> > Date: Thu, 03 Aug 2006 16:28:19 -0700 > > > > eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[1] Split[0] WireSpeed[0] > > > TSOcap[0] > > > > We'll see if we can do away with the timer-based h

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread Daniel Walker
On Thu, 2006-08-03 at 16:56 -0700, David Miller wrote: > From: Theodore Tso <[EMAIL PROTECTED]> > Date: Thu, 3 Aug 2006 19:53:26 -0400 > > > Any suggestions on how I could figure out what was really going on and > > what would be a better fix would be greatly appreciated. > > As Michael explained

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread David Miller
From: Herbert Xu <[EMAIL PROTECTED]> Date: Fri, 4 Aug 2006 09:59:27 +1000 > Watchdogs usually require one heartbeat every 30 seconds or so. Does > the ASF heartbeat need to be that frequent? The ASF heartbeat needs to be sent every 2 seconds. - To unsubscribe from this list: send the line "unsub

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread Herbert Xu
On Thu, Aug 03, 2006 at 04:56:54PM -0700, David Miller wrote: > > As Michael explained, it's the ASF heartbeat sent by tg3_timer() that > must be delivered to the chip within certain timing constraints. > > If you had any watchdog devices on this machine, they would likely > trigger too and reset

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread David Miller
From: Theodore Tso <[EMAIL PROTECTED]> Date: Thu, 3 Aug 2006 19:53:26 -0400 > Any suggestions on how I could figure out what was really going on and > what would be a better fix would be greatly appreciated. As Michael explained, it's the ASF heartbeat sent by tg3_timer() that must be delivered t

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread Theodore Tso
On Thu, Aug 03, 2006 at 02:48:45PM -0700, David Miller wrote: > > eth0: Tigon3 [partno(BCM95704s) rev 2100 PHY(serdes)] (PCIX:100MHz:64-bit) > > 10/100/1000BaseT Ethernet 00:14:5e:86:44:24 > > The 5704 chip will set TG3_FLAG_TAGGED_STATUS, and therefore > doesn't need the periodic poking done by

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread David Miller
From: "Michael Chan" <[EMAIL PROTECTED]> Date: Thu, 03 Aug 2006 16:28:19 -0700 > > eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[1] Split[0] WireSpeed[0] > > TSOcap[0] > > We'll see if we can do away with the timer-based heartbeat. That's > probably the best solution. The tg3 driver is not the o

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread Michael Chan
On Thu, 2006-08-03 at 14:48 -0700, David Miller wrote: > From: Theodore Tso <[EMAIL PROTECTED]> > Date: Thu, 3 Aug 2006 16:17:41 -0400 > > > eth0: Tigon3 [partno(BCM95704s) rev 2100 PHY(serdes)] (PCIX:100MHz:64-bit) > > 10/100/1000BaseT Ethernet 00:14:5e:86:44:24 > > The 5704 chip will set TG3_F

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread David Miller
From: Theodore Tso <[EMAIL PROTECTED]> Date: Thu, 3 Aug 2006 16:17:41 -0400 > eth0: Tigon3 [partno(BCM95704s) rev 2100 PHY(serdes)] (PCIX:100MHz:64-bit) > 10/100/1000BaseT Ethernet 00:14:5e:86:44:24 The 5704 chip will set TG3_FLAG_TAGGED_STATUS, and therefore doesn't need the periodic poking don

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread David Miller
From: Theodore Tso <[EMAIL PROTECTED]> Date: Thu, 3 Aug 2006 13:17:31 -0400 > The tg3_timer() code, for example, is trigger by the device driver but > isn't associated with a process for boosting purposes, and creating a > process just so that tg3_timer() can be boosted seems like the Wrong Ted p

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread David Miller
From: Alistair John Strachan <[EMAIL PROTECTED]> Date: Thu, 3 Aug 2006 18:04:55 +0100 > Probably. I have an NC6000 with a tg3 and have never experienced > link failure problems, even under -rt. And note that the "poke the chip N times a second to avoid lockup" issue only matters on very very old

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread Theodore Tso
On Thu, Aug 03, 2006 at 11:36:47AM -0700, Michael Chan wrote: > On Thu, 2006-08-03 at 20:00 +1000, Herbert Xu wrote: > > Theodore Tso <[EMAIL PROTECTED]> wrote: > > > > > > I'm sending this on mostly because it was a bit of a pain to track down, > > > and hopefully it will save time if anyone else

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread Michael Chan
On Thu, 2006-08-03 at 20:00 +1000, Herbert Xu wrote: > Theodore Tso <[EMAIL PROTECTED]> wrote: > > > > I'm sending this on mostly because it was a bit of a pain to track down, > > and hopefully it will save time if anyone else hits this while playing > > with the -rt kernel. It is NOT the right w

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread Theodore Tso
On Thu, Aug 03, 2006 at 09:49:17AM -0700, Randy.Dunlap wrote: > Interesting. On my Dell D610 notebook with tg3 and vpn, > I have to ping a server on the vpn to keep it alive, otherwise > it disappears soon and I have to restart the vpn. Of course, > this could just be the vpn or some other softwa

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread Theodore Tso
On Thu, Aug 03, 2006 at 09:46:37AM -0700, Daniel Walker wrote: > There is some form of priority inheritance on the timer softirq. It said > in the patch header that the right fix was for the timer softirq to > change priorities. Which Real Time patch are you using? Or is the > current system not su

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread Alistair John Strachan
On Thursday 03 August 2006 17:49, Randy.Dunlap wrote: [snip] > > This only shows up with the real-time kernel where timer softirq's run > > in their own processes, and a high priority process preempts the timer > > softirq. I don't really consider this a networking bug, or even > > driver bug, alt

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread Daniel Walker
On Thu, 2006-08-03 at 12:32 -0400, Theodore Tso wrote: > This only shows up with the real-time kernel where timer softirq's run > in their own processes, and a high priority process preempts the timer > softirq. I don't really consider this a networking bug, or even > driver bug, although it does

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread Randy.Dunlap
On Thu, 3 Aug 2006 12:32:05 -0400 Theodore Tso wrote: > On Thu, Aug 03, 2006 at 08:00:35PM +1000, Herbert Xu wrote: > > Theodore Tso <[EMAIL PROTECTED]> wrote: > > > > > > I'm sending this on mostly because it was a bit of a pain to track down, > > > and hopefully it will save time if anyone else

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread Theodore Tso
On Thu, Aug 03, 2006 at 08:00:35PM +1000, Herbert Xu wrote: > Theodore Tso <[EMAIL PROTECTED]> wrote: > > > > I'm sending this on mostly because it was a bit of a pain to track down, > > and hopefully it will save time if anyone else hits this while playing > > with the -rt kernel. It is NOT the

Re: [PATCH -rt DO NOT APPLY] Fix for tg3 networking lockup

2006-08-03 Thread Herbert Xu
Theodore Tso <[EMAIL PROTECTED]> wrote: > > I'm sending this on mostly because it was a bit of a pain to track down, > and hopefully it will save time if anyone else hits this while playing > with the -rt kernel. It is NOT the right way to fix things, so please > don't even think of applying this