Netdev List
 help / color / mirror / Atom feed
* Re: [2.4.32 - 2.6.15.4] e1000 - Fix mii interface
From: Paul Rolland @ 2006-02-26 11:39 UTC (permalink / raw)
  To: 'Willy TARREAU'
  Cc: linux-kernel, netdev, linux.nics, cramerj, john.ronciak,
	Ganesh.Venkatesan
In-Reply-To: <20060226104206.GA11434@w.ods.org>

> it's mangled, tabs have been turned into whitespaces. I fixed 
> it so please
> use the appended one.

Sorry about that, thanks for the fix.

Paul

^ permalink raw reply

* Re: RTL 8139 stops RX after receiving a jumbo frame
From: Alan Cox @ 2006-02-26 12:46 UTC (permalink / raw)
  To: John Zielinski; +Cc: linux-kernel, netdev
In-Reply-To: <44012D53.30700@undead.cc>

On Sad, 2006-02-25 at 23:23 -0500, John Zielinski wrote:
> I'm surprised that the switch actually let the jumbo packet through onto 
> a 100Mbit link.  I'm going to see if I can find a non RTL 8139 card in 
> my parts bin and see what that one does.
> 
> What's the normal behavior for overruns on an interface?

Should drop the packet, but it may be triggering a driver path with a
bug. Is this repeatable and with multiple 8139 cards /

^ permalink raw reply

* Re: [2.4.32 - 2.6.15.4] e1000 - Fix mii interface
From: Jesper Juhl @ 2006-02-26 12:59 UTC (permalink / raw)
  To: rol
  Cc: linux-kernel, netdev, linux.nics, cramerj, john.ronciak,
	Ganesh.Venkatesan
In-Reply-To: <007801c639f3$79388060$2001a8c0@cortex>

On 2/25/06, Paul Rolland <rol@as2917.net> wrote:
> Hello,
>
> This patch is based on Linux 2.4.32, and I've verified the same problem
> exists on 2.6.15.4.

are you planning a 2.6 patch as well ?

--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

^ permalink raw reply

* Re: [2.6.15] running tcpdump on 3c905b causes freeze (reproducable)
From: Folkert van Heusden @ 2006-02-26 14:03 UTC (permalink / raw)
  To: Andrew Morton; +Cc: netdev, linux-kernel
In-Reply-To: <20060114233648.GA24049@vanheusden.com>

