This forum covers PCAN-Linux and Linux development issues concerning our products
-
Meldryt
- Posts: 6
- Joined: Mon 21. Nov 2016, 08:16
Post
by Meldryt » Wed 22. Feb 2017, 11:32
I try to build the latest peak driver (8.3.1) on Leap 42.1 with NETDEV_SUPPORT
and get errors starting with
peak-linux-driver-8.3.1/driver/src/pcan_netdev.c:832:10: error: ‘struct can_priv’ has no member named ‘restart_work’
According to the pcan driver notes this should already be fixed (for newer kernels)
netdev: fixed a compilation issue with some 4.4.0-x kernels including Linux 4.8 changes of can/dev.h
-
M.Maidhof
- Support

- Posts: 1753
- Joined: Wed 22. Sep 2010, 14:00
Post
by M.Maidhof » Wed 22. Feb 2017, 12:34
Hi,
which kernel version do you use? Please provide output of uname -r and the complete build process of the driver.
regards
Michael
-
Meldryt
- Posts: 6
- Joined: Mon 21. Nov 2016, 08:16
Post
by Meldryt » Wed 22. Feb 2017, 13:14
M.Maidhof wrote:Hi,
which kernel version do you use? Please provide output of uname -r and the complete build process of the driver.
regards
Michael
4.1.31-30
-
M.Maidhof
- Support

- Posts: 1753
- Joined: Wed 22. Sep 2010, 14:00
Post
by M.Maidhof » Wed 22. Feb 2017, 13:29
Hi,
and the output of the driver build/make process?
regards
Michael
BTW: when you like to use the NetDev driver with our hardware, there is no need to install our peak-linux-driver. The kernel already has a netdev driver included for all our PCAN PC hardware.
-
Meldryt
- Posts: 6
- Joined: Mon 21. Nov 2016, 08:16
Post
by Meldryt » Wed 22. Feb 2017, 14:20
Here is the output:
.
I will try kernel driver for the moment.
-
Meldryt
- Posts: 6
- Joined: Mon 21. Nov 2016, 08:16
Post
by Meldryt » Wed 22. Feb 2017, 15:00
Ok thanks! Does this version include the feature with handle restart from BUSOFF (netdev/pcanfd_pci) ?
-
S.Grosjean
- Software Development

- Posts: 357
- Joined: Wed 4. Jul 2012, 17:02
Post
by S.Grosjean » Wed 22. Feb 2017, 15:19
Hi,
Unfortunately not.
If you're ok with changing source files of 8.3.1, please try adding:
at the beginning of peak-linux-driver-8.3.1/driver/src/pcan_netdev.c, for example after line 50 :
Code: Select all
#define CAN_NETDEV_NAME "can%d"
#define LINUX_CAN_RESTART_TIMER
Save then exit and retry compiling.
According to your Kernel version, this should have been defined in the make command line. The reason why it isn't is not clear at the moment.
Thanks to notify us whether this change worked.
Regards,
Stéphane
— Stéphane
-
angaglia
- Posts: 1
- Joined: Tue 28. Feb 2017, 21:41
Post
by angaglia » Tue 28. Feb 2017, 23:59
Hi there,
Ive been having the similar problem. My kernel version is "4.4.0-64-generic" on Ubuntu 16.04
I have the PCAN-PCI Express card with 2 transceivers and I want to use the SocketCAN interface exclusively as well (Netdev).
So I've seen the problem come up with the priv_can and restart_timer on both 8.3 and 8.3.1. I think part of it is doing a lot of making, cleaning and un/installing to get the driver working which messes something up. I also tried the fix of adding the #define mentioned in this thread, but didnt fix anything
Took me a while to get can0 and can1 to show up as a netdev, but give this a try.
1) I would start clean.
In peak-driver directory:
sudo make uninstall
make clean
2) then do the following:
make # This makes all binaries, specifically the additional binaries (e.g. in the test folder) if you try make install with just the driver make binaries (the next command) it will complain about the test binaries not being there.
make -C driver NET=NETDEV_SUPPORT # remakes driver shared objects with netdev binaries included.
sudo make install
sudo modprobe pcan
ifconfig -a # You should see your can device listed now as can0, can1, etc.
This worked for me but, like you and others, it took a stupid amount of time to figure this out and by chance. I keep seeing that the netdev interface should work out of the box without the drivers installed because its supported by the kernel, but the fact the CAN devices will not show up on ifconfig until I do the steps above, I find that claim needs to be explained better in the manual or actually tested.
Can PEAK please make the netdev install process a bit smoother please?
-
S.Grosjean
- Software Development

- Posts: 357
- Joined: Wed 4. Jul 2012, 17:02
Post
by S.Grosjean » Wed 1. Mar 2017, 10:03
Hi,
Thanks for your feedback. The steps you've given seem finally really close to those given in the User Guide, but we will have a look to better explain these. In fact, UG also says that, since v8, NETDEV is no more the default build, mainly because quite all PEAK products are now supported by mainline Kernels.
It would have helped us if you had given us the output of the failed "make NET=NETDEV_SUPPORT" command, because, as said in the changelogs, 8.3.1 should have theoretically fix it, especially running with Ubuntu. Note that this thread deals with specific OpenSUSE issue, which is some other context that will be handled in the next release.
Thanks for supporting PEAK-System products,
Regards,
Stéphane
— Stéphane