Git Product home page Git Product logo

acontis / atemsys Goto Github PK

View Code? Open in Web Editor NEW
28.0 28.0 13.0 683 KB

Kernel module that grants direct access to hardware, improving the performance of the LinkLayers, used in the EtherCAT Master Stack Software EC-Master and EtherCAT Network Simulation Software EC-Simulator.

Home Page: https://developer.acontis.com/

License: GNU General Public License v2.0

Makefile 0.43% C 99.57%
ec-master ec-simulator ethercat ethercat-master industrial-automation linux performance realtime xenomai

atemsys's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

atemsys's Issues

Build fails with kernel 6.5

/home/eibachd/src/atemsys/atemsys.c: In function ‘device_mmap’:
/home/eibachd/src/atemsys/atemsys.c:1935:18: error: assignment of read-only member ‘vm_flags’
1935 | vma->vm_flags |= VM_RESERVED | VM_LOCKED | VM_DONTCOPY;
| ^~
/home/eibachd/src/atemsys/atemsys.c:1992:21: error: assignment of read-only member ‘vm_flags’
1992 | vma->vm_flags |= VM_IO;
| ^~
/home/eibachd/src/atemsys/atemsys.c: In function ‘ResetPhyViaGpio’:
/home/eibachd/src/atemsys/atemsys.c:3304:5: error: implicit declaration of function ‘devm_gpio_free’; did you mean ‘devm_gpiod_get’? [-Werror=implicit-function-declaration]
3304 | devm_gpio_free(&pDrvDescPrivate->pPDev->dev, pDrvDescPrivate->nPhyResetGpioPin);
| ^~~~~~~~~~~~~~
| devm_gpiod_get
In file included from /usr/src/linux-headers-6.5.0-2-reform2-common/arch/arm64/include/asm/lse.h:12,
from /usr/src/linux-heaazders-6.5.0-2-reform2-common/arch/arm64/include/asm/cmpxchg.h:14,
from /usr/src/linux-headers-6.5.0-2-reform2-common/arch/arm64/include/asm/atomic.h:16,
from /usr/src/linux-headers-6.5.0-2-reform2-common/include/linux/atomic.h:7,
from /usr/src/linux-headers-6.5.0-2-reform2-common/include/asm-generic/bitops/atomic.h:5,
from /usr/src/linux-headers-6.5.0-2-reform2-common/arch/arm64/include/asm/bitops.h:25,
from /usr/src/linux-headers-6.5.0-2-reform2-common/include/linux/bitops.h:68,
from /usr/src/linux-headers-6.5.0-2-reform2-common/arch/arm64/include/asm/cache.h:40,
from /usr/src/linux-headers-6.5.0-2-reform2-common/include/linux/cache.h:6,
from /usr/src/linux-headers-6.5.0-2-reform2-common/include/linux/time.h:5,
from /usr/src/linux-headers-6.5.0-2-reform2-common/arch/arm64/include/asm/stat.h:12,
from /usr/src/linux-headers-6.5.0-2-reform2-common/include/linux/stat.h:6,
from /usr/src/linux-headers-6.5.0-2-reform2-common/include/linux/module.h:13,
from /home/eibachd/src/atemsys/atemsys.c:98:
/home/eibachd/src/atemsys/atemsys.c: In function ‘init_module’:
/usr/src/linux-headers-6.5.0-2-reform2-common/include/linux/export.h:29:22: error: passing argument 1 of ‘class_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
29 | #define THIS_MODULE (&__this_module)
| ~^~~~~~~~~~~~~~~
| |
| struct module *
/home/eibachd/src/atemsys/atemsys.c:4064:32: note: in expansion of macro ‘THIS_MODULE’
4064 | S_pDevClass = class_create(THIS_MODULE, ATEMSYS_DEVICE_NAME);
| ^~~~~~~~~~~
In file included from /usr/src/linux-headers-6.5.0-2-reform2-common/include/linux/device.h:31,
from /usr/src/linux-headers-6.5.0-2-reform2-common/include/linux/pci.h:37,
from /home/eibachd/src/atemsys/atemsys.c:100:
/usr/src/linux-headers-6.5.0-2-reform2-common/include/linux/device/class.h:230:54: note: expected ‘const char *’ but argument is of type ‘struct module *’
230 | struct class * __must_check class_create(const char *name);
| ~~~~~~~~~~~~^~~~
/home/eibachd/src/atemsys/atemsys.c:4064:19: error: too many arguments to function ‘class_create’
4064 | S_pDevClass = class_create(THIS_MODULE, ATEMSYS_DEVICE_NAME);
| ^~~~~~~~~~~~
/usr/src/linux-headers-6.5.0-2-reform2-common/include/linux/device/class.h:230:29: note: declared here
230 | struct class * __must_check class_create(const char *name);
| ^~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-6.5.0-2-reform2-common/scripts/Makefile.build:248: /home/eibachd/src/atemsys/atemsys.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.5.0-2-reform2-common/Makefile:2059: /home/eibachd/src/atemsys] Error 2
make[1]: *** [/usr/src/linux-headers-6.5.0-2-reform2-common/Makefile:246: __sub-make] Error 2
make: *** [Makefile:28: modules] Error 2

Won't compile with kernel >= 6.6

Trying to compile against a kernel >= 6.6 brings:

$ LANG=C make
make -C /lib/modules/6.6.15-amd64/build M=/home/lisandro/damian/ics/repos/kinarm/atemsys modules
make[1]: Entering directory '/usr/src/linux-headers-6.6.15-amd64'
  CC [M]  /home/lisandro/damian/ics/repos/kinarm/atemsys/atemsys.o
/home/lisandro/damian/ics/repos/kinarm/atemsys/atemsys.c: In function 'PciDriverRemove':
/home/lisandro/damian/ics/repos/kinarm/atemsys/atemsys.c:4541:5: error: implicit declaration of function 'pci_disable_pcie_error_reporting' [-Werror=implicit-function-declaration]
 4541 |     pci_disable_pcie_error_reporting(pPciDev);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lisandro/damian/ics/repos/kinarm/atemsys/atemsys.c: In function 'PciDriverProbe':
/home/lisandro/damian/ics/repos/kinarm/atemsys/atemsys.c:4577:5: error: implicit declaration of function 'pci_enable_pcie_error_reporting' [-Werror=implicit-function-declaration]
 4577 |     pci_enable_pcie_error_reporting(pPciDev);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [/usr/src/linux-headers-6.6.15-common/scripts/Makefile.build:248: /home/lisandro/damian/ics/repos/kinarm/atemsys/atemsys.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.6.15-common/Makefile:1938: /home/lisandro/damian/ics/repos/kinarm/atemsys] Error 2
make[1]: *** [/usr/src/linux-headers-6.6.15-common/Makefile:246: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.6.15-amd64'
make: *** [Makefile:28: modules] Error 2

Seems that API is no longer available on those kernels.

ATEMSYS_IOCTL_PCI_CONF_DEVICE failed: -14

@ec-support

I faced with the following error when I try to use atemsys.
ATEMSYS_IOCTL_PCI_CONF_DEVICE failed: -14
I'm using rt kernel on ubuntu20.04 which is 5.4.143-rt64.
PCI device using on my PC is Intel Corporation 82579V Gigabit Network Connection whose vendor id is 0x8086 and device id 0x1503.
I'm glad to have some information of this error and how to solve this problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.