Modify

Opened 7 years ago

Closed 7 years ago

#8601 closed defect (fixed)

Trying ath5k on a Fonera (AR2315) ends in kernel failure

Reported by: duvi Owned by: developers
Priority: normal Milestone: Backfire 10.03.1
Component: packages Version: Trunk
Keywords: ath5k ar2315 Cc:

Description

Revision 24920, fresh build, ATHEROS_AR2315_PCI disabled through "make kernel_menuconfig".
I know ath5k wisoc support is brand new, but maybe this helps development.

Here's the console output:

Compat-wireless backport release: compat-wireless-2010-12-10-3-g880bb0b

Backport based on wireless-testing.git master-2010-12-16

cfg80211: Calling CRDA to update world regulatory domain

cfg80211: World regulatory domain updated:

cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)

cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)

cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)

cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

Data bus error, epc == 803cc828, ra == 803cce0c

Oops[#1]:

Cpu 0

$ 0 : 00000000 10009c00 c02a8004 00000003

$ 4 : 802ec000 00000002 00000001 00000000

$ 8 : c02a0000 800454f0 80d85b98 80d85c40

$12 : 00000040 80809a10 ffffffff 00000000

$16 : 00000000 802ec000 802ec000 00000000

$20 : 00000001 c02a0000 00407ec4 80e58d00

$24 : 00000000 803d5a5c

$28 : 80d84000 80d85cb8 7fb84608 803cce0c

Hi : 00000000

Lo : 0000238c

epc : 803cc828 0x803cc828

Not tainted

ra : 803cce0c 0x803cce0c

Status: 10009c03 KERNEL EXL IE

Cause : 0080041c

PrId : 00019064 (MIPS 4KEc)

Modules linked in: ath5k(+) ath mac80211 cfg80211 compat_firmware_class compat a rc4 aes_generic deflate ecb cbc

Process insmod (pid: 394, threadinfo=80d84000, task=80e56a98, tls=00000000)

Stack : 00000000 00000000 802719d4 ffffffa7 00000000 802ec000 00000086 00000000

00000001 c02a0000 00407ec4 803cce0c 80d85c20 80e1bc80 fffffff4 802719d4

802ec000 00000000 00000086 80e58d00 00000000 803ce448 7fb84608 80151920

00000003 00000002 803dc250 8026db70 802ec000 00000002 803dc250 8026db70

80e58200 803d2200 ffffffff 803b11e3 ffffffff 0000000a 803dce08 80e58d00

...

Call Trace:[<803cce0c>] 0x803cce0c

[<803ce448>] 0x803ce448

[<80151920>] 0x80151920

[<803d2200>] 0x803d2200

[<801500f4>] 0x801500f4

[<803d5c00>] 0x803d5c00

[<8017f5b8>] 0x8017f5b8

[<8017f76c>] 0x8017f76c

[<801492b4>] 0x801492b4

[<8017f8e0>] 0x8017f8e0

[<80149990>] 0x80149990

[<8017f874>] 0x8017f874

[<8017ee70>] 0x8017ee70

[<80149a20>] 0x80149a20

[<800b50a8>] 0x800b50a8

[<8017e5ec>] 0x8017e5ec

[<8008b088>] 0x8008b088

[<803de000>] 0x803de000

[<8017fc90>] 0x8017fc90

[<803de000>] 0x803de000

[<800490d0>] 0x800490d0

[<8007abb0>] 0x8007abb0

[<8008b770>] 0x8008b770

[<800ba5f4>] 0x800ba5f4

[<80043610>] 0x80043610


Code: 34028004 01021021 00809021 <8c440000> 24020002 30c600ff 10a20029 30e7ffff 2ca20003

Disabling lock debugging due to kernel taint

AHB fatal error

Attachments (4)

260-pci-dma.patch (1.4 KB) - added by jhansen@… 7 years ago.
package/mac80211/patches/260-pci-dma.patch
452-ath5k-2315-noremap.patch (553 bytes) - added by jhansen@… 7 years ago.
package/mac80211/patches/452-ath5k-2315-noremap.patch
250-wmac_macaddr_fixup.patch (856 bytes) - added by jhansen@… 7 years ago.
target/linux/atheros/patches-2.6.37/250-wmac_macaddr_fixup.patch
260-pci-dma.2.patch (1.4 KB) - added by jhansen@… 7 years ago.
target/linux/atheros/patches-2.6.37/260-pci-dma.patch

Download all attachments as: .zip

Change History (12)

comment:1 Changed 7 years ago by wojtek

The problem is in dma mapping code which still assumes pci is enabled when it's not. Just remove platform specific dma-coherence.h file and it should solve the problem. Otherwise ahb is trying to access pci address space and you get fatal error. Though it seems to work on devices which don't have PCI module at all even with bad mapping.

I will post a patch once I have it cleaned up.

comment:2 Changed 7 years ago by jhansen@…

The following attached patches helped me get wireless working (at least STA and AP so far) on an OpenMesh Device (Accton MR3201a). Hopefully they're mainlinable enough to get committed soon.

The pci-dma patch (place in package/mac80211/patches) is self-explanatory enough: it deals with this bug's issue directly and allows AHB wisoc device drivers to map buffers into the right place.

The wmac_maccaddr_fixup patch (place in target/linux/atheros/patches-2.6.37) was necessary on my OpenMesh device because the MAC address was not in the radio config section (it was all 0xFFs), but it was in the board config section (and no, the ordering is not a typo).

The ath5k-2315-noremap patch (place in target/linux/atheros/patches-2.6.37) was necessary because accessing ioremap'ed 0xb0000000 lead to AHB bus errors. Accessing 0xb0000000 directly (at least on these OpenMesh devices) works perfectly.

Changed 7 years ago by jhansen@…

package/mac80211/patches/260-pci-dma.patch

Changed 7 years ago by jhansen@…

package/mac80211/patches/452-ath5k-2315-noremap.patch

Changed 7 years ago by jhansen@…

target/linux/atheros/patches-2.6.37/250-wmac_macaddr_fixup.patch

Changed 7 years ago by jhansen@…

target/linux/atheros/patches-2.6.37/260-pci-dma.patch

comment:3 Changed 7 years ago by anonymous

I just tried theses patches with current trunk (r26387) on an Accton MR3201A and I got this error:

ath5k phy0: unable to read address from EEPROM
ar231x-wmac ar231x-wmac.0: failed to attach device, err=-22

comment:4 Changed 7 years ago by jhansen@…

anonymous: Can you upload your complete board data + calibration partition (should be one of your mtd partitions)? It seems that the MAC address can be in different spots on some units. On my units here, I've found the MAC address at offset 0x60 in the board data MTD partition.

If you don't know where to find this, post the output of "cat /proc/mtd" and I'll give you some commands to run.

comment:5 Changed 7 years ago by anonymous

The MAC address seems to be also at 0x60 on my unit (followed by the ethernet MAC address)

It it could help you, here are some data :

root@OpenWrt:/# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00030000 00010000 "RedBoot"
mtd1: 006d0000 00010000 "rootfs"
mtd2: 00440000 00010000 "rootfs_data"
mtd3: 000e0000 00010000 "vmlinux.bin.l7"
mtd4: 0000f000 0000f000 "FIS directory"
mtd5: 00001000 00001000 "RedBoot config"
mtd6: 00010000 00010000 "boardconfig"
root@OpenWrt:/# hexdump /dev/mtdblock6 
0000000 3533 3131 5968 0005 4d52 3332 3031 412d
0000010 464c 462d 3338 4e51 00ff ffff ffff ffff
0000020 ffff ffff ffff ffff ffff ffff ffff ffff
*
0000040 ffff ffff ffff ffff 0001 0000 ffd1 43fd
0000050 0006 0002 0af7 9e00 057b cf00 0000 0000
0000060 0012 cf80 5e15 0012 cf80 5e14 ffff ffff
0000070 ffff 0013 ffff ffff ffff ffff ffff ffff
0000080 ffff ffff ffff ffff 2020 2020 2020 2020
0000090 2020 00ff ffff ffff ffff ffff ffff ffff
00000a0 ffff ffff ffff ffff ffff ffff ffff ffff
*
00000f0 ffff ffff ffff ffff 0013 1404 0200 0000
0000100 0000 5001 0000 a052 168c 1c0a 0100 0000
0000110 01c2 0002 c606 0001 0000 0000 0000 0000
0000120 0000 0000 0000 0000 0000 0000 0000 0000
0000130 0000 ffff ffff ffff 0000 0000 0000 0000
0000140 0000 0000 0000 0000 0000 0000 0000 0000
*
0000170 0000 5aa5 0000 0000 0313 4943 2053 7104
0000180 1202 0400 0306 0001 0000 0500 410e 39b1
0000190 1eb5 4e2d 3056 ffff e902 0700 0106 0000
00001a0 0100 1500 0752 4101 6874 7265 736f 4320
00001b0 6d6f 756d 696e 6163 6974 6e6f 2c73 4920
00001c0 636e 002e 5241 3035 3130 302d 3030 2d30
00001d0 3030 3030 5700 7269 6c65 7365 2073 414c
00001e0 204e 6552 6566 6572 636e 2065 6143 6472
00001f0 3000 0030 00ff 2100 0602 0200 0205 0000
0000200 005b 0522 4002 8954 2200 0205 1b00 00b7
0000210 0522 8002 12a8 2201 0205 3600 016e 0522
0000220 0002 2551 2202 0205 6c00 02dc 0522 8002
0000230 37f9 2203 0205 a200 044a 0222 0803 0822
0000240 0604 ffff ffff ffff 0222 0105 00ff 0000
0000250 0000 0000 0000 0000 ffff ffff ffff ffff
0000260 ffff ffff ffff ffff ffff ffff ffff ffff
0000270 ffff ffff ffff 0000 11bb 5003 226e 0001
0000280 81c4 016a 01ff dcff 15a3 0005 0000 0000
0000290 0000 0000 0000 0000 0000 0000 0000 0000
00002a0 2d2c 0000 0000 0000 0000 e028 a492 1c00
00002b0 000e b8ca 0013 0000 08f8 6b4b c059 1571
00002c0 0000 0000 0000 0000 0000 0000 0000 0000
00002d0 0000 0000 0000 0000 0000 0000 2370 00a5
00002e0 9618 419a 68a2 da35 001c 0007 b0ff 0195
00002f0 0000 0000 ff8e 19ff 0000 0000 0000 0000
0000300 0000 0000 0000 0000 0000 0000 0000 0000
0000310 0000 3170 00a5 9618 419a 68a2 da35 001c
0000320 000e b0ff 2195 0000 2fd8 ff8e 1222 19ff
0000330 0080 6201 032e 0587 0000 0000 0000 0000
0000340 0000 0000 0000 0000 1112 1441 4231 3234
0000350 0000 0000 0000 0000 0000 0000 0000 0000
0000360 0000 0000 0000 0000 8000 0000 0000 0000
0000370 0000 0668 04b0 8000 0000 0000 0000 0000
0000380 0000 0000 0000 0000 0000 0000 0000 0000
0000390 0000 0000 0000 0000 4d31 7f54 3c93 1205
00003a0 1931 492d 7f50 3c93 0e01 192d 008e 0000
00003b0 90e0 624a ab39 3206 dd58 1337 008e 0000
00003c0 8080 5249 aa99 3605 58f7 0f47 0000 0000
00003d0 0000 0000 0000 0000 0000 0000 0000 0000
00003e0 0000 0000 0000 0000 0000 0000 7092 4924
00003f0 b892 4924 7092 281e 8992 281e ac92 281e
0000400 7075 898e 9da2 0000 2626 6464 2222 0000
0000410 7075 898e 9da2 0000 1e1e 6363 1e1c 0000
0000420 8989 0000 0000 0000 2323 0000 0000 0000
0000430 7075 a2ac b800 0000 2666 2626 2400 0000
0000440 7075 a2ac 0000 0000 2464 2424 0000 0000
0000450 7075 898e a7ac 0000 2222 6060 1e1e 0000
0000460 7075 898e a7ac 0000 2222 6060 2020 0000
0000470 8989 0000 0000 0000 2020 0000 0000 0000
0000480 0000 0000 0000 0000 0000 0000 0000 0000
*
00004f0 0000 0000 0000 0000 ffff ffff ffff ffff
0000500 ffff ffff ffff ffff ffff ffff ffff ffff
*
0010000

comment:6 Changed 7 years ago by jhansen@…

anonymous: Are you sure you installed all three patches, esp. including 250-wmac_macaddr_fixup.patch? Does your kernel print out "Radio MAC is blank; using board data" as it should?

comment:7 Changed 7 years ago by anonymous

Ooops sorry I didn't properly applied this patch! (didn't clean before compile...)
This seems to work, good job!

comment:8 Changed 7 years ago by nbd

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

Issues fixed in r26554, r26555

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.