Modify

Opened 11 years ago

Closed 11 years ago

#1855 closed defect (fixed)

adm5120-2.6: kernel panic on Edimax router (BR-6104k)

Reported by: floe@… Owned by: florian
Priority: high Milestone: Kamikaze 8.09 RC1
Component: kernel Version:
Keywords: adm5120 kernel panic edimax Cc:

Description

Actually, there are two different kinds of kernel panic.

The first one happens with a fresh build, after flashing openwrt-adm5120-2.6-squashfs-br-6104k.bin:

Linux version 2.6.21.1 (echtler@butterbrot) (gcc version 4.1.2) #1 Sun May 27 18:18:18 CEST 2007
ADM5120P revision 8, running at 175MHz
Boot loader is: Unknown
Booted from   : NOR flash
Board is      : Unknown ADM5120 board
GETENV: envname is memsize
GETENV: returning 0x001000000
CPU revision is: 0001800b
ADM5120 board setup
Determined physical RAM map:
 memory: 00d34000 @ 002cc000 (usable)
Wasting 22912 bytes for tracking 716 unused pages
Initrd not found or empty - disabling initrd
Built 1 zonelists.  Total pages: 4064
Kernel command line: console=ttyS0,115200 rootfs=jffs2,squashfs init=/etc/preinit
Primary instruction cache 8kB, physically tagged, 2-way, linesize 16 bytes.
Primary data cache 8kB, 2-way, linesize 16 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
PID hash table entries: 64 (order: 6, 256 bytes)
start_kernel(): bug: interrupts were enabled early
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 13372k/13520k available (2278k kernel code, 148k reserved, 345k data, 124k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
adm5120: system has no PCI BIOS
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
squashfs: version 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  (C) 2001-2006 Red Hat, Inc.
yaffs May 27 2007 17:54:30 Installing. 
io scheduler noop registered
io scheduler deadline registered (default)
Registered led device: adm5120:led
ttyS0 at I/O 0x12600000 (irq = 1) is a ADM5120
ttyS1 at I/O 0x12800000 (irq = 2) is a ADM5120
eth0: ADM5120 switch port0
eth1: ADM5120 switch port1
eth2: ADM5120 switch port2
eth3: ADM5120 switch port3
eth4: ADM5120 switch port4
adm5120 : flash init : 0x1fc00000 0x00400000
adm5120 physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit bank
Data bus error, epc == 8015c390, ra == 8015c35c
Oops[#1]:
Cpu 0
$ 0   : 00000000 10008400 bfe00020 00000002
$ 4   : 00200000 20ff2001 00200020 00000002
$ 8   : 00000002 80cf6a01 ffffffff 802c0000
$12   : 802c0000 8030fd42 802b8d04 00000000
$16   : 80285470 00200020 8030fe58 00200000
$20   : 8030fed8 80cf6a00 00000000 80285470
$24   : 00000000 80246204                  
$28   : 8030e000 8030fe10 00000000 8015c35c
Hi    : 00000000
Lo    : 00000001
epc   : 8015c390     Not tainted
ra    : 8015c35c Status: 10008403    KERNEL EXL IE 
Cause : 2080001c
PrId  : 0001800b
Modules linked in:
Process swapper (pid: 1, threadinfo=8030e000, task=8030cbe8)
Stack : 10008401 8030fe90 30303030 31663430 00000020 80285470 00000002 80156334
        8030fe90 00000000 00000000 00000000 00000051 00000052 80ccb22c 00000051
        00000052 00000059 8030fed8 800227cc 00000059 802b8928 00000002 00000004
        00200000 80285470 80156654 80156644 00000010 80260358 00000001 00000010
        00000000 00000010 00000004 00000001 00000001 8005a724 00000002 00000004
        ...
Call Trace:[<80156334>][<800227cc>][<80156654>][<80156644>][<8005a724>][<8015bf5c>][<80022748>][<80156154>][<800227cc>][<80004888>][<802a7d5c>][<80154df0>][]

Code: 24020004  8e02000c  00511021 <94420000> 080570ec  3050ffff  14620004  00000000  8e02000c 
Kernel panic - not syncing: Attempted to kill init!

After a bit of debugging, I've traced the problem to the following code in drivers/mtd/chips/gen_probe.c, line 131:

for (i = 1; i < max_chips; i++) {
  cp->probe_chip(map, i << cfi.chipshift, chip_map, &cfi);
}

The actual bus error happens a bit farther down the call stack, in drivers/mtd/chips/cfi_probe.c, line 85:

val[0] = map_read(map, base + osf*0x10);

When I remove the block in gen_probe.c, the bus error doesn't happen anymore, but another
kernel panic occurs:

LZMA loader for ADM5120, Copyright (C) 2007 OpenWrt.org

Looking for TRX header... found at 0xBFC20000, kernel in partition 0
decompressing kernel... done!
launching kernel...

Linux version 2.6.21.1 (echtler@butterbrot) (gcc version 4.1.2) #8 Fri Jun 8 23:31:06 CEST 2007
ADM5120P revision 8, running at 175MHz
Boot loader is: Unknown
Booted from   : NOR flash
Board is      : Unknown ADM5120 board
GETENV: envname is memsize
GETENV: returning 0x001000000
CPU revision is: 0001800b
ADM5120 board setup
Determined physical RAM map:
 memory: 00d30000 @ 002d0000 (usable)
Wasting 23040 bytes for tracking 720 unused pages
Initrd not found or empty - disabling initrd
Built 1 zonelists.  Total pages: 4064
Kernel command line: console=ttyS0,115200 rootfs=jffs2,squashfs init=/etc/preinit
Primary instruction cache 8kB, physically tagged, 2-way, linesize 16 bytes.
Primary data cache 8kB, 2-way, linesize 16 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
PID hash table entries: 64 (order: 6, 256 bytes)
Using 87.500 MHz high precision timer.
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 13356k/13504k available (2286k kernel code, 148k reserved, 353k data, 124k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
adm5120: system has no PCI BIOS
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Time: MIPS clocksource has been installed.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
squashfs: version 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  (C) 2001-2006 Red Hat, Inc.
yaffs Jun  8 2007 23:28:11 Installing. 
io scheduler noop registered
io scheduler deadline registered (default)
Registered led device: adm5120:led
ttyS0 at I/O 0x12600000 (irq = 9) is a ADM5120
ttyS1 at I/O 0x12800000 (irq = 10) is a ADM5120
eth0: ADM5120 switch port0
eth1: ADM5120 switch port1
eth2: ADM5120 switch port2
eth3: ADM5120 switch port3
eth4: ADM5120 switch port4
adm5120 : flash init : 0x1fc00000 0x00400000
adm5120 physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Flash device: 0x200000 at 0x1fc00000
adm5120 : using CFE flash mapping
bootloader size: 131072
Updating TRX offsets and length:
old trx = [0x0000001c, 0x000cf400, 0x00000000], len=0x00148000 crc32=0x32144e9b
new trx = [0x0000001c, 0x000cf400, 0x00000000], len=0x000cf400 crc32=0x51a8aa1c
Done
Creating 4 MTD partitions on "adm5120 physically mapped flash":
0x00000000-0x00020000 : "cfe"
mtd: Giving out device 0 to cfe
0x00020000-0x001f0000 : "linux"
mtd: Giving out device 1 to linux
0x000ef400-0x001f0000 : "rootfs"
mtd: partition "rootfs" doesn't start on an erase block boundary -- force read-only
mtd: Giving out device 2 to rootfs
0x00170000-0x001f0000 : "rootfs_data"
mtd: Giving out device 3 to rootfs_data
0x001f0000-0x00200000 : "nvram"
mtd: Giving out device 4 to nvram
block2mtd: version $Revision: 1.30 $
RB1xx nand
No NAND device found!!!
No NAND device found!!!
No NAND device found!!!
No NAND device found!!!
RB1xxx nand device not found
nf_conntrack version 0.5.0 (105 buckets, 840 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP vegas registered
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 15
Bridge firewalling registered
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
mtdblock_open
ok
VFS: Mounted root (squashfs filesystem) readonly.
Freeing unused kernel memory: 124k freed
Warning: unable to open an initial console.
Kernel panic - not syncing: Attempted to kill init!

Attachments (0)

Change History (8)

comment:1 Changed 11 years ago by florian

  • Owner changed from developers to florian
  • Status changed from new to assigned

This changeset should help : [7457]

comment:2 Changed 11 years ago by florian

This device also probably uses the A20 GPIO pin to extend the flash.

comment:3 Changed 11 years ago by floe@…

Hm, these devices only have 2 MB flash, so AFAIK they don't need the A20 pin.
Are you sure about changeset 7457? It's got something to do with AODV, I don't see the connection here..

Also, please have a look here: http://forum.openwrt.org/viewtopic.php?pid=50804#p50804
I have summarized the changes needed to get the Edimax to run, but I'm quite sure they would break a lot of other things..

comment:4 Changed 11 years ago by berny156 AT gmx.de

Florian's fix is still necessary with rev. 7840 and kernel 2.6.22-rc6.

comment:5 Changed 11 years ago by florian

Can you both try a new kernel ? juhosg did quite some change that should help recognizing br6104-k devices.

comment:6 Changed 11 years ago by florian

  • Milestone changed from Kamikaze to Afterburner 7.09

comment:7 Changed 11 years ago by berny156 AT gmx.de

Works for me!! (rev. 8283)

comment:8 Changed 11 years ago by florian

  • Resolution set to fixed
  • Status changed from assigned to closed

Great, thanks for testing.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.