Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Ticket #1570 (new defect)

Opened 14 years ago

Last modified 14 years ago

Compilation error: io{read,write}32 not defined (IXP425 - ARM)

Reported by: spenev@istac.de Assigned to:
Priority: major Milestone:
Component: madwifi: driver Version: trunk
Keywords: xscale,be,oops Cc:
Patch is attached: 0 Pending:

Description (Last modified by mentor)

Hi,

i tried to compile r2708-20070915 for 2.6.22.7 kernel on XScale IXP425 box, but the driver wasn't compiling, with error that ioread32be and iowrite32be are undefined. Without finding further information on this topic i managed to build the driver by adding the following lines to ath_hal/ah_os.h:

#define ioread32be(p)    ({ unsigned int __v = be32_to_cpu(__raw_readl(p)); __v; })
#define iowrite32be(v,a)    __raw_writel(cpu_to_be32((v)),(a))

This way the driver compiled and i was able to load the module in the kernel. However after some time i got the following kernel panic:

[/var]$ Internal error: Oops: f5 [#1]
Modules linked in: ath_pci wlan_wep ath_rate_sample pppoe wlan_scan_ap pppox wlan ppp_synctty ath_hal(P) ppp_async crc_ccitt bridge llc ppp_generic n_hdlc sc
CPU: 0    Tainted: P        (2.6.22.7 #1)
pc : [<c01bb57c>]    lr : [<00000007>]    psr: 80000013
sp : c25b1b28  ip : c25b1b54  fp : c25b1b50
r10: 00000007  r9 : c33f34e0  r8 : c33f371c
r7 : 9fd809fd  r6 : 00000000  r5 : 00000000  r4 : c01ed8bc
r3 : 5ff6e2b9  r2 : 00000000  r1 : 00000000  r0 : 00000000
Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  Segment user
Control: 000039ff  Table: 02540000  DAC: 00000015
Process dropbear (pid: 1242, stack limit = 0xc25b0258)
Stack: (0xc25b1b28 to 0xc25b2000)
1b20:                   c023a3d4 c33f34e0 00000106 00000005 39792a0f 00000004
1b40: 00000006 c25b1b6c c25b1b54 c01876c0 c01bb3d4 00000001 00000102 c33f34e0
1b60: c25b1bc8 c25b1b70 c018a058 c01876a4 00000001 00000000 00000000 00000007
1b80: 3979286f 39792a0f 00000007 00000000 00000000 0007f0b9 00000001 00000102
1ba0: c33f34e0 c0311200 c0311200 c33f34e0 c2eb0054 0affd764 0affd701 c25b1bf0
1bc0: c25b1bcc c018d5d0 c0188924 00000000 c33f34e0 c0311200 c33f34e0 dea78024
1be0: 0affd701 c25b1c24 c25b1bf4 c019333c c018cf98 c01787bc c25b1c70 00000000
1c00: c33f34e0 c0311200 c2eb0054 dea78024 0affd764 0affd701 c25b1c60 c25b1c28
1c20: c0195ac8 c0193318 c25b1c34 c01787bc c2eb0040 00000016 c0311200 00000006
1c40: 00000000 c0238644 c2863000 000333b9 c024e43c c25b1c90 c25b1c64 c01791fc
1c60: c01951e0 00000000 c01787bc 80000000 c0311200 c2eb0040 c0311200 c0252050
1c80: c2863000 c25b1cc8 c25b1c94 c0178fd8 c017903c c2863000 c01784c8 80000000
1ca0: c0311200 c2eb0032 c0311200 c0311200 c024e424 c02386c0 00000800 c25b1cf8
1cc0: c25b1ccc c0152b20 c0178ad4 000047f6 000047c0 c0311200 00000028 c2863000
1ce0: c2eb0032 c2f42000 00000040 c25b1d24 c25b1cfc bf00eca0 c0152898 c2855840
1d00: c2863380 00000000 c0311200 00000000 c2863380 c0311200 c25b1d44 c25b1d28
1d20: bf00eda4 bf00ec1c 00000000 c2eb0032 c0311200 c2855840 c25b1d74 c25b1d48
1d40: bf00efd0 bf00ecbc bf01a0a4 c0368000 c036afe8 c0311200 c0311200 c2855840
1d60: 00000000 00000001 c25b1da4 c25b1d78 c0152a58 bf00ede4 c25b1de0 c25b1d88
1d80: c2f42000 c024e0a0 00000000 c25b1dd0 0007f0b8 00000040 c25b1dcc c25b1da8
1da0: c015490c c0152898 c024e1c0 c024e0a0 c024e084 c024e094 0007f0b8 c25b0000
1dc0: c25b1df4 c25b1dd0 c0154a70 c015487c 0000012c 00000001 c0241534 00000009
1de0: c11d0400 00000000 c25b1e10 c25b1df8 c003fb54 c01549f8 0000001c c0228db4
1e00: 00000000 c25b1e20 c25b1e14 c003ff0c c003fb04 c25b1e3c c25b1e24 c0025048
1e20: c003fed4 ffffffff 0000001f 10000000 c25b1e98 c25b1e40 c0025a24 c002500c
1e40: 00000001 00000001 20000013 00000001 c2627c00 00000000 c25b1ee8 c11d0400
1e60: 00000000 000333b9 c25b0000 c25b1e98 c25b1e88 c25b1e88 c00f7794 c00f7794
1e80: 00000013 ffffffff c2627c00 c25b1eb0 c25b1e9c c00f806c c00f778c c11d0400
1ea0: 00000000 c25b1ec4 c25b1eb4 c00fed94 c00f8058 c25b1f00 c25b1ed4 c25b1ec8
1ec0: c00fb8b4 c00fed80 c25b1f2c c25b1ed8 c00fd968 c00fb870 c0349320 00000001
1ee0: 00000000 7fffffff 00003f31 00000000 c2b28860 c0037afc c11d0528 c11d0528
1f00: 00033488 c11d0400 c0349320 c11d040c fffffffb c2d57570 000333b9 00004000
1f20: c25b1f60 c25b1f30 c00fa5a4 c00fd490 46fcf1a1 00000000 c0349320 000333b9
1f40: c25b1f80 00000003 c0025f44 c25b0000 00000005 c25b1f7c c25b1f64 c007c93c
1f60: c00fa52c c0349320 00000000 00000000 c25b1fa4 c25b1f80 c007cd20 c007c89c
1f80: 00000000 00000000 00000000 00000000 00032360 00031868 00000000 c25b1fa8
1fa0: c0025da0 c007cce0 00000000 00032360 00000007 000333b9 00004000 00000009
1fc0: 00000000 00032360 00031868 00004000 00000007 00000001 00000005 00000001
1fe0: 000311dc becc79a0 0000db94 40080474 80000010 00000007 00000000 00000000
Backtrace:
Function entered at [<c01bb3c8>] from [<c01876c0>]
Function entered at [<c0187698>] from [<c018a058>]
r5:c33f34e0 r4:00000102
Function entered at [<c0188918>] from [<c018d5d0>]
Function entered at [<c018cf8c>] from [<c019333c>]
Function entered at [<c019330c>] from [<c0195ac8>]
Function entered at [<c01951d4>] from [<c01791fc>]
Function entered at [<c0179030>] from [<c0178fd8>]
r7:c2863000 r6:c0252050 r5:c0311200 r4:c2eb0040
Function entered at [<c0178ac8>] from [<c0152b20>]
r7:00000800 r6:c02386c0 r5:c024e424 r4:c0311200
Function entered at [<c015288c>] from [<bf00eca0>]
Function entered at [<bf00ec10>] from [<bf00eda4>]
r6:c0311200 r5:c2863380 r4:00000000
Function entered at [<bf00ecb0>] from [<bf00efd0>]
r7:c2855840 r6:c0311200 r5:c2eb0032 r4:00000000
Function entered at [<bf00edd8>] from [<c0152a58>]
r7:00000001 r6:00000000 r5:c2855840 r4:c0311200
Function entered at [<c015288c>] from [<c015490c>]
Function entered at [<c0154870>] from [<c0154a70>]
Function entered at [<c01549ec>] from [<c003fb54>]
r8:00000000 r7:c11d0400 r6:00000009 r5:c0241534 r4:00000001
Function entered at [<c003faf8>] from [<c003ff0c>]
r6:00000000 r5:c0228db4 r4:0000001c
Function entered at [<c003fec8>] from [<c0025048>]
Function entered at [<c0025000>] from [<c0025a24>]
Exception stack(0xc25b1e40 to 0xc25b1e88)
1e40: 00000001 00000001 20000013 00000001 c2627c00 00000000 c25b1ee8 c11d0400
1e60: 00000000 000333b9 c25b0000 c25b1e98 c25b1e88 c25b1e88 c00f7794 c00f7794
1e80: 00000013 ffffffff
r6:10000000 r5:0000001f r4:ffffffff
Function entered at [<c00f7780>] from [<c00f806c>]
r4:c2627c00
Function entered at [<c00f804c>] from [<c00fed94>]
r5:00000000 r4:c11d0400
Function entered at [<c00fed74>] from [<c00fb8b4>]
r4:c25b1f00
Function entered at [<c00fb864>] from [<c00fd968>]
Function entered at [<c00fd484>] from [<c00fa5a4>]
Function entered at [<c00fa520>] from [<c007c93c>]
Function entered at [<c007c890>] from [<c007cd20>]
r6:00000000 r5:00000000 r4:c0349320
Function entered at [<c007ccd4>] from [<c0025da0>]
r6:00031868 r5:00032360 r4:00000000
Code: e2635020 e3550006 e59f426c 90873004 (95d33000)
Kernel panic - not syncing: Fatal exception in interrupt

Rebooting in 10 seconds..+
Trying NPE-B...success. Using NPE-B with PHY 0. 

Help is greatly appreciated!

Best regards, Simeon Penev

Change History

09/28/07 20:37:32 changed by mentor

  • description changed.

09/28/07 22:32:37 changed by mentor

  • priority changed from critical to major.
  • summary changed from Oops on XScale IXP425 BE to Compilation error: io{read,write}32 not defined (IXP425 - ARM).

Well, that code won't necessarily work, which is why it was changed. Retitling.

09/28/07 22:33:32 changed by mentor

It appears that CONFIG_GENERIC_IOMAP is not turned on for ARM and it does not have its own implementation... hmmm...

09/29/07 17:10:49 changed by david@boreham.org

I am also afflicted by this issue (actually in my case the driver compiles ok and references the symbols io[read|write]32be, but doesn't load at runtime due to unresolved symbols. I'm assuming this is just because I'm building as a module and the build allows unresolved symbols at compile time.

Anyway, I'm willing to expend some time on this. If there's an obvious route to go down (e.g. enabling the generic functions for ARM, writing assembler versions...) then I'm happy to try. Any pointers welcome.

09/29/07 18:38:10 changed by david@boreham.org

This patch _appears_ to work for me:

--- madwifi-ng-r2708-20070915_orig/ath_hal/ah_os.h 2007-08-24 06:03:12.000000000 -0600 +++ madwifi-ng-r2708-20070915/ath_hal/ah_os.h 2007-09-29 08:22:28.000000000 -0600 @@ -172,7 +172,7 @@

  • never byte-swapped by PCI chipsets or bridges, but always
  • written directly (i.e. the format defined by the manufacturer). */

-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12) +#if 0

# if (AH_BYTE_ORDER == AH_BIG_ENDIAN) #define _OS_REG_WRITE(_ah, _reg, _val) do { \

(0x4000 <= (_reg) && (_reg) < 0x5000) ? \

10/01/07 15:13:28 changed by spenev@istac.de

Hi,

@david: Thank you for you patch. With it i was able to connect to the box via wlan. However there still seems to be a problem with the IO-calls. I tried to run tcpdump with the "-nn -i any" parameters and i got this dump:

[~]$ Internal error: Oops: f5 #1 Modules linked in: ath_pci wlan_wep ath_rate_sample wlan_scan_ap wlan ath_hal(P) bridge llc CPU: 0 Tainted: P (2.6.22.7 #1) pc : [<c01bb57c>] lr : [<00000005>] psr: 80000013 sp : c0221c4c ip : c0221c78 fp : c0221c74 r10: 00000005 r9 : c3abe880 r8 : c3abeabc r7 : 9fd809fd r6 : 00000000 r5 : 00000000 r4 : c01ed8bc r3 : 5ff6e2b9 r2 : 00000000 r1 : 00000000 r0 : 00000000 Flags: Nzcv IRQs on FIQs on Mode SVC_32 Segment kernel Control: 000039ff Table: 03f0c000 DAC: 00000017 Process swapper (pid: 0, stack limit = 0xc0220258) Stack: (0xc0221c4c to 0xc0222000) 1c40: c023a3d4 c3abe880 00000106 00000003 2276a0ec 1c60: 00000004 00000006 c0221c90 c0221c78 c01876c0 c01bb3d4 00000001 00000102 1c80: c3abe880 c0221cec c0221c94 c018a058 c01876a4 00000001 00000000 00000000 1ca0: 00000005 22769db4 2276a0ec 00000005 00000000 00000000 fffff60d 00000001 1cc0: 00000102 c3abe880 c2e87bc0 c2e87bc0 c3abe880 c3f1b054 0affd764 0affd701 1ce0: c0221d14 c0221cf0 c018d5d0 c0188924 00000000 c3abe880 c2e87bc0 c3abe880 1d00: eef115bd 0affd701 c0221d48 c0221d18 c019333c c018cf98 c01787bc c0221d94 1d20: 00000000 c3abe880 c2e87bc0 c3f1b054 eef115bd 0affd764 0affd701 c0221d84 1d40: c0221d4c c0195ac8 c0193318 c0221d58 c01787bc c3f1b040 00000016 c2e87bc0 1d60: 00000006 00000000 c0238644 c31a3000 690541c1 c024e43c c0221db4 c0221d88 1d80: c01791fc c01951e0 00000000 c01787bc 80000000 c2e87bc0 c3f1b040 c2e87bc0 1da0: c0252050 c31a3000 c0221dec c0221db8 c0178fd8 c017903c c31a3000 c01784c8 1dc0: 80000000 c2e87bc0 c02386c0 c2e87bc0 c2e87bc0 c024e424 c02386c0 00000800 1de0: c0221e1c c0221df0 c0152b20 c0178ad4 c004e30c c0037b08 c2e87bc0 0000002e 1e00: c31a3000 c3f1b032 c317a000 00000040 c0221e48 c0221e20 bf003ca0 c0152898 1e20: c3794f00 c31a3380 00000000 c2e87bc0 00000000 c31a3380 c2e87bc0 c0221e68 1e40: c0221e4c bf003da4 bf003c1c 00000000 c3f1b032 c2e87bc0 c3794f00 c0221e98 1e60: c0221e6c bf003fd0 bf003cbc 0000002e c2e87bc0 c3794f00 c2e87bc0 c2e87bc0 1e80: c3794f00 00000000 00000000 c0221ec8 c0221e9c c0152a58 bf003de4 c0221f04 1ea0: c0221eac c317a000 c024e0a0 00000000 c0221ef4 fffff60c 00000040 c0221ef0 1ec0: c0221ecc c015490c c0152898 c024e1c0 c024e0a0 c024e084 c024e094 fffff60c 1ee0: 000209c4 c0221f18 c0221ef4 c0154a70 c015487c 0000012c 00000001 c0241534 1f00: 00000009 c025460c 00020b30 c0221f34 c0221f1c c003fb54 c01549f8 0000001a 1f20: c0228d4c 00000000 c0221f44 c0221f38 c003ff0c c003fb04 c0221f60 c0221f48 1f40: c0025048 c003fed4 ffffffff 0000001f 04000000 c0221fc0 c0221f64 c0025a24 1f60: c002500c 00000000 00000002 c0220000 00000000 c0026ee8 c0220000 c0022f50 1f80: c025460c 00020b30 690541c1 000209c4 c0221fc0 c0221fac c0221fac c0026cc8 1fa0: c0026ccc 60000013 ffffffff c02444c8 c023bb48 c0221fd0 c0221fc4 c01dd800 1fc0: c0026c9c c0221ff4 c0221fd4 c0008b78 c01dd7c4 c00083bc c0022f50 000039fd 1fe0: c023c008 c0223be8 00000000 c0221ff8 00008030 c000890c 00000000 00000000 Backtrace: Function entered at [<c01bb3c8>] from [<c01876c0>] Function entered at [<c0187698>] from [<c018a058>]

r5:c3abe880 r4:00000102

Function entered at [<c0188918>] from [<c018d5d0>] Function entered at [<c018cf8c>] from [<c019333c>] Function entered at [<c019330c>] from [<c0195ac8>] Function entered at [<c01951d4>] from [<c01791fc>] Function entered at [<c0179030>] from [<c0178fd8>] r7:c31a3000 r6:c0252050 r5:c2e87bc0 r4:c3f1b040 Function entered at [<c0178ac8>] from [<c0152b20>]

r7:00000800 r6:c02386c0 r5:c024e424 r4:c2e87bc0

Function entered at [<c015288c>] from [<bf003ca0>] Function entered at [<bf003c10>] from [<bf003da4>]

r6:c2e87bc0 r5:c31a3380 r4:00000000

Function entered at [<bf003cb0>] from [<bf003fd0>]

r7:c3794f00 r6:c2e87bc0 r5:c3f1b032 r4:00000000

Function entered at [<bf003dd8>] from [<c0152a58>]

r7:00000000 r6:00000000 r5:c3794f00 r4:c2e87bc0

Function entered at [<c015288c>] from [<c015490c>] Function entered at [<c0154870>] from [<c0154a70>] Function entered at [<c01549ec>] from [<c003fb54>]

r8:00020b30 r7:c025460c r6:00000009 r5:c0241534 r4:00000001

Function entered at [<c003faf8>] from [<c003ff0c>]

r6:00000000 r5:c0228d4c r4:0000001a

Function entered at [<c003fec8>] from [<c0025048>] Function entered at [<c0025000>] from [<c0025a24>] Exception stack(0xc0221f64 to 0xc0221fac) 1f60: 00000000 00000002 c0220000 00000000 c0026ee8 c0220000 c0022f50 1f80: c025460c 00020b30 690541c1 000209c4 c0221fc0 c0221fac c0221fac c0026cc8 1fa0: c0026ccc 60000013 ffffffff

r6:04000000 r5:0000001f r4:ffffffff

Function entered at [<c0026c90>] from [<c01dd800>]

r5:c023bb48 r4:c02444c8

Function entered at [<c01dd7b8>] from [<c0008b78>] Function entered at [<c0008900>] from [<00008030>] Code: e2635020 e3550006 e59f426c 90873004 (95d33000) Kernel panic - not syncing: Fatal exception in interrupt Rebooting in 10 seconds..+

10/02/07 06:23:10 changed by mrenzmann

You need to decode that oops message, as explained on DevDocs/KernelOops. Before pasting the decoded oops here, please refer to WikiFormatting.

10/05/07 19:24:47 changed by david@boreham.org

fyi, patched as above I've been running two systems for a few days. I suspect that you have found a different bug. I'm pretty sure that r2708 is solid on ixp425.