[etherlab-dev] EtherCAT-Master on recent kernels

Stefan Agner stefan.agner at yahoo.com
Tue Mar 31 16:06:25 CEST 2009


Hello,

I already wrote to the users mailing list today, read that mail for more background.

To start with EtherCAT I installed etherlab's ethercat master on a commodity desktop pc with an Intel network interface (e100). I used Ubuntu 9.04 with 2.6.28 Kernel, therefore I had to change master/master.c in order to register the character device right:
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
    master->class_device = device_create(class, NULL,
            MKDEV(MAJOR(device_number), master->index), NULL,
            "EtherCAT%u", master->index);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)

There is a new paramter, which exists since 2.6.27:
http://lxr.linux.no/linux+v2.6.27/drivers/base/core.c#L1329

I also added e100 support for 2.6.28 and 2.6.29 (I attached the files).

I noticed a crash when I unload ethercat master's kernelmodule:
# /etc/init.d/ethercat start
.... wait a while
# /etc/init.d/ethercat stop
# dmesg > dmesg_beforcrash && sync
.... wait another second, and the system freezes, completly... 

Any idea? Dmesg looks like everything went fine... I also let the module run for several hours, without a problem, its only on unloading.. Did I made a mistake in my driver?

Thanks
bye
Stefan



      
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dmesg_beforcrash
Type: application/octet-stream
Size: 2284 bytes
Desc: not available
Url : http://lists.etherlab.org/pipermail/etherlab-dev/attachments/20090331/54d7f670/attachment-0001.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: e100-drivers.tar.bz2
Type: application/x-bzip
Size: 52521 bytes
Desc: not available
Url : http://lists.etherlab.org/pipermail/etherlab-dev/attachments/20090331/54d7f670/attachment-0001.bin 


More information about the etherlab-dev mailing list