linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* RE: FCC Ethernet startup crash
@ 2005-04-05 16:41 Rune Torgersen
  2005-04-05 16:56 ` Dan Malek
  0 siblings, 1 reply; 10+ messages in thread
From: Rune Torgersen @ 2005-04-05 16:41 UTC (permalink / raw)
  To: Stefan Nickl; +Cc: linuxppc-embedded

Thanks....

That whole patch works beautifully.
Had to apply the whole thing (so fcc_restart gets called in the start,
and end of fcc_open) for it to work.

Without calling fcc_restart in the start, I get lots of "eth0: tx queue
full!." messages.

> -----Original Message-----
> From: Stefan Nickl [mailto:Stefan.Nickl@kontron.com]=20
> Sent: Tuesday, April 05, 2005 10:57
> To: Rune Torgersen
> Cc: linuxppc-embedded
> Subject: Re: FCC Ethernet startup crash
>=20
> On Tue, 2005-04-05 at 10:37 -0500, Rune Torgersen wrote:
> > I've been running into the old problem of the kernel ip=20
> stack crasheing
> > the kernel, because of early packets again.
> >=20
> > This has been mentioned on this list several times before, but the
> > worarounds that used to work doesn't seem to work anymore.
> > (like changing the order of things in ip_init())
> >=20
> > As far as I can tell, it is because the FCC enet drivers starts to
> > receive packets way before the ip stack is initialized.
> >=20
> > Does anybody have any good ideas on how to fix this?
>=20
> Maybe you want to try my version:
>=20
> http://ozlabs.org/ppc32-patches/patch.pl?id=3D14
>=20
> Or is it equal to your (no longer working) solution?
>=20
> --=20
> Stefan Nickl
> Kontron Modular Computers
>=20
>=20
>=20
>=20

^ permalink raw reply	[flat|nested] 10+ messages in thread
* RE: FCC Ethernet startup crash
@ 2005-04-08 14:39 Rune Torgersen
  0 siblings, 0 replies; 10+ messages in thread
From: Rune Torgersen @ 2005-04-08 14:39 UTC (permalink / raw)
  To: Stefan Nickl, Tom Rini; +Cc: linuxppc-embedded

I'm not sure what is going on, but that patch causes me to get "eth0: tx
queue full!." messages as soon as I try to use the ethernet
(Same thing happened if I just tried to remove the fcc_restart from
init_fcc_startup)

> -----Original Message-----
> From: Stefan Nickl [mailto:Stefan.Nickl@kontron.com]=20
> Sent: Friday, April 08, 2005 05:49
> To: Tom Rini
> Cc: Rune Torgersen; linuxppc-embedded
> Subject: Re: FCC Ethernet startup crash
>=20
> On Thu, 2005-04-07 at 09:36 -0700, Tom Rini wrote:
> > > The patch Stefan Nickl gave to me works perfectly, and=20
> all it does is
> > > basically move the fcc_restart.
> > > The kernel was still calling fcc_restart twiche per FCC=20
> at startup (one
> > > time on init_fcc_startup, and then again in fcc_open),=20
> now it just calls
> > > it twice in fcc_open. Seems to work.
> >=20
> > Would someone please post what's needed vs current'ish 2.6=20
> so we can get
> > the proper fix up & in? :)  With the Signed-off-by & all=20
> that.. Thanks.
>=20
> I took a little longer because I was not happy with the simple
> cut'n'paste version. I believe the actual problem is that=20
> fcc_restart()
> mustn't be called before netif_start_queue(). So the original version
> only shortens the race period, it does not actually resolve it.
>=20
> Unfortunately I'm deprived of suitable hardware as the focus=20
> of my work
> has shifted in the last months, so I urge everyone out there=20
> to give it
> a try.
>=20
> Signed-off-by: Stefan Nickl <Stefan.Nickl@kontron.com>
>=20
> --=20
> Stefan Nickl
> Kontron Modular Computers
>=20
>=20

^ permalink raw reply	[flat|nested] 10+ messages in thread
* RE: FCC Ethernet startup crash
@ 2005-04-05 16:27 Rune Torgersen
  0 siblings, 0 replies; 10+ messages in thread
From: Rune Torgersen @ 2005-04-05 16:27 UTC (permalink / raw)
  To: Stefan Nickl; +Cc: linuxppc-embedded

Ahhh....
I see what happened....
Basically only the last part of that patch has been applied to the 2.6
kernels..

fcc_restart gets called both in init_fcc_startup *and* fcc_open.
=20
I'll try to remove the fcc_restart in init_fcc_startup, and see what
happens.


> -----Original Message-----
> From: Stefan Nickl [mailto:Stefan.Nickl@kontron.com]=20
> Sent: Tuesday, April 05, 2005 10:57
> To: Rune Torgersen
> Cc: linuxppc-embedded
> Subject: Re: FCC Ethernet startup crash
>=20
> On Tue, 2005-04-05 at 10:37 -0500, Rune Torgersen wrote:
> > I've been running into the old problem of the kernel ip=20
> stack crasheing
> > the kernel, because of early packets again.
> >=20
> > This has been mentioned on this list several times before, but the
> > worarounds that used to work doesn't seem to work anymore.
> > (like changing the order of things in ip_init())
> >=20
> > As far as I can tell, it is because the FCC enet drivers starts to
> > receive packets way before the ip stack is initialized.
> >=20
> > Does anybody have any good ideas on how to fix this?
>=20
> Maybe you want to try my version:
>=20
> http://ozlabs.org/ppc32-patches/patch.pl?id=3D14
>=20
> Or is it equal to your (no longer working) solution?
>=20
> --=20
> Stefan Nickl
> Kontron Modular Computers
>=20
>=20
>=20
>=20

^ permalink raw reply	[flat|nested] 10+ messages in thread
* FCC Ethernet startup crash
@ 2005-04-05 15:37 Rune Torgersen
  2005-04-05 15:56 ` Stefan Nickl
  0 siblings, 1 reply; 10+ messages in thread
From: Rune Torgersen @ 2005-04-05 15:37 UTC (permalink / raw)
  To: linuxppc-embedded

I've been running into the old problem of the kernel ip stack crasheing
the kernel, because of early packets again.

This has been mentioned on this list several times before, but the
worarounds that used to work doesn't seem to work anymore.
(like changing the order of things in ip_init())

As far as I can tell, it is because the FCC enet drivers starts to
receive packets way before the ip stack is initialized.

Does anybody have any good ideas on how to fix this?

Kernel: 2.6.12-rc2 on a MPC8265
I can almost reliably recreate this by flood-pinging the board while the
kernel is booting.


The crach is as follows:
eth0: FCC ENET Version 0.3, 00:30:d7:00:01:08
eth1: FCC ENET Version 0.3, 00:30:d7:00:01:09
NET: Registered protocol family 2
IP: routing cache hash table of 4096 buckets, 32Kbytes
Oops: kernel access of bad area, sig: 11 [#1]
PREEMPT
NIP: A0141440 LR: A012ACA0 SP: AFFB1D80 REGS: affb1cd0 TRAP: 0300    Not
tainted
MSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DAR: 00000004, DSISR: 20000000
TASK =3D afde5ae0[1] 'swapper' THREAD: affb0000
Last syscall: 120
GPR00: 00000000 AFFB1D80 AFDE5AE0 A07069E0 AFF44000 A01E2C04 00001032
00000002
GPR08: A01E2C04 A0200000 AFFB0000 00000000 8010C082 000000B1 10000000
007FFF1E
GPR16: 00000000 00000001 007FFF00 0FFFA6F0 00000000 FFFFFFFF 00000003
0FFA0BD0
GPR24: 00000000 FFFB72C3 A01E1324 00000040 AFFB1DF8 A07069E0 A07069E0
A07069E0
Call trace: [a012aca0]  [a012ae58]  [a012afd8]  [a001b30c]  [a001b374]
[a001b464]  [a0005a60]  [a000480c]  [a01fcfcc]  [a01fd2bc]
[a01fddd0]  [a01ec718]  [a01ec7d8]  [a0003a20]  [a0006b44]
Kernel panic - not syncing: Aiee, killing interrupt handler!
 <0>Rebooting in 180 seconds..

Call trace:
$ call2sym
Ready for call trace list.  <ctrl-d> on a blank line when done.

[A0141440] [a012aca0]  [a012ae58]  [a012afd8]  [a001b30c]  [a001b374]
[a001b464]  [a0005a60]  [a000480c]  [a01fcfcc]  [a01fd2bc]
[a01fddd0]  [a01ec718]  [a01ec7d8]  [a0003a20]  [a0006b44]

Processing...

Address         Function

A0141440        ip_rcv
a012aca0        netif_receive_skb
a012ae58        process_backlog
a012afd8        net_rx_action
a001b30c        __do_softirq
a001b374        do_softirq
a001b464        irq_exit
a0005a60        do_IRQ
a000480c        ret_from_except
a01fcfcc        ip_rt_init
a01fd2bc        ip_init
a01ec718        do_initcalls
a01ec7d8        do_basic_setup
a0003a20        init
a0006b44        kernel_thread
[runet@pib linux-innsys]$

Gdb list of excact line=20

(gdb) list *0xA0141440
0xa0141440 is in ip_rcv (net/ipv4/ip_input.c:370).
365              * that it receives, do not try to analyse it.
366              */
367             if (skb->pkt_type =3D=3D PACKET_OTHERHOST)
368                     goto drop;
369
370             IP_INC_STATS_BH(IPSTATS_MIB_INRECEIVES);
371
372             if ((skb =3D skb_share_check(skb, GFP_ATOMIC)) =3D=3D =
NULL) {
373                     IP_INC_STATS_BH(IPSTATS_MIB_INDISCARDS);
374                     goto out;

Rune Torgersen
System Developer
Innovative Systems LLC
1000 Innovative Drive
Mitchell, SD 57301
Ph: 605-995-6120
www.innovsys.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-04-08 14:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-05 16:41 FCC Ethernet startup crash Rune Torgersen
2005-04-05 16:56 ` Dan Malek
2005-04-05 18:53   ` Rune Torgersen
2005-04-06  6:03     ` Pantelis Antoniou
2005-04-07 16:36     ` Tom Rini
2005-04-08 10:49       ` Stefan Nickl
  -- strict thread matches above, loose matches on Subject: below --
2005-04-08 14:39 Rune Torgersen
2005-04-05 16:27 Rune Torgersen
2005-04-05 15:37 Rune Torgersen
2005-04-05 15:56 ` Stefan Nickl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).