I have code for a module for an X10 cm19a (USB transceiver) that I have compiled and used in the past. I got it from
http://lemaymd.com/drupal/node/3 but then I customized it a bit for my own use.
I'm using this setup guide:
http://wp.pr0gr4mm3r.com/linux/getting-your-x10-cm19a-module-working-in-linux/ For directions on building the module and I have built this module with my changes in the past and used it on my NSLU2 with both the unslug firmware and debian.
I have setup a native build environment for my kernel using the defconfig and patches from the optware trunk
http://svn.nslu2-linux.org/svnroot/optware/trunk/sources/kernel-modules/kirkwood/ which is producing a good kernel and modules that should be the same as the one bzhou has provided us in the NSLU2 optware feeds.
The module code compiles ok but when I plug the cm19a device into my USB hub the module crashes with the following dump.
x10-cm19a: Found input endpoint: 81, and output endpoint: 2
kernel BUG at arch/arm/mm/dma-mapping.c:497!
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c4b68000
[00000000] *pgd=1f2d6031, *pte=00000000, *ppte=00000000
Internal error: Oops: 817 [#1] PREEMPT
Modules linked in: x10_cm19a(+) nfsd nfs_acl auth_rpcgss exportfs dm_crypt dm_mod ipv6 sg
CPU: 0 Not tainted (2.6.30-rc4 #1)
PC is at __bug+0x1c/0x28
LR is at __bug+0x18/0x28
pc : [<c0028bb4>] lr : [<c0028bb0>] psr: 60000013
sp : df2d3d18 ip : 000024dc fp : 00000000
r10: dfb5ec00 r9 : d4851464 r8 : 00000000
r7 : de8e6b80 r6 : 00000005 r5 : d4851400 r4 : ffc03060
r3 : 00000000 r2 : 00000000 r1 : c0439ecc r0 : 00000030
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
Control: 0005317f Table: 04b68000 DAC: 00000015
Process modprobe (pid: 10676, stack limit = 0xdf2d2268)
Stack: (0xdf2d3d18 to 0xdf2d4000)
3d00: c04b9f9d c002ab10
3d20: 3fc03060 d4851400 000000d0 c01ffd08 0000000d 00000000 ffffffff 00000010
3d40: ffffffff ffffffff 00000001 df2d3d5c df2d3d7c 00000400 00000000 00000000
3d60: ffffffff 00000010 ffffffff 000024ac 000024ac c00367c8 d4851400 00000000
3d80: d4851400 00000000 c04b9f9f de8e6bc0 000000d0 df81dbd8 00000000 c0036df4
3da0: 00000007 20000013 00000000 a0000013 000000d0 ffc03060 d4851400 df2d2000
3dc0: 00000005 df2d3de4 d4851464 df2d3df0 00000000 bf0d00cc 00000000 df2d3e33
3de0: bf0d3b88 df2d3e33 d4851400 00000002 00000050 df0d0d00 c019ef88 df2d3e33
3e00: d4851400 df2d3e2e df2d3e26 df0d0d00 c019ef88 df2ada48 00000000 bf0d12c4
3e20: c4bea7b0 01803e40 24140000 01802020 20142000 a758cb34 bf0d3bd8 df0d0d20
3e40: df0d0d00 bf0d3b58 bf0d3b88 bf0d3bd8 dfb90000 c0203d74 df0d0d28 df0d0d20
3e60: df0d0d20 bf0d3b88 bf0d3b88 c042d048 00000060 c019ffd8 bf0d3b58 df0d0d20
3e80: df0d0d54 bf0d3b88 df2d3ea0 c01a0110 00000000 c01a00b0 bf0d3b88 c019f7c4
3ea0: df95c0b8 df868f90 c042d048 00000000 bf0d3c68 bf0d3b88 df122120 c019f098
3ec0: bf0d2237 c00760f4 bf0d3b58 bf0d3c68 bf0d3b88 bf0d3b88 00000000 df2d2000
3ee0: 00000000 c01a03ec bf0d3b58 bf0d3c68 bf0d21a0 bf0d3b88 00000000 c0203b2c
3f00: 40155000 bf0d3b54 bf0d3c68 40155000 bf0d6000 bf0d609c 00025242 c0025300
3f20: 00000000 fffffffc 00000000 c0065190 00000001 c03083b4 00000000 c0416a20
3f40: c0416a14 ffffffff 00000001 00000000 c0416a14 c0050dc8 00000000 00000000
3f60: 00025242 bf0d3c68 40155000 00000000 00025242 bf0d3c68 40155000 00000000
3f80: c0025b04 c005f950 00001000 00000003 00000000 4015202c 00000000 00018eb0
3fa0: 00000080 c0025980 4015202c 00000000 40155000 00025242 00018330 00000000
3fc0: 4015202c 00000000 00018eb0 00000080 00000000 40155000 00000000 00000000
3fe0: 00000000 bed7d904 0000b484 400ee6f4 60000010 40155000 0a29303d 00000000
[<c0028bb4>] (__bug+0x1c/0x28) from [<c002ab10>] (dma_cache_maint+0x78/0xe8)
[<c002ab10>] (dma_cache_maint+0x78/0xe8) from [<c01ffd08>] (usb_hcd_submit_urb+0x160/0x948)
[<c01ffd08>] (usb_hcd_submit_urb+0x160/0x948) from [<bf0d00cc>] (write_intr_data+0x1b4/0x208 [x10_cm19a])
[<bf0d00cc>] (write_intr_data+0x1b4/0x208 [x10_cm19a]) from [<bf0d12c4>] (x10_cm19a_probe+0x1c0/0x2e0 [x10_cm19a])
[<bf0d12c4>] (x10_cm19a_probe+0x1c0/0x2e0 [x10_cm19a]) from [<c0203d74>] (usb_probe_interface+0xec/0x14c)
[<c0203d74>] (usb_probe_interface+0xec/0x14c) from [<c019ffd8>] (driver_probe_device+0xb0/0x188)
[<c019ffd8>] (driver_probe_device+0xb0/0x188) from [<c01a0110>] (__driver_attach+0x60/0x84)
[<c01a0110>] (__driver_attach+0x60/0x84) from [<c019f7c4>] (bus_for_each_dev+0x4c/0x8c)
[<c019f7c4>] (bus_for_each_dev+0x4c/0x8c) from [<c019f098>] (bus_add_driver+0x130/0x2a4)
[<c019f098>] (bus_add_driver+0x130/0x2a4) from [<c01a03ec>] (driver_register+0xc0/0x14c)
[<c01a03ec>] (driver_register+0xc0/0x14c) from [<c0203b2c>] (usb_register_driver+0x68/0xec)
[<c0203b2c>] (usb_register_driver+0x68/0xec) from [<bf0d609c>] (x10_cm19a_init+0x9c/0x120 [x10_cm19a])
[<bf0d609c>] (x10_cm19a_init+0x9c/0x120 [x10_cm19a]) from [<c0025300>] (do_one_initcall+0x50/0x194)
[<c0025300>] (do_one_initcall+0x50/0x194) from [<c005f950>] (sys_init_module+0x90/0x194)
[<c005f950>] (sys_init_module+0x90/0x194) from [<c0025980>] (ret_fast_syscall+0x0/0x2c)
Code: e1a01000 e59f000c eb0b6c1b e3a03000 (e5833000)
---[ end trace de5dfc3b178aba34 ]---
Any ideas how I should proceed?
Mark
Edit:
I went back and tried the code without my customizations and got the same results.