> > >  > > > > > Have you tried enabling the NMI watchdog?  Enable CONFIG_X86_LOCAL_APIC and
> > >  > > > > > boot with `nmi_watchdog=1' on the command line, make sure that the NMI line
> > >  > > > > > of /proc/interrupts is incrementing.
> > >  > > > > I'll give it a try. I've added it to the append-line in the lilo config.
> > >  > > > > Am now compiling the kernel.
> > >  > > > No change. Well, that is: the last message on the console now is
> > >  > > > "setting eth1 to promiscues mode".
> > >  > > Did you confirm that the NMI counters in /proc/interrupts are incrementing?
> > >  > Yes:
> > >  > root@muur:/home/folkert# for i in `seq 1 5` ; do cat /proc/interrupts  | grep NMI ; sleep 1 ; done
> > >  > NMI:    6949080    6949067
> ...
> > >  > NMI:    6949488    6949475
> > > 
> > >  Is there anything else I can try?
> > argh.   I haven't forgotten.  Hopefully after -rc1 I'll have more time...
> Sorry :-)
> > Your report didn't mention whether that card work OK under earlier 2.6
> > kernels.  If it does, a bit of bisection searching would really help.
> 2.6.15   crash
> 2.6.14.4 crash
> 2.6.14   crash
> 2.6.12.6 crash "NMI watchdog detected LOCKUP"
> 2.6.6    crash "NMI watchdog detected LOCKUP on CPU1 eip c02500aa, registers:"
> 2.6.1    would not boot

It is definately a 3com 3c905b problem: I swapped that card yesterday
with an adapter from a different brand (gigabit one) and now I can
tcpdump without any lockups.


Folkert van Heusden

-- 
iPod winnen? --> http://keetweej.vanheusden.com/redir.php?id=62
--------------------------------------------------------------------
Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com

^ permalink raw reply

* Re: RTL 8139 stops RX after receiving a jumbo frame
From: Francois Romieu @ 2006-02-26 14:44 UTC (permalink / raw)
  To: John Zielinski; +Cc: linux-kernel, netdev
In-Reply-To: <44012D53.30700@undead.cc>

John Zielinski <john_ml@undead.cc> :
[8139 failure]

Can you send lspci -vx, dmesg and lsmod after the hang ?

-- 
Ueimor

^ permalink raw reply

* Re: [2.4.32 - 2.6.15.4] e1000 - Fix mii interface
From: Paul Rolland @ 2006-02-26 14:55 UTC (permalink / raw)
  To: 'Jesper Juhl'
  Cc: linux-kernel, netdev, linux.nics, cramerj, john.ronciak,
	Ganesh.Venkatesan
In-Reply-To: <9a8748490602260459j76409f0cu287d7efad4d1781c@mail.gmail.com>

Hello,

> are you planning a 2.6 patch as well ?
> 
I'm preparing it, and I'll be carefull with Tab/space ;)

Paul

^ permalink raw reply

* Re: [2.4.32 - 2.6.15.4] e1000 - Fix mii interface
From: Jesper Juhl @ 2006-02-26 15:00 UTC (permalink / raw)
  To: Paul Rolland
  Cc: linux-kernel, netdev, linux.nics, cramerj, john.ronciak,
	Ganesh.Venkatesan
In-Reply-To: <01d801c63ae4$b7d71b00$2001a8c0@cortex>

On 2/26/06, Paul Rolland <rol@witbe.net> wrote:
> Hello,
>
> > are you planning a 2.6 patch as well ?
> >
> I'm preparing it, and I'll be carefull with Tab/space ;)
>
Ok, great, I was just wondering since I would have made one if you had
no plans to do so.

--
Jesper Juhl <jesper.juhl@gmail.com>
Don't top-post  http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please      http://www.expita.com/nomime.html

^ permalink raw reply

* Re: [PATCH] Revert sky2 to 0.13a
From: Ian Kumlien @ 2006-02-26 15:00 UTC (permalink / raw)
  To: woho
  Cc: Stephen Hemminger, Carl-Daniel Hailfinger, Jeff Garzik, netdev,
	Pavel Volkovitskiy, Linux Kernel Mailing List
In-Reply-To: <200602260957.04305.woho@woho.de>

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

On Sun, 2006-02-26 at 09:57 +0100, Wolfgang Hoffmann wrote:
> On Sunday 26 February 2006 03:03, Stephen Hemminger wrote:
> > Instead of whining, try this.
> 
> I tried and still see the hang.

I'm at a record 12 hours with that patch.

> Stephen, if you want me (as suggested off-list) to bisect the individual 
> patches leading from 0.13a to current head, please give me a series of 
> patches to incrementally apply, eighter via mail/ftp/git, and I'll test. I 
> don't want to hack the patches together myself, because results would be 
> worthless if I screw up, and given that I have no networking background 
> chances are high ...

There is a git bisect for that, and a link for it somewhere =)

> It takes me between 5 - 20 GB of data transfer to reproduce the hang, so it 
> will take a while, but I'm willing to help. If you see vendor chip specs 
> arrive soon and feel it's not worth the hassle, that's fine for me, too.

My last real test with sky2 was at 205gb, which made me think that it's
more of a race and not data dependant (read, 2 boxes doing ping -f -s
8000)...

> In the meanwhile, I'll resort to 0.13a
> 
> Wolfgang
-- 
Ian Kumlien <pomac () vapor ! com> -- http://pomac.netswarm.net

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 200 bytes --]

^ permalink raw reply

* Re: [2.4.32 - 2.6.15.4] e1000 - Fix mii interface
From: Paul Rolland @ 2006-02-26 15:12 UTC (permalink / raw)
  To: 'Jesper Juhl'
  Cc: linux-kernel, netdev, linux.nics, cramerj, john.ronciak,
	Ganesh.Venkatesan
In-Reply-To: <9a8748490602260700s2e82a623mcf2d778aa109bb00@mail.gmail.com>

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

Hello,

> Ok, great, I was just wondering since I would have made one if you had
> no plans to do so.

Well, I was just waiting to make sure it was interesting for someone ;)

Here is it, verified with tab and not spaces... but attached as my mailer
is likely to cripple anything I try to inline...

Signed-off-by: Paul Rolland <rol@as2917.net>

Cheers,
Paul

[-- Attachment #2: e1000.patch-2.6.15.4 --]
[-- Type: application/octet-stream, Size: 1507 bytes --]

diff -urN linux-2.6.15.4.orig/drivers/net/e1000/e1000_main.c linux-2.6.15.4/drivers/net/e1000/e1000_main.c
--- linux-2.6.15.4.orig/drivers/net/e1000/e1000_main.c	Fri Feb 10 07:22:48 2006
+++ linux-2.6.15.4/drivers/net/e1000/e1000_main.c	Sun Feb 26 15:04:40 2006
@@ -4153,29 +4153,29 @@
 
 	/* Fiber NICs only allow 1000 gbps Full duplex */
 	if((adapter->hw.media_type == e1000_media_type_fiber) &&
-		spddplx != (SPEED_1000 + DUPLEX_FULL)) {
+		spddplx != (SPEED_1000 + FULL_DUPLEX)) {
 		DPRINTK(PROBE, ERR, "Unsupported Speed/Duplex configuration\n");
 		return -EINVAL;
 	}
 
 	switch(spddplx) {
-	case SPEED_10 + DUPLEX_HALF:
+	case SPEED_10 + HALF_DUPLEX:
 		adapter->hw.forced_speed_duplex = e1000_10_half;
 		break;
-	case SPEED_10 + DUPLEX_FULL:
+	case SPEED_10 + FULL_DUPLEX:
 		adapter->hw.forced_speed_duplex = e1000_10_full;
 		break;
-	case SPEED_100 + DUPLEX_HALF:
+	case SPEED_100 + HALF_DUPLEX:
 		adapter->hw.forced_speed_duplex = e1000_100_half;
 		break;
-	case SPEED_100 + DUPLEX_FULL:
+	case SPEED_100 + FULL_DUPLEX:
 		adapter->hw.forced_speed_duplex = e1000_100_full;
 		break;
-	case SPEED_1000 + DUPLEX_FULL:
+	case SPEED_1000 + FULL_DUPLEX:
 		adapter->hw.autoneg = 1;
 		adapter->hw.autoneg_advertised = ADVERTISE_1000_FULL;
 		break;
-	case SPEED_1000 + DUPLEX_HALF: /* not supported */
+	case SPEED_1000 + HALF_DUPLEX: /* not supported */
 	default:
 		DPRINTK(PROBE, ERR, "Unsupported Speed/Duplex configuration\n");
 		return -EINVAL;

^ permalink raw reply

* Re: [PATCH] Revert sky2 to 0.13a
From: Ian Kumlien @ 2006-02-26 15:28 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Carl-Daniel Hailfinger, Jeff Garzik, netdev, Wolfgang Hoffmann,
	Pavel Volkovitskiy, Linux Kernel Mailing List
In-Reply-To: <20060225180353.5908c955@localhost.localdomain>

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

On Sat, 2006-02-25 at 18:03 -0800, Stephen Hemminger wrote:
> Instead of whining, try this.

I'm sorry to say that this failed after 12h 33m =P

-- 
Ian Kumlien <pomac () vapor ! com> -- http://pomac.netswarm.net

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 200 bytes --]

^ permalink raw reply

* Re: [PATCH] Revert sky2 to 0.13a
From: Arjan van de Ven @ 2006-02-26 15:47 UTC (permalink / raw)
  To: pomac
  Cc: woho, Stephen Hemminger, Carl-Daniel Hailfinger, Jeff Garzik,
	netdev, Pavel Volkovitskiy, Linux Kernel Mailing List
In-Reply-To: <1140966011.22812.2.camel@localhost>

On Sun, 2006-02-26 at 16:00 +0100, Ian Kumlien wrote:
> On Sun, 2006-02-26 at 09:57 +0100, Wolfgang Hoffmann wrote:
> > On Sunday 26 February 2006 03:03, Stephen Hemminger wrote:
> > > Instead of whining, try this.
> > 
> > I tried and still see the hang.
> 
> I'm at a record 12 hours with that patch.

shhh don't jinx it ;)

^ permalink raw reply

* Re: [PATCH] Revert sky2 to 0.13a
From: Ian Kumlien @ 2006-02-26 16:13 UTC (permalink / raw)
  To: Arjan van de Ven
  Cc: woho, Stephen Hemminger, Carl-Daniel Hailfinger, Jeff Garzik,
	netdev, Pavel Volkovitskiy, Linux Kernel Mailing List
In-Reply-To: <1140968831.2934.32.camel@laptopd505.fenrus.org>

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

On Sun, 2006-02-26 at 16:47 +0100, Arjan van de Ven wrote:
> On Sun, 2006-02-26 at 16:00 +0100, Ian Kumlien wrote:
> > On Sun, 2006-02-26 at 09:57 +0100, Wolfgang Hoffmann wrote:
> > > On Sunday 26 February 2006 03:03, Stephen Hemminger wrote:
> > > > Instead of whining, try this.
> > > 
> > > I tried and still see the hang.
> > 
> > I'm at a record 12 hours with that patch.
> 
> shhh don't jinx it ;)

Well it died 33 mins later... =)

I also saw some oddities... portage stopped working, i dunno if this can
be MSI related or so, else something is trashing memory in a very
special way =P

-- 
Ian Kumlien <pomac () vapor ! com> -- http://pomac.netswarm.net

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 200 bytes --]

^ permalink raw reply

* Re: [Announce] Intel PRO/Wireless 3945ABG Network Connection
From: Pavel Machek @ 2006-02-26 17:54 UTC (permalink / raw)
  To: James Ketrenos; +Cc: NetDev, linux-kernel
In-Reply-To: <43FF88E6.6020603@linux.intel.com>



> As a result of this change, some of the capabilities currently required
> to be provided on the host include enforcement of regulatory limits for
> the radio transmitter (radio calibration, transmit power, valid
> channels, 802.11h, etc.)  In order to meet the requirements of all
> geographies into which our adapters ship (over 100 countries) we have
> placed the regulatory enforcement logic into a user space daemon that
> we provide as a binary under the same license agreement as the
> microcode.  We provide that binary pre-compiled as both a 32-bit and
> 64-bit application.  The daemon utilizes a sysfs interface exposed by
> the driver in order to communicate with the hardware and configure the
> required regulatory parameters.

Well, that means no luck to sparc users.... And I hope kernel<->user
interface is nice, clean and documented.

-- 
Thanks, Sharp!

^ permalink raw reply

* Re: [PATCH] Revert sky2 to 0.13a
From: Wolfgang Hoffmann @ 2006-02-26 18:13 UTC (permalink / raw)
  To: pomac
  Cc: Stephen Hemminger, Carl-Daniel Hailfinger, Jeff Garzik, netdev,
	Pavel Volkovitskiy, Linux Kernel Mailing List
In-Reply-To: <1140966011.22812.2.camel@localhost>

On Sunday 26 February 2006 16:00, Ian Kumlien wrote:
> On Sun, 2006-02-26 at 09:57 +0100, Wolfgang Hoffmann wrote:
> > Stephen, if you want me (as suggested off-list) to bisect the individual
> > patches leading from 0.13a to current head, please give me a series of
> > patches to incrementally apply, eighter via mail/ftp/git, and I'll test.
> > I don't want to hack the patches together myself, because results would
> > be worthless if I screw up, and given that I have no networking
> > background chances are high ...
>
> There is a git bisect for that, and a link for it somewhere =)

Ok, I did some reading and just started a git bisect. I didn't find hints on 
how to bisect if I'm only interested in changes to sky2.[ch], so I'm taking 
the full kernel tree and skip testing those bisect steps that didn't change 
sky2.[ch].

Looking at Carl-Danies 0.13a and Stephens patch against 0.15 in this thread, 
I'll patch each bisect step such that sky2_poll() has

       sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ);
       if (sky2_read8(hw, STAT_LEV_TIMER_CTRL) == TIM_START) {
               sky2_write8(hw, STAT_LEV_TIMER_CTRL, TIM_STOP);
               sky2_write8(hw, STAT_LEV_TIMER_CTRL, TIM_START);
        }

after exit_loop. Is that ok?

I'll report as soon as I have results.

^ permalink raw reply

* Re: [2.6 patch] make UNIX a bool
From: Diego Calleja @ 2006-02-26 18:19 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: bunk, akpm, netdev, linux-kernel
In-Reply-To: <44009024.5050105@osdl.org>

El Sat, 25 Feb 2006 09:13:08 -0800,
Stephen Hemminger <shemminger@osdl.org> escribió:

> Why? You can build unix domain sockets as a loadable module and
> it runs fine (or it did last I tried). Whether that makes sense from a 

I've been running with CONFIG_UNIX=m since the dawn of time and everything
seems to work - not that I care if it's disabled, I just wanted to
confirm that it works.

^ permalink raw reply

* Re: [Announce] Intel PRO/Wireless 3945ABG Network Connection
From: Alejandro Bonilla @ 2006-02-26 20:20 UTC (permalink / raw)
  To: John Stoffel; +Cc: Matthieu CASTET, linux-kernel, netdev
In-Reply-To: <17408.55266.948833.168988@smtp.charter.net>

On Sat, 2006-02-25 at 17:19 -0500, John Stoffel wrote:
> >>>>> "Matthieu" == Matthieu CASTET <castet.matthieu@free.fr> writes:
> 
> Matthieu> I will say, why not put the restriction of the firmware
> Matthieu> binary blob ?  It run on the device so it will be difficult
> Matthieu> for people to analyse it.
> 
> So what do I do when I take my US laptop and fly to country X, which
> has comletely different rules for these radios?  Do I have to re-flash
> my firmware to make it work properly?  

Intel has got the obligation to make sure they are not letting you use
not allowed channels. If you as a manufacturer allow with a certain
change to let people use the channels they want, you are actually
encouraging people to use those channels. Letting the option available
makes Intel liable to get sued. If you buy an US PC, you stick to the US
channels. If you are a world traveler, buy the PC in japan or in Europe.
Then, you will be able to use the US and ROW(Rest of World) channels.

This is just the way it works, else you are liable. Believe me, and not
only me. Intel does not do things to give you a hard time, it is because
of a reason and they have the best lawyers at it.

It is just the Law and the FCC's.

.Alejandro

> 
> The big problem is the lack of global unity, but that will slowly get
> fixes as more countries realize it's a problem.  The big issue will be
> military/govt radio spectrum users, they won't want to move if they
> can help it.
> 
> John

^ permalink raw reply

* Re: RTL 8139 stops RX after receiving a jumbo frame
From: John Zielinski @ 2006-02-26 21:12 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel, netdev
In-Reply-To: <1140957965.23286.9.camel@localhost.localdomain>

Alan Cox wrote:
> Should drop the packet, but it may be triggering a driver path with a
> bug. Is this repeatable and with multiple 8139 cards
>   
I took the card out of my firewall and put it into my test box.  The
test procedure was to ping a third machine from the text box and then
start pinging the test box from the second machine using large packets.
The rev K card would always stop receiving permanently until a
ifdown/ifup was done.

I tried three other cards and they only showed heavy packet loss from
the ping running on the test box.  The packet loss went away when the
second machine stopped pinging it with the large packets.

Here's the list of cards:

Ethernet controller: Realtek Semiconductor Co., Ltd.
RTL-8139/8139C/8139C+ (rev 10)
Subsystem: Realtek Semiconductor Co., Ltd. RT8139
eth0:  Identified 8139 chip type 'RTL-8139 rev K'

Ethernet controller: Accton Technology Corporation SMC2-1211TX (rev 10)
Subsystem: Accton Technology Corporation EN-1207D Fast Ethernet Adapter
eth0:  Identified 8139 chip type 'RTL-8139B'

Ethernet controller: D-Link System Inc RTL8139 Ethernet (rev 10)
Subsystem: D-Link System Inc DFE-538TX 10/100 Ethernet Adapter
eth0:  Identified 8139 chip type 'RTL-8139C'

Ethernet controller: Realtek Semiconductor Co., Ltd.
RTL-8139/8139C/8139C+ (rev 10)
Subsystem: Realtek Semiconductor Co., Ltd. RT8139
eth0:  Identified 8139 chip type 'RTL-8139C'

^ permalink raw reply

* Re: RTL 8139 stops RX after receiving a jumbo frame
From: John Zielinski @ 2006-02-26 21:13 UTC (permalink / raw)
  To: Francois Romieu; +Cc: linux-kernel, netdev
In-Reply-To: <20060226144424.GA26879@electric-eye.fr.zoreil.com>

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

Francois Romieu wrote:
> Can you send lspci -vx, dmesg and lsmod after the hang ?
>   


[-- Attachment #2: lspci --]
[-- Type: text/plain, Size: 4726 bytes --]

0000:00:00.0 Host bridge: VIA Technologies, Inc. VT82C693A/694x [Apollo PRO133x] (rev c4)
	Subsystem: Asustek Computer, Inc.: Unknown device 80e7
	Flags: bus master, medium devsel, latency 0
	Memory at fc000000 (32-bit, prefetchable) [size=32M]
	Capabilities: [a0] AGP version 2.0
	Capabilities: [c0] Power Management version 2
00: 06 11 91 06 06 00 10 22 c4 00 00 06 00 00 00 00
10: 08 00 00 fc 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 43 10 e7 80
30: 00 00 00 00 a0 00 00 00 00 00 00 00 00 00 00 00

0000:00:01.0 PCI bridge: VIA Technologies, Inc. VT82C598/694x [Apollo MVP3/Pro133x AGP] (prog-if 00 [Normal decode])
	Flags: bus master, 66MHz, medium devsel, latency 0
	Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
	Memory behind bridge: f6000000-f75fffff
	Prefetchable memory behind bridge: f7700000-fbffffff
	Capabilities: [80] Power Management version 2
00: 06 11 98 85 07 00 30 22 00 00 04 06 00 00 01 00
10: 00 00 00 00 00 00 00 00 00 01 01 00 f0 00 00 00
20: 00 f6 50 f7 70 f7 f0 fb 00 00 00 00 00 00 00 00
30: 00 00 00 00 80 00 00 00 00 00 00 00 00 00 08 00

0000:00:04.0 ISA bridge: VIA Technologies, Inc. VT82C686 [Apollo Super South] (rev 40)
	Subsystem: Asustek Computer, Inc.: Unknown device 80e7
	Flags: bus master, stepping, medium devsel, latency 0
	Capabilities: [c0] Power Management version 2
00: 06 11 86 06 87 00 10 02 40 00 01 06 00 00 80 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 43 10 e7 80
30: 00 00 00 00 c0 00 00 00 00 00 00 00 00 00 00 00

0000:00:04.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06) (prog-if 8a [Master SecP PriP])
	Flags: bus master, stepping, medium devsel, latency 32
	I/O ports at d800 [size=16]
	Capabilities: [c0] Power Management version 2
00: 06 11 71 05 87 00 90 02 06 8a 01 01 00 20 00 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 01 d8 00 00 00 00 00 00 00 00 00 00 00 00 00 00
30: 00 00 00 00 c0 00 00 00 00 00 00 00 00 00 00 00

0000:00:04.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 1a) (prog-if 00 [UHCI])
	Subsystem: VIA Technologies, Inc. (Wrong ID) USB Controller
	Flags: bus master, medium devsel, latency 32, IRQ 11
	I/O ports at d400 [size=32]
	Capabilities: [80] Power Management version 2
00: 06 11 38 30 17 00 10 02 1a 00 03 0c 08 20 00 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 01 d4 00 00 00 00 00 00 00 00 00 00 25 09 34 12
30: 00 00 00 00 80 00 00 00 00 00 00 00 0b 04 00 00

0000:00:04.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 1a) (prog-if 00 [UHCI])
	Subsystem: VIA Technologies, Inc. (Wrong ID) USB Controller
	Flags: bus master, medium devsel, latency 32, IRQ 11
	I/O ports at d000 [size=32]
	Capabilities: [80] Power Management version 2
00: 06 11 38 30 17 00 10 02 1a 00 03 0c 08 20 00 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 01 d0 00 00 00 00 00 00 00 00 00 00 25 09 34 12
30: 00 00 00 00 80 00 00 00 00 00 00 00 0b 04 00 00

0000:00:04.4 Host bridge: VIA Technologies, Inc. VT82C686 [Apollo Super ACPI] (rev 40)
	Flags: medium devsel, IRQ 9
	Capabilities: [68] Power Management version 2
00: 06 11 57 30 00 00 90 02 40 00 00 06 00 00 00 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
30: 00 00 00 00 68 00 00 00 00 00 00 00 00 00 00 00

0000:00:0a.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
	Subsystem: Realtek Semiconductor Co., Ltd. RT8139
	Flags: bus master, medium devsel, latency 32, IRQ 11
	I/O ports at b800 [size=128]
	Memory at f5800000 (32-bit, non-prefetchable) [size=128]
	Expansion ROM at 20000000 [disabled] [size=64K]
00: ec 10 39 81 07 00 00 02 10 00 00 02 00 20 00 00
10: 01 b8 00 00 00 00 80 f5 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 ec 10 39 81
30: 00 00 00 00 00 00 00 00 00 00 00 00 ff 01 20 40

0000:01:00.0 VGA compatible controller: nVidia Corporation NV20 [GeForce3] (rev a3) (prog-if 00 [VGA])
	Subsystem: VISIONTEK: Unknown device 001b
	Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 10
	Memory at f6000000 (32-bit, non-prefetchable) [size=16M]
	Memory at f8000000 (32-bit, prefetchable) [size=64M]
	Memory at f7800000 (32-bit, prefetchable) [size=512K]
	Expansion ROM at f77f0000 [disabled] [size=64K]
	Capabilities: [60] Power Management version 2
	Capabilities: [44] AGP version 2.0
00: de 10 00 02 07 00 b0 02 a3 00 00 03 00 40 00 00
10: 00 00 00 f6 08 00 00 f8 08 00 80 f7 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 45 15 1b 00
30: 00 00 7f f7 60 00 00 00 00 00 00 00 0a 01 05 01

[-- Attachment #3: dmesg --]
[-- Type: text/plain, Size: 10037 bytes --]

Linux version 2.6.15.4 (root@test) (gcc version 3.3.5 (Debian 1:3.3.5-13)) #2 PREEMPT Sun Feb 26 14:01:26 EST 2006
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 0000000017fec000 (usable)
 BIOS-e820: 0000000017fec000 - 0000000017fef000 (ACPI data)
 BIOS-e820: 0000000017fef000 - 0000000017fff000 (reserved)
 BIOS-e820: 0000000017fff000 - 0000000018000000 (ACPI NVS)
 BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)
383MB LOWMEM available.
On node 0 totalpages: 98284
  DMA zone: 4096 pages, LIFO batch:0
  DMA32 zone: 0 pages, LIFO batch:0
  Normal zone: 94188 pages, LIFO batch:31
  HighMem zone: 0 pages, LIFO batch:0
DMI 2.3 present.
ACPI: RSDP (v000 ASUS                                  ) @ 0x000f7360
ACPI: RSDT (v001 ASUS   TUV4X    0x30303031 MSFT 0x31313031) @ 0x17fec000
ACPI: FADT (v001 ASUS   TUV4X    0x30303031 MSFT 0x31313031) @ 0x17fec080
ACPI: BOOT (v001 ASUS   TUV4X    0x30303031 MSFT 0x31313031) @ 0x17fec040
ACPI: DSDT (v001   ASUS TUV4X    0x00001000 MSFT 0x0100000b) @ 0x00000000
ACPI: PM-Timer IO Port: 0xe408
Allocating PCI resources starting at 20000000 (gap: 18000000:e7ff0000)
Built 1 zonelists
Kernel command line: root=/dev/hda1 vga=0xa
Local APIC disabled by BIOS -- you can enable it with "lapic"
mapped APIC to ffffd000 (01301000)
Initializing CPU#0
PID hash table entries: 2048 (order: 11, 32768 bytes)
Detected 805.786 MHz processor.
Using pmtmr for high-res timesource
Console: colour VGA+ 132x60
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 386492k/393136k available (1736k kernel code, 6136k reserved, 555k data, 152k init, 0k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Calibrating delay using timer specific routine.. 1613.23 BogoMIPS (lpj=3226475)
Mount-cache hash table entries: 512
CPU: After generic identify, caps: 0383f9ff 00000000 00000000 00000000 00000000 00000000 00000000
CPU: After vendor identify, caps: 0383f9ff 00000000 00000000 00000000 00000000 00000000 00000000
CPU: L1 I cache: 16K, L1 D cache: 16K
CPU: L2 cache: 128K
CPU: After all inits, caps: 0383f9ff 00000000 00000000 00000040 00000000 00000000 00000000
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
mtrr: v2.0 (20020519)
CPU: Intel Celeron (Coppermine) stepping 06
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.
ACPI: setting ELCR to 0200 (from 0c00)
NET: Registered protocol family 16
ACPI: bus type pci registered
PCI: PCI BIOS revision 2.10 entry at 0xf0d20, last bus=1
PCI: Using configuration type 1
ACPI: Subsystem revision 20050902
ACPI: Interpreter enabled
ACPI: Using PIC for interrupt routing
ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 5 6 7 9 *10 11 12 14 15)
ACPI: PCI Interrupt Link [LNKB] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 5 6 7 9 10 *11 12 14 15)
ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 5 6 7 9 10 11 12 14 15) *0, disabled.
ACPI: PCI Root Bridge [PCI0] (0000:00)
PCI: Probing PCI hardware (bus 00)
ACPI: Assume root bridge [\_SB_.PCI0] bus is 0
PCI: Scanning bus 0000:00
PCI: Found 0000:00:00.0 [1106/0691] 000600 00
PCI: Calling quirk c01dff40 for 0000:00:00.0
PCI: Calling quirk c0257a10 for 0000:00:00.0
PCI: Calling quirk c0257de0 for 0000:00:00.0
PCI: Found 0000:00:01.0 [1106/8598] 000604 01
PCI: Calling quirk c01dff40 for 0000:00:01.0
PCI: Calling quirk c0257a10 for 0000:00:01.0
PCI: Calling quirk c0257de0 for 0000:00:01.0
PCI: Found 0000:00:04.0 [1106/0686] 000601 00
PCI: Calling quirk c01dff40 for 0000:00:04.0
PCI: Calling quirk c0257a10 for 0000:00:04.0
PCI: Calling quirk c0257de0 for 0000:00:04.0
PCI: Found 0000:00:04.1 [1106/0571] 000101 00
PCI: Calling quirk c01dff40 for 0000:00:04.1
PCI: Calling quirk c0257a10 for 0000:00:04.1
PCI: Calling quirk c0257de0 for 0000:00:04.1
PCI: Found 0000:00:04.2 [1106/3038] 000c03 00
PCI: Calling quirk c01dff40 for 0000:00:04.2
PCI: Calling quirk c0257a10 for 0000:00:04.2
PCI: Calling quirk c0257de0 for 0000:00:04.2
PCI: Found 0000:00:04.3 [1106/3038] 000c03 00
PCI: Calling quirk c01dff40 for 0000:00:04.3
PCI: Calling quirk c0257a10 for 0000:00:04.3
PCI: Calling quirk c0257de0 for 0000:00:04.3
PCI: Found 0000:00:04.4 [1106/3057] 000600 00
PCI: Calling quirk c01df9b0 for 0000:00:04.4
PCI quirk: region e800-e80f claimed by vt82c686 SMB
PCI: Calling quirk c01dfc90 for 0000:00:04.4
PCI: Calling quirk c01dff40 for 0000:00:04.4
PCI: Calling quirk c0257a10 for 0000:00:04.4
PCI: Calling quirk c0257de0 for 0000:00:04.4
PCI: Found 0000:00:0a.0 [10ec/8139] 000200 00
PCI: Calling quirk c01dff40 for 0000:00:0a.0
PCI: Calling quirk c0257a10 for 0000:00:0a.0
PCI: Calling quirk c0257de0 for 0000:00:0a.0
PCI: Fixups for bus 0000:00
PCI: Scanning behind PCI bridge 0000:00:01.0, config 010100, pass 0
PCI: Scanning bus 0000:01
PCI: Found 0000:01:00.0 [10de/0200] 000300 00
PCI: Calling quirk c01dff40 for 0000:01:00.0
PCI: Calling quirk c0257a10 for 0000:01:00.0
PCI: Calling quirk c0257de0 for 0000:01:00.0
Boot video device is 0000:01:00.0
PCI: Fixups for bus 0000:01
PCI: Bus scan for 0000:01 returning with max=01
PCI: Scanning behind PCI bridge 0000:00:01.0, config 010100, pass 1
PCI: Bus scan for 0000:00 returning with max=01
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCI1._PRT]
PCI: Using ACPI for IRQ routing
PCI: If a device doesn't work, try "pci=routeirq".  If it helps, post a report
  got res [20000000:2000ffff] bus [20000000:2000ffff] flags 7200 for BAR 6 of 0000:00:0a.0
PCI: Bridge: 0000:00:01.0
  IO window: disabled.
  MEM window: f6000000-f75fffff
  PREFETCH window: f7700000-fbffffff
PCI: Calling quirk c01dfcf0 for 0000:00:01.0
PCI: Setting latency timer of device 0000:00:01.0 to 64
Simple Boot Flag at 0x3a set to 0x1
Machine check exception polling timer started.
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered
PCI: Calling quirk c01dfdf0 for 0000:00:00.0
PCI: Calling quirk c024bea0 for 0000:00:00.0
PCI: Calling quirk c01dfdf0 for 0000:00:01.0
PCI: Calling quirk c024bea0 for 0000:00:01.0
PCI: Calling quirk c01dfb50 for 0000:00:04.0
PCI: Disabling Via external APIC routing
PCI: Calling quirk c01dfdf0 for 0000:00:04.0
PCI: Calling quirk c024bea0 for 0000:00:04.0
PCI: Calling quirk c01dfdf0 for 0000:00:04.1
PCI: Calling quirk c024bea0 for 0000:00:04.1
PCI: Calling quirk c01dfdf0 for 0000:00:04.2
PCI: Calling quirk c024bea0 for 0000:00:04.2
PCI: Calling quirk c01dfdf0 for 0000:00:04.3
PCI: Calling quirk c024bea0 for 0000:00:04.3
PCI: Calling quirk c01dfdf0 for 0000:00:04.4
PCI: Calling quirk c024bea0 for 0000:00:04.4
PCI: Calling quirk c01dfdf0 for 0000:00:0a.0
PCI: Calling quirk c024bea0 for 0000:00:0a.0
PCI: Calling quirk c01dfdf0 for 0000:01:00.0
PCI: Calling quirk c024bea0 for 0000:01:00.0
serio: i8042 AUX port at 0x60,0x64 irq 12
serio: i8042 KBD port at 0x60,0x64 irq 1
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
serial8250: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller at PCI slot 0000:00:04.1
PCI: Calling quirk c01dfcf0 for 0000:00:04.1
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
VP_IDE: VIA vt82c686b (rev 40) IDE UDMA100 controller on pci0000:00:04.1
    ide0: BM-DMA at 0xd800-0xd807, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0xd808-0xd80f, BIOS settings: hdc:DMA, hdd:pio
Probing IDE interface ide0...
hda: Maxtor 91728D8, ATA DISK drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Probing IDE interface ide1...
hdc: BENQ DVD DUAL DW1610, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
hda: max request size: 128KiB
hda: 33750864 sectors (17280 MB) w/512KiB Cache, CHS=33483/16/63, UDMA(33)
hda: cache flushes not supported
 hda: hda1 hda2
hdc: ATAPI 40X DVD-ROM DVD-R CD-R/RW drive, 2048kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20
mice: PS/2 mouse device common for all mice
NET: Registered protocol family 2
input: AT Translated Set 2 keyboard as /class/input/input0
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 4, 65536 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Using IPI Shortcut mode
ReiserFS: hda1: found reiserfs format "3.6" with standard journal
logips2pp: Detected unknown logitech mouse model 72
input: PS/2 Logitech Mouse as /class/input/input1
ReiserFS: hda1: using ordered data mode
ReiserFS: hda1: journal params: device hda1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS: hda1: checking transaction log (hda1)
ReiserFS: hda1: Using r5 hash to sort names
VFS: Mounted root (reiserfs filesystem) readonly.
Freeing unused kernel memory: 152k freed
Adding 979924k swap on /dev/hda2.  Priority:-1 extents:1 across:979924k
8139too Fast Ethernet driver 0.9.27
PCI: Enabling device 0000:00:0a.0 (0004 -> 0007)
ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11
PCI: setting IRQ 11 as level-triggered
ACPI: PCI Interrupt 0000:00:0a.0[A] -> Link [LNKC] -> GSI 11 (level, low) -> IRQ 11
eth0: RealTek RTL8139 at 0xd8932000, 00:4f:4e:00:5d:fd, IRQ 11
eth0:  Identified 8139 chip type 'RTL-8139 rev K'
eth0: link up, 100Mbps, full-duplex, lpa 0xC5E1

[-- Attachment #4: lsmod --]
[-- Type: text/plain, Size: 71 bytes --]

Module                  Size  Used by
8139too                27136  0 

^ permalink raw reply

* Re: [PATCH] Revert sky2 to 0.13a
From: Wolfgang Hoffmann @ 2006-02-26 22:31 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: pomac, Carl-Daniel Hailfinger, Jeff Garzik, netdev,
	Pavel Volkovitskiy, Linux Kernel Mailing List
In-Reply-To: <200602261913.36308.woho@woho.de>

On Sunday 26 February 2006 19:13, Wolfgang Hoffmann wrote:
> Ok, I did some reading and just started a git bisect. I didn't find hints
> on how to bisect if I'm only interested in changes to sky2.[ch], so I'm
> taking the full kernel tree and skip testing those bisect steps that didn't
> change sky2.[ch].
>
> Looking at Carl-Daniels 0.13a and Stephens patch against 0.15 in this
> thread, I'll patch each bisect step such that sky2_poll() has
>
>        sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ);
>        if (sky2_read8(hw, STAT_LEV_TIMER_CTRL) == TIM_START) {
>                sky2_write8(hw, STAT_LEV_TIMER_CTRL, TIM_STOP);
>                sky2_write8(hw, STAT_LEV_TIMER_CTRL, TIM_START);
>         }
>
> after exit_loop. Is that ok?
>
> I'll report as soon as I have results.

Bisect done:

4d52b48b43d0d1d5959fa722ee0046e3542e5e1b is first bad commit
    [PATCH] sky2: support msi interrupt (revised)

Reverting this commit in git head seems to work, at least the driver builds 
and loads. Is that sane?

I'm currently testing this (without any further modifications), let's see if 
it hangs or not.

^ permalink raw reply

* Re: [PATCH] Revert sky2 to 0.13a
From: Carl-Daniel Hailfinger @ 2006-02-26 22:38 UTC (permalink / raw)
  To: pomac
  Cc: Arjan van de Ven, woho, Stephen Hemminger, Jeff Garzik, netdev,
	Pavel Volkovitskiy, Linux Kernel Mailing List
In-Reply-To: <1140970427.23375.11.camel@localhost>

Ian Kumlien schrieb:
> On Sun, 2006-02-26 at 16:47 +0100, Arjan van de Ven wrote:
> 
>>On Sun, 2006-02-26 at 16:00 +0100, Ian Kumlien wrote:
>>
>>>On Sun, 2006-02-26 at 09:57 +0100, Wolfgang Hoffmann wrote:
>>>
>>>>On Sunday 26 February 2006 03:03, Stephen Hemminger wrote:
>>>>
>>>>>Instead of whining, try this.
>>>>
>>>>I tried and still see the hang.
>>>
>>>I'm at a record 12 hours with that patch.
>>
>>shhh don't jinx it ;)
> 
> 
> Well it died 33 mins later... =)
> 
> I also saw some oddities... portage stopped working, i dunno if this can
> be MSI related or so, else something is trashing memory in a very
> special way =P

Yes, 0.15 causes memory corruption even if MSI is disabled.


Regards,
Carl-Daniel

^ permalink raw reply

* Re: [PATCH] Revert sky2 to 0.13a
From: Wolfgang Hoffmann @ 2006-02-26 23:03 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: pomac, Carl-Daniel Hailfinger, Jeff Garzik, netdev,
	Pavel Volkovitskiy, Linux Kernel Mailing List
In-Reply-To: <200602262331.47750.woho@woho.de>

On Sunday 26 February 2006 23:31, Wolfgang Hoffmann wrote:
> On Sunday 26 February 2006 19:13, Wolfgang Hoffmann wrote:
> > Ok, I did some reading and just started a git bisect. I didn't find hints
> > on how to bisect if I'm only interested in changes to sky2.[ch], so I'm
> > taking the full kernel tree and skip testing those bisect steps that
> > didn't change sky2.[ch].
> >
> > Looking at Carl-Daniels 0.13a and Stephens patch against 0.15 in this
> > thread, I'll patch each bisect step such that sky2_poll() has
> >
> >        sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ);
> >        if (sky2_read8(hw, STAT_LEV_TIMER_CTRL) == TIM_START) {
> >                sky2_write8(hw, STAT_LEV_TIMER_CTRL, TIM_STOP);
> >                sky2_write8(hw, STAT_LEV_TIMER_CTRL, TIM_START);
> >         }
> >
> > after exit_loop. Is that ok?
> >
> > I'll report as soon as I have results.
>
> Bisect done:
>
> 4d52b48b43d0d1d5959fa722ee0046e3542e5e1b is first bad commit
>     [PATCH] sky2: support msi interrupt (revised)
>
> Reverting this commit in git head seems to work, at least the driver builds
> and loads. Is that sane?
>
> I'm currently testing this (without any further modifications), let's see
> if it hangs or not.

Ok, no hangs yet.

This version passed a test scenario only 0.13a has survived so far. I'll 
continue to use this to give it more testing tomorrow.

Looking at the reverted commit, I wonder if modprobing sky2 with disable_msi=1 
is equivalent to reverting the commit?

^ permalink raw reply

* Re: [PATCH] Revert sky2 to 0.13a
From: Ian Kumlien @ 2006-02-27  0:43 UTC (permalink / raw)
  To: Carl-Daniel Hailfinger
  Cc: Arjan van de Ven, woho, Stephen Hemminger, Jeff Garzik, netdev,
	Pavel Volkovitskiy, Linux Kernel Mailing List
In-Reply-To: <44022DEC.1070601@gmx.net>

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

On Sun, 2006-02-26 at 23:38 +0100, Carl-Daniel Hailfinger wrote:
> Ian Kumlien schrieb:
> > I also saw some oddities... portage stopped working, i dunno if this can
> > be MSI related or so, else something is trashing memory in a very
> > special way =P
> 
> Yes, 0.15 causes memory corruption even if MSI is disabled.

So if i run with iommu=forced or what the hell the option is called i
should be able to catch these trashings?

I also found it odd that it was only python that suffered... Starting
large and long running C apps worked just fine.

-- 
Ian Kumlien <pomac () vapor ! com> -- http://pomac.netswarm.net

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 200 bytes --]

^ permalink raw reply

* [Patch 7/7] Generic netlink interface (delay accounting)
From: Shailabh Nagar @ 2006-02-27  8:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: lse-tech, netdev
In-Reply-To: <1141026996.5785.38.camel@elinux04.optonline.net>

delayacct-genetlink.patch

Create a generic netlink interface (NETLINK_GENERIC family), 
called "taskstats", for getting delay and cpu statistics of 
tasks and thread groups during their lifetime and when they exit. 

The cpu stats are available only if CONFIG_SCHEDSTATS is enabled.

When a task is alive, userspace can get its stats by sending a 
command containing its pid. Sending a tgid returns the sum of stats 
of the tasks belonging to that tgid (where such a sum makes sense). 
Together, the command interface allows stats for a large number of 
tasks to be collected more efficiently than would be possible 
through /proc or any per-pid interface. 

The netlink interface also sends the stats for each task to userspace 
when the task is exiting. This permits fine-grain accounting for 
short-lived tasks, which is important if userspace is doing its own 
aggregation of statistics based on some grouping of tasks 
(e.g. CSA jobs, ELSA banks or CKRM classes).

If the exiting task belongs to a thread group (with more members than itself)
, the latters delay stats are also sent out on the task's exit. This allows
userspace to get accurate data at a per-tgid level while the tid's of a tgid
are exiting one by one.

The interface has been deliberately kept distinct from the delay 
accounting code since it is potentially usable by other kernel components
that need to export per-pid/tgid data. The format of data returned to 
userspace is versioned and the command interface easily extensible to 
facilitate reuse.

If reuse is not deemed useful enough, the naming, placement of functions
and config options will be modified to make this an interface for delay 
accounting alone.

Signed-off-by: Shailabh Nagar <nagar@watson.ibm.com>
Signed-off-by: Balbir Singh <balbir@in.ibm.com>

 include/linux/delayacct.h |    2 
 include/linux/taskstats.h |  125 +++++++++++++++++++++
 init/Kconfig              |   16 ++
 kernel/Makefile           |    1 
 kernel/delayacct.c        |   49 ++++++++
 kernel/taskstats.c        |  266 ++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 456 insertions(+), 3 deletions(-)

Index: linux-2.6.16-rc4/include/linux/delayacct.h
===================================================================
--- linux-2.6.16-rc4.orig/include/linux/delayacct.h	2006-02-27 01:53:01.000000000 -0500
+++ linux-2.6.16-rc4/include/linux/delayacct.h	2006-02-27 01:53:03.000000000 -0500
@@ -16,6 +16,7 @@
 
 #include <linux/sched.h>
 #include <linux/sysctl.h>
+#include <linux/taskstats.h>
 
 #ifdef CONFIG_TASK_DELAY_ACCT
 extern int delayacct_on;	/* Delay accounting turned on/off */
@@ -27,6 +28,7 @@ extern void __delayacct_tsk_init(struct 
 extern void __delayacct_tsk_exit(struct task_struct *);
 extern void __delayacct_blkio(void);
 extern void __delayacct_swapin(void);
+extern int delayacct_add_tsk(struct taskstats_reply *, struct task_struct *);
 
 static inline void delayacct_tsk_early_init(struct task_struct *tsk)
 {
Index: linux-2.6.16-rc4/include/linux/taskstats.h
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.16-rc4/include/linux/taskstats.h	2006-02-27 01:53:03.000000000 -0500
@@ -0,0 +1,125 @@
+/* taskstats.h - exporting per-task statistics
+ *
+ * Copyright (C) Shailabh Nagar, IBM Corp. 2006
+ *           (C) Balbir Singh,   IBM Corp. 2006
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of version 2.1 of the GNU Lesser General Public License
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+#ifndef _LINUX_TASKSTATS_H
+#define _LINUX_TASKSTATS_H
+
+/* Format for per-task data returned to userland when
+ *	- a task exits
+ *	- listener requests stats for a task
+ *
+ * The struct is versioned. Newer versions should only add fields to
+ * the bottom of the struct to maintain backward compatibility.
+ *
+ * To create the next version, bump up the taskstats_version variable
+ * and delineate the start of newly added fields with a comment indicating
+ * the version number.
+ */
+
+#define TASKSTATS_VERSION	1
+
+struct taskstats {
+
+	/* Version 1 */
+#define TASKSTATS_NOPID	-1
+	pid_t	pid;
+	pid_t	tgid;
+
+	/* XXX_count is number of delay values recorded.
+	 * XXX_total is corresponding cumulative delay in nanoseconds
+	 */
+
+#define TASKSTATS_NOCPUSTATS	1
+	__u64	cpu_count;
+	__u64	cpu_delay_total;	/* wait, while runnable, for cpu */
+	__u64	blkio_count;
+	__u64	blkio_delay_total;	/* sync,block io completion wait*/
+	__u64	swapin_count;
+	__u64	swapin_delay_total;	/* swapin page fault wait*/
+
+	__u64	cpu_run_total;		/* cpu running time
+					 * no count available/provided */
+};
+
+
+#define TASKSTATS_LISTEN_GROUP	0x1
+
+/*
+ * Commands sent from userspace
+ * Not versioned. New commands should only be inserted at the enum's end
+ */
+
+enum {
+	TASKSTATS_CMD_UNSPEC,		/* Reserved */
+	TASKSTATS_CMD_NONE,		/* Not a valid cmd to send
+					 * Marks data sent on task/tgid exit */
+	TASKSTATS_CMD_LISTEN,		/* Start listening */
+	TASKSTATS_CMD_IGNORE,		/* Stop listening */
+	TASKSTATS_CMD_PID,		/* Send stats for a pid */
+	TASKSTATS_CMD_TGID,		/* Send stats for a tgid */
+};
+
+/* Parameters for commands
+ * New parameters should only be inserted at the struct's end
+ */
+
+struct taskstats_cmd_param {
+	union {
+		pid_t	pid;
+		pid_t	tgid;
+	} id;
+};
+
+/*
+ * Reply sent from kernel
+ * Version number affects size/format of struct taskstats only
+ */
+
+struct taskstats_reply {
+	enum outtype {
+		TASKSTATS_REPLY_NONE = 1,	/* Control cmd response */
+		TASKSTATS_REPLY_PID,		/* per-pid data cmd response*/
+		TASKSTATS_REPLY_TGID,		/* per-tgid data cmd response*/
+		TASKSTATS_REPLY_EXIT_PID,	/* Exiting task's stats */
+		TASKSTATS_REPLY_EXIT_TGID,	/* Exiting tgid's stats
+						 * (sent on each tid's exit) */
+	} outtype;
+	__u32 version;
+	__u32 err;
+	struct taskstats stats;			/* Invalid if err != 0 */
+};
+
+/* NETLINK_GENERIC related info */
+
+#define TASKSTATS_GENL_NAME	"TASKSTATS"
+#define TASKSTATS_GENL_VERSION	0x1
+/* Following must be > NLMSG_MIN_TYPE */
+#define TASKSTATS_GENL_ID	0x123
+
+#define TASKSTATS_HDRLEN	(NLMSG_SPACE(GENL_HDRLEN))
+#define TASKSTATS_BODYLEN	(sizeof(struct taskstats_reply))
+
+#ifdef __KERNEL__
+
+#include <linux/sched.h>
+
+#ifdef CONFIG_TASKSTATS
+extern void taskstats_exit_pid(struct task_struct *);
+#else
+static inline void taskstats_exit_pid(struct task_struct *tsk)
+{}
+#endif
+
+#endif /* __KERNEL__ */
+#endif /* _LINUX_TASKSTATS_H */
Index: linux-2.6.16-rc4/kernel/Makefile
===================================================================
--- linux-2.6.16-rc4.orig/kernel/Makefile	2006-02-27 01:52:54.000000000 -0500
+++ linux-2.6.16-rc4/kernel/Makefile	2006-02-27 01:53:03.000000000 -0500
@@ -35,6 +35,7 @@ obj-$(CONFIG_GENERIC_HARDIRQS) += irq/
 obj-$(CONFIG_SECCOMP) += seccomp.o
 obj-$(CONFIG_RCU_TORTURE_TEST) += rcutorture.o
 obj-$(CONFIG_TASK_DELAY_ACCT) += delayacct.o
+obj-$(CONFIG_TASKSTATS) += taskstats.o
 
 ifneq ($(CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER),y)
 # According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is
Index: linux-2.6.16-rc4/kernel/taskstats.c
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ linux-2.6.16-rc4/kernel/taskstats.c	2006-02-27 01:53:03.000000000 -0500
@@ -0,0 +1,266 @@
+/*
+ * taskstats.c - Export per-task statistics to userland
+ *
+ * Copyright (C) Shailabh Nagar, IBM Corp. 2006
+ *           (C) Balbir Singh,   IBM Corp. 2006
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/taskstats.h>
+#include <linux/delayacct.h>
+#include <net/genetlink.h>
+#include <asm/atomic.h>
+
+const int taskstats_version = TASKSTATS_VERSION;
+static atomic_t taskstats_group_listeners = ATOMIC_INIT(0);
+static DEFINE_PER_CPU(__u32, taskstats_seqnum) = { 0 };
+
+static struct genl_family family = {
+//	.id             = GENL_ID_GENERATE,
+	.id             = TASKSTATS_GENL_ID,
+	.name           = TASKSTATS_GENL_NAME,
+	.version        = TASKSTATS_GENL_VERSION,
+	.hdrsize        = 0,
+	.maxattr        = 0,
+};
+
+#define genlmsg_data(genlhdr)	((char *)genlhdr + GENL_HDRLEN)
+
+/* Taskstat specific functions */
+
+static int taskstats_listen(struct sk_buff *skb, struct genl_info *info)
+{
+	atomic_inc(&taskstats_group_listeners);
+	return 0;
+}
+
+static int taskstats_ignore(struct sk_buff *skb, struct genl_info *info)
+{
+	atomic_dec(&taskstats_group_listeners);
+	return 0;
+}
+
+static int prepare_reply(struct genl_info *info, u8 cmd,
+			 struct sk_buff **skbp, struct taskstats_reply **replyp)
+{
+	struct sk_buff *skb;
+	struct taskstats_reply *reply;
+
+	skb = nlmsg_new(TASKSTATS_HDRLEN + TASKSTATS_BODYLEN);
+	if (!skb)
+		return -ENOMEM;
+
+	if (!info) {
+		int seq = get_cpu_var(taskstats_seqnum)++;
+		put_cpu_var(taskstats_seqnum);
+
+		reply = genlmsg_put(skb, 0, seq,
+				    family.id, 0, NLM_F_REQUEST,
+				    cmd, family.version);
+	} else
+		reply = genlmsg_put(skb, info->snd_pid, info->snd_seq,
+				    family.id, 0, info->nlhdr->nlmsg_flags,
+				    info->genlhdr->cmd, family.version);
+	if (reply == NULL) {
+		nlmsg_free(skb);
+		return -EINVAL;
+	}
+	skb_put(skb, TASKSTATS_BODYLEN);
+
+	memset(reply, 0, sizeof(*reply));
+	reply->version = taskstats_version;
+	reply->err = 0;
+
+	*skbp = skb;
+	*replyp = reply;
+	return 0;
+}
+
+static int send_reply(struct sk_buff *skb, int replytype)
+{
+	struct genlmsghdr *genlhdr = nlmsg_data((struct nlmsghdr *)skb->data);
+	struct taskstats_reply *reply;
+
+	reply = (struct taskstats_reply *)genlmsg_data(genlhdr);
+	reply->outtype = replytype;
+
+	genlmsg_end(skb, genlhdr);
+	return genlmsg_multicast(skb, 0, TASKSTATS_LISTEN_GROUP);
+}
+
+static inline void fill_pid(struct taskstats_reply *reply, pid_t pid, struct task_struct *pidtsk)
+{
+	int rc;
+	struct task_struct *tsk = pidtsk;
+
+	if (!pidtsk) {
+		read_lock(&tasklist_lock);
+		tsk = find_task_by_pid(pid);
+		if (!tsk) {
+			read_unlock(&tasklist_lock);
+			reply->err = EINVAL;
+			return;
+		}
+		get_task_struct(tsk);
+		read_unlock(&tasklist_lock);
+	} else
+		get_task_struct(tsk);
+
+	rc = delayacct_add_tsk(reply, tsk);
+	if (!rc) {
+		reply->stats.pid = tsk->pid;
+		reply->stats.tgid = tsk->tgid;
+	} else
+		reply->err = (rc < 0) ? -rc : rc ;
+
+	put_task_struct(tsk);
+}
+
+static int taskstats_send_pid(struct sk_buff *skb, struct genl_info *info)
+{
+	int rc;
+	struct sk_buff *rep_skb;
+	struct taskstats_reply *reply;
+	struct taskstats_cmd_param *param= info->userhdr;
+
+	if (atomic_read(&taskstats_group_listeners) < 1)
+		return -EINVAL;
+
+	rc = prepare_reply(info, info->genlhdr->cmd, &rep_skb, &reply);
+	if (rc)
+		return rc;
+	fill_pid(reply, param->id.pid, NULL);
+	return send_reply(rep_skb, TASKSTATS_REPLY_PID);
+}
+
+static inline void fill_tgid(struct taskstats_reply *reply, pid_t tgid, struct task_struct *tgidtsk)
+{
+	int rc;
+	struct task_struct *tsk, *first;
+
+	first = tgidtsk;
+	read_lock(&tasklist_lock);
+	if (!first) {
+		first = find_task_by_pid(tgid);
+		if (!first) {
+			read_unlock(&tasklist_lock);
+			reply->err = EINVAL;
+			return;
+		}
+	}
+	tsk = first;
+	do {
+		rc = delayacct_add_tsk(reply, tsk);
+		if (rc)
+			break;
+	} while_each_thread(first, tsk);
+	read_unlock(&tasklist_lock);
+
+	if (!rc) {
+		reply->stats.pid = TASKSTATS_NOPID;
+		reply->stats.tgid = tgid;
+	} else
+		reply->err = (rc < 0) ? -rc : rc ;
+}
+
+static int taskstats_send_tgid(struct sk_buff *skb, struct genl_info *info)
+{
+	int rc;
+	struct sk_buff *rep_skb;
+	struct taskstats_reply *reply;
+	struct taskstats_cmd_param *param= info->userhdr;
+
+	if (atomic_read(&taskstats_group_listeners) < 1)
+		return -EINVAL;
+
+	rc = prepare_reply(info, info->genlhdr->cmd, &rep_skb, &reply);
+	if (rc)
+		return rc;
+	fill_tgid(reply, param->id.tgid, NULL);
+	return send_reply(rep_skb, TASKSTATS_REPLY_TGID);
+}
+
+/* Send pid data out on exit */
+void taskstats_exit_pid(struct task_struct *tsk)
+{
+	int rc;
+	struct sk_buff *rep_skb;
+	struct taskstats_reply *reply;
+
+	if (atomic_read(&taskstats_group_listeners) < 1)
+		return;
+
+	rc = prepare_reply(NULL, TASKSTATS_CMD_NONE, &rep_skb, &reply);
+	if (rc)
+		return;
+	fill_pid(reply, tsk->pid, tsk);
+	rc = send_reply(rep_skb, TASKSTATS_REPLY_EXIT_PID);
+
+	if (rc || thread_group_empty(tsk))
+		return;
+
+	/* Send tgid data too */
+	rc = prepare_reply(NULL, TASKSTATS_CMD_NONE, &rep_skb, &reply);
+	if (rc)
+		return;
+	fill_tgid(reply, tsk->tgid, tsk);
+	send_reply(rep_skb, TASKSTATS_REPLY_EXIT_TGID);
+}
+
+static struct genl_ops listen_ops = {
+	.cmd            = TASKSTATS_CMD_LISTEN,
+	.doit           = taskstats_listen,
+};
+
+static struct genl_ops ignore_ops = {
+	.cmd            = TASKSTATS_CMD_IGNORE,
+	.doit           = taskstats_ignore,
+};
+
+static struct genl_ops pid_ops = {
+	.cmd            = TASKSTATS_CMD_PID,
+	.doit           = taskstats_send_pid,
+};
+
+static struct genl_ops tgid_ops = {
+	.cmd            = TASKSTATS_CMD_TGID,
+	.doit           = taskstats_send_tgid,
+};
+
+static int family_registered = 0;
+
+static int __init taskstats_init(void)
+{
+        if (genl_register_family(&family))
+                return -EFAULT;
+        family_registered = 1;
+
+        if (genl_register_ops(&family, &listen_ops))
+               goto err;
+        if (genl_register_ops(&family, &ignore_ops))
+                goto err;
+        if (genl_register_ops(&family, &pid_ops))
+		goto err;
+        if (genl_register_ops(&family, &tgid_ops))
+                goto err;
+
+        return 0;
+err:
+        genl_unregister_family(&family);
+        family_registered = 0;
+        return -EFAULT;
+}
+
+late_initcall(taskstats_init);
+
Index: linux-2.6.16-rc4/init/Kconfig
===================================================================
--- linux-2.6.16-rc4.orig/init/Kconfig	2006-02-27 01:52:54.000000000 -0500
+++ linux-2.6.16-rc4/init/Kconfig	2006-02-27 01:53:03.000000000 -0500
@@ -158,11 +158,21 @@ config TASK_DELAY_ACCT
 	  in pages. Such statistics can help in setting a task's priorities
 	  relative to other tasks for cpu, io, rss limits etc.
 
-	  Unlike BSD process accounting, this information is available
-	  continuously during the lifetime of a task.
-
 	  Say N if unsure.
 
+config TASKSTATS
+	bool "Export task/process statistics through netlink (EXPERIMENTAL)"
+	depends on TASK_DELAY_ACCT
+	default y
+	help
+	  Export selected statistics for tasks/processes through the
+	  generic netlink interface. Unlike BSD process accounting, the
+	  statistics are available during the lifetime of tasks/processes as
+	  responses to commands. Like BSD accounting, they are sent to user
+	  space on task exit.
+
+	  Say Y if unsure.
+
 config SYSCTL
 	bool "Sysctl support"
 	---help---
Index: linux-2.6.16-rc4/kernel/delayacct.c
===================================================================
--- linux-2.6.16-rc4.orig/kernel/delayacct.c	2006-02-27 01:53:01.000000000 -0500
+++ linux-2.6.16-rc4/kernel/delayacct.c	2006-02-27 01:53:03.000000000 -0500
@@ -17,6 +17,7 @@
 #include <linux/time.h>
 #include <linux/sysctl.h>
 #include <linux/delayacct.h>
+#include <linux/taskstats.h>
 
 int delayacct_on = 0;		/* Delay accounting turned on/off */
 kmem_cache_t *delayacct_cache;
@@ -61,6 +62,7 @@ void __delayacct_tsk_init(struct task_st
 
 void __delayacct_tsk_exit(struct task_struct *tsk)
 {
+ 	taskstats_exit_pid(tsk);
 	task_lock(tsk);
 	if (tsk->delays) {
 		kmem_cache_free(delayacct_cache, tsk->delays);
@@ -209,3 +211,50 @@ int delayacct_sysctl_handler(ctl_table *
 		delayacct_on = prev;
 	return ret;
 }
+
+#ifdef CONFIG_TASKSTATS
+
+int delayacct_add_tsk(struct taskstats_reply *reply, struct task_struct *tsk)
+{
+	struct taskstats *d = &reply->stats;
+	nsec_t tmp;
+	struct timespec ts;
+	unsigned long t1,t2;
+
+	if (!tsk->delays || !delayacct_on)
+		return -EINVAL;
+
+	/* zero XXX_total,non-zero XXX_count implies XXX stat overflowed */
+#ifdef CONFIG_SCHEDSTATS
+
+	tmp = (nsec_t)d->cpu_run_total ;
+	tmp += (u64)(tsk->utime+tsk->stime)*TICK_NSEC;
+	d->cpu_run_total = (tmp < (nsec_t)d->cpu_run_total)? 0:tmp;
+
+	/* No locking available for sched_info. Take snapshot first. */
+	t1 = tsk->sched_info.pcnt;
+	t2 = tsk->sched_info.run_delay;
+
+	d->cpu_count += t1;
+
+	jiffies_to_timespec(t2, &ts);
+	tmp = (nsec_t)d->cpu_delay_total + timespec_to_ns(&ts);
+	d->cpu_delay_total = (tmp < (nsec_t)d->cpu_delay_total)? 0:tmp;
+#else
+	/* Non-zero XXX_total,zero XXX_count implies XXX stat unavailable */
+	d->cpu_count = 0;
+	d->cpu_run_total = d->cpu_delay_total = TASKSTATS_NOCPUSTATS;
+#endif
+	spin_lock(&tsk->delays->lock);
+	tmp = d->blkio_delay_total + tsk->delays->blkio_delay;
+	d->blkio_delay_total = (tmp < d->blkio_delay_total)? 0:tmp;
+	tmp = d->swapin_delay_total + tsk->delays->swapin_delay;
+	d->swapin_delay_total = (tmp < d->swapin_delay_total)? 0:tmp;
+	d->blkio_count += tsk->delays->blkio_count;
+	d->swapin_count += tsk->delays->swapin_count;
+	spin_unlock(&tsk->delays->lock);
+
+	return 0;
+}
+
+#endif /* CONFIG_TASKSTATS */

^ permalink raw reply

* Re: [PATH][RFC] acxsm: Make acx mdoular again
From: Denis Vlasenko @ 2006-02-27 10:20 UTC (permalink / raw)
  To: Carlos Martín; +Cc: netdev, acx100-devel, Christoph Hellwig
In-Reply-To: <200602261710.33923.carlos@cmartin.tk>

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

On Sunday 26 February 2006 18:10, Carlos Martín wrote:
> Hi,
> 
> Well, here it is. I've not been able to run-test it yet, but it at least 
> compiles and loads without problems. This is on x86_64 compiled against 
> Linville's wireless-2.6 git tree. (I don't have any x86 boxes running Linux 
> right now, but it should be alright).
> 
> I've added a struct acx_ops with function pointers and deleted the functions 
> that just call the PCI/USB version depending on what we're using at the 
> moment. A few functions I've just made empty to simplify and not having to 
> check every time wether we do have it or not. These are only called on 
> load/unload and error conditions. Normal operation shouldn't suffer any speed 
> decrease it may be faster at times because we dereference a few pointers 
> instead of calling a couple of functions (just guessing, though).
> 
> The patch is 38K uncompressed. I've compressed and attached it and uploaded to 
> http://www.cmartin.tk/acx/acxsm-modularise.patch
> 
>    text    data     bss     dec     hex filename
>   55491     588       4   56083    db13 acx-common.ko
>   33523    1040       4   34567    8707 acx-pci.ko
>   17109    1008       0   18117    46c5 acx-usb.ko
> 
> Comments are welcome and I'll split the patch if needed.

usb.c
=====
#define BOGUS_SAFETY_PADDING 0x40

int
acxusb_s_issue_cmd_timeo(
        acx_device_t *adev,
        unsigned cmd,
        void *buffer,
        unsigned buflen,
        unsigned timeout)
{
#if ACX_DEBUG
        return acx_s_issue_cmd_timeo_debug(adev, cmd, buffer, buflen, timeout, __stringify(cmd));
#else
        return acx_s_issue_cmd_timeo_debug(adev, cmd, buffer, buflen, timeout);
#endif
}

stringify what? We want symbolic command name, not it's numeric value.
stringifying must occur in .h file.


acx_func.h
==========
#if ACX_DEBUG

/* We want to log cmd names */
int acxpci_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout, const char* cmdstr);
int acxusb_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout, const char* cmdstr);
static inline int
acx_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout, const char* cmdstr)
{
        if (IS_PCI(adev))
                return acxpci_s_issue_cmd_timeo_debug(adev, cmd, param, len, timeout, cmdstr);
        return acxusb_s_issue_cmd_timeo_debug(adev, cmd, param, len, timeout, cmdstr);
}
int acx_s_issue_cmd(acx_device_t *adev, unsigned cmd, void *param, unsigned len);

It will recurse: acx_s_issue_cmd_timeo_debug -> acxusb_s_issue_cmd_timeo_debug -> acx_s_issue_cmd_timeo_debug ->....
Why do you need if (IS_PCI(adev)) at all?

Please apply the attached style fixes on top of your patches.

Patch is not applied. Sorry.
--
vda

[-- Attachment #2: acxsm-modularise2.patch --]
[-- Type: text/x-diff, Size: 2161 bytes --]

diff -urpN current_sm.1/acx_func.h current_sm.2/acx_func.h
--- current_sm.1/acx_func.h	Mon Feb 27 12:13:27 2006
+++ current_sm.2/acx_func.h	Mon Feb 27 12:10:32 2006
@@ -444,7 +444,7 @@ int acx_s_interrogate_debug(acx_device_t
 #else
 
 
-/* We can't make this a #define or inline because we need to referece it. */
+/* We can't make this a #define or inline because we need to reference it. */
 int acx_s_issue_cmd(acx_device_t *adev, unsigned cmd, void *param, unsigned len);
 
 int acxpci_s_issue_cmd_timeo(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout);
diff -urpN current_sm.1/common.c current_sm.2/common.c
--- current_sm.1/common.c	Mon Feb 27 12:13:28 2006
+++ current_sm.2/common.c	Mon Feb 27 12:06:33 2006
@@ -331,10 +331,11 @@ acx_log_fn_exit_v(const char *funcname, 
 EXPORT_SYMBOL_GPL(acx_log_fn_exit_v);
 #endif /* ACX_DEBUG > 1 */
 
-int acx_s_issue_cmd(acx_device_t *adev, unsigned cmd, void *param, unsigned len)
+int
+acx_s_issue_cmd(acx_device_t *adev, unsigned cmd, void *param, unsigned len)
 {
-  return adev->ops.issue_cmd_timeo(adev, cmd, param, len,
-				   ACX_CMD_TIMEOUT_DEFAULT);
+	return adev->ops.issue_cmd_timeo(adev, cmd, param, len,
+				ACX_CMD_TIMEOUT_DEFAULT);
 }
 
 EXPORT_SYMBOL_GPL(acx_s_issue_cmd);
@@ -1940,7 +1941,7 @@ acx_s_scan_chan(acx_device_t *adev)
 	FN_EXIT0;
 }
 
- EXPORT_SYMBOL_GPL(acx_s_scan_chan);
+EXPORT_SYMBOL_GPL(acx_s_scan_chan);
 
 void
 acx_s_cmd_start_scan(acx_device_t *adev)
@@ -2059,7 +2060,7 @@ acx111_s_feature_set(acx_device_t *adev,
 /***********************************************************************
 ** acx100_s_init_memory_pools
 */
-int
+static int
 acx100_s_init_memory_pools(acx_device_t *adev, const acx_ie_memmap_t *mmt)
 {
 	acx100_ie_memblocksize_t MemoryBlockSize;
diff -urpN current_sm.1/pci.c current_sm.2/pci.c
--- current_sm.1/pci.c	Mon Feb 27 12:13:28 2006
+++ current_sm.2/pci.c	Mon Feb 27 12:08:30 2006
@@ -3089,7 +3089,11 @@ end:
 	return (tx_t*)txdesc;
 }
 
-void acxpci_l_dealloc_tx(tx_t *tx_opaque){}
+void
+acxpci_l_dealloc_tx(tx_t *tx_opaque)
+{
+}
+
 
 /***********************************************************************
 */

^ permalink raw reply

* Re: [PATH][RFC] acxsm: Make acx mdoular again
From: Carlos Martín @ 2006-02-27 10:44 UTC (permalink / raw)
  To: Denis Vlasenko; +Cc: netdev, acx100-devel, Christoph Hellwig
In-Reply-To: <200602271220.14853.vda@ilport.com.ua>

On Monday 27 February 2006 11:20, Denis Vlasenko wrote:
> > Comments are welcome and I'll split the patch if needed.
> 
> usb.c
> =====
> #define BOGUS_SAFETY_PADDING 0x40
> 
> int
> acxusb_s_issue_cmd_timeo(
>         acx_device_t *adev,
>         unsigned cmd,
>         void *buffer,
>         unsigned buflen,
>         unsigned timeout)
> {
> #if ACX_DEBUG
>         return acx_s_issue_cmd_timeo_debug(adev, cmd, buffer, buflen, 
timeout, __stringify(cmd));
> #else
>         return acx_s_issue_cmd_timeo_debug(adev, cmd, buffer, buflen, 
timeout);
> #endif
> }
> 
> stringify what? We want symbolic command name, not it's numeric value.
> stringifying must occur in .h file.

Missed that. The problem is that right now we need to reference the function. 
There's no real need for it, so I'll change it.

> 
> 
> acx_func.h
> ==========
> #if ACX_DEBUG
> 
> /* We want to log cmd names */
> int acxpci_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void 
*param, unsigned len, unsigned timeout, const char* cmdstr);
> int acxusb_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void 
*param, unsigned len, unsigned timeout, const char* cmdstr);
> static inline int
> acx_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void *param, 
unsigned len, unsigned timeout, const char* cmdstr)
> {
>         if (IS_PCI(adev))
>                 return acxpci_s_issue_cmd_timeo_debug(adev, cmd, param, len, 
timeout, cmdstr);
>         return acxusb_s_issue_cmd_timeo_debug(adev, cmd, param, len, 
timeout, cmdstr);
> }
> int acx_s_issue_cmd(acx_device_t *adev, unsigned cmd, void *param, unsigned 
len);
> 
> It will recurse: acx_s_issue_cmd_timeo_debug -> 
acxusb_s_issue_cmd_timeo_debug -> acx_s_issue_cmd_timeo_debug ->....

I forgot to remove that function. In acxusb_s_issue_timeo, it should call 
acxusb_s_issue_cmd_timeo_{debug,nodebug}, not the generic function.

> Why do you need if (IS_PCI(adev)) at all?
> 
> Please apply the attached style fixes on top of your patches.

Will do.

   cmn
-- 
Carlos Martín Nieto    |   http://www.cmartin.tk
Hobbyist programmer    |


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x110944&bid$1720&dat\x121642

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox