• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Trouble building module for x10 cm19a  (Read 2789 times)
kilowatt
Global Moderator
Full Member
*****

Karma: 3
Posts: 106


View Profile
« on: May 04, 2009, 07:03:04 AM »

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.

Code:
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.


« Last Edit: May 04, 2009, 07:30:21 AM by kilowatt » Logged

kilowatt
Global Moderator
Full Member
*****

Karma: 3
Posts: 106


View Profile
« Reply #1 on: May 06, 2009, 07:26:54 PM »

I've done some more testing of this.  I upgraded my eeePC 1000 to Ubuntu Jaunty and compiled the module.  It works fine on that system.  I even grabbed 2.6.30-rc4 for the eeePC and it compiled and worked on with version kernel also.

On the plug I downloaded the orion git and built that version of 2.6.30-rc3.  It failed the same way running with that build on the sheeva plug.

So I'm starting to think this is a problem in the kernel and not my module.
Logged

justaj
Newbie
*

Karma: 0
Posts: 1


View Profile
« Reply #2 on: February 16, 2010, 12:25:01 PM »

Were you able to get this resolved?  I'm thinking about getting one of these plug in computers so I could connect it to my CM15A.  (Though I don't really know linux much so this will be a challenge)  I'd like to run the home automation software from it so I dont have to leave my PC or Mac on.
Logged

restamp
Global Moderator
Sr. Member
*****

Karma: 4
Posts: 273


View Profile
« Reply #3 on: February 16, 2010, 10:14:04 PM »

I currently have an X10 CM11a (serial to power-line transceiver/controller) hanging off my Plug, through a serial-to-USB cord.  It works fine.  I use a highly modified version of Dan Lanciani's x10d program to interface to it.  With Cron and a series of shell scripts, I have pretty much all the computerized control I desire.  If anyone has an interest, I'd be happy to describe this in more detail or share my program with you.

I have a CM19a (serial to RF transceiver) laying around here somewhere, but have never done anything with it.  The CM15a (USB to power line transceiver) came along after I had moved on to other things, so I've never looked into it.  Is it just a CM11a with a USB instead of serial backend?  Does it have all the functionality of the CM11a?  Any extra functionality?

I'm sure you've already discovered this web page, but for everyone's benefit, here's some good info on using the CM15a with Linux:
http://www.linuxha.com/USB/cm15a.html

Good luck and keep us informed.
Logged

kilowatt
Global Moderator
Full Member
*****

Karma: 3
Posts: 106


View Profile
« Reply #4 on: February 17, 2010, 07:48:54 PM »

I never got that driver to run although I have not tried it since last May. 

I started using this driver for my cm19a and I modified my scripts to work with it.  http://www.linuxha.com/USB/  It has been a while since I compiled it but I think I remember editing the driver code and stripping it down to just support cm19a since that is all I needed.

edit: no actually I just changed the Makefile a bit for my build setup.  You should be able to use it as is.

I have not tried using a CM15A.

I also use a CM11a via a usb serial adapter.  For software to control the cm11a I use heyu which compiles fine.  http://heyu.tanj.com/
« Last Edit: February 17, 2010, 07:54:41 PM by kilowatt » Logged

Pages: [1]
Print
Jump to: