jackthompsonnz / socketcan-linux-5.0 Goto Github PK
View Code? Open in Web Editor NEWIxxat socketcan driver for Linux Kernel > 5 until they fix it
Ixxat socketcan driver for Linux Kernel > 5 until they fix it
The following issue is present when compiling under Linux 5.4+.
./arch/x86/include/asm/segment.h:254:2: error: expected '(' after 'asm'
alternative_io ("lsl %[seg],%[p]",
^
./arch/x86/include/asm/alternative.h:240:2: note: expanded from macro 'alternative_io'
asm_inline volatile (ALTERNATIVE(oldinstr, newinstr, feature) \
^
include/linux/compiler_types.h:210:24: note: expanded from macro 'asm_inline'
#define asm_inline asm __inline
This issue is directly caused by the following commit where asm_inline has been switched with asm:
torvalds/linux@40576e5
Using GCC 6.5
System:
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS (running on a virtual machine)
Release: 20.04
Codename: focal
Hardware:
Product: USB-to-CAN V2
Manufacturer: IXXAT
After compiling and installation, I get following feedback using dmesg
[ 311.531537] ixx_usb 1-1:1.0 can0: attached to USB-to-CAN_V2 channel 0 (device HW425745)
"sudo ip link set up can0" is followed by the error message
Segmentation fault (core dumped)
Hi @jackthompsonnz ,
We discovered that kernels newer than ~5.6 have a different time data structure and do no longer support the timeval
struct. Do you have a quick, or slow, fix for this?
Thanks for a great library, by the way :-)
Outright compilation error for 5.13.0.-27 generic
/home/user/socketcan-linux-5.0/usb-to-can_socketcan/ixx_usb_fd.c:36:25: error: expected declaration specifiers or ‘...’ before string constant 36 | MODULE_SUPPORTED_DEVICE("IXXAT Automation GmbH USB-to-CAN FD"); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Noted that the modules.h
in (uname -r)/include/linux directory does not have the MODULE_SUPPORTED_DEVICE
define anymore
/home/user/socketcan-linux-5.0/usb-to-can_socketcan/ixx_usb_core.c:256:9: error: too few arguments to function ‘can_get_echo_skb’ 256 | can_get_echo_skb(netdev, context->echo_index); | ^~~~~~~~~~~~~~~~
CAN Kernel source got updated. The function signature is now in the form of
unsigned int can_get_echo_skb(struct net_device *dev, unsigned int idx, unsigned int *frame_len_ptr)
Removing the MODULE_SUPPORTED_DEVICE
and passing a nullptr for the third (additional) parameter.
Hello.
Has anybody been able to get this driver to work using low-speed/fault-tolerant?
It seems like the default for port CAN1/LS is high-speed, and there does not seem to be any settings to specify low speed in socketcan?
hi, i have an old IXXAT usb-to-can , product-id 1.01.0087.10100, so perhaps it's not your problem , on IXXAT site only windows drivers ( https://www.ixxat.com/technical-support/support/downloads-obsolete-products ) , i hope you can help me :)
I tried to adapt the Driver to Kernel 5.15. My fork can be found here: https://github.com/sHorst/socketcan-linux-5.0
It does compile, but will segfault on bringing the can0 Interface up.
I narrowed the bug down to ixx_usb_core.c Line 403. https://github.com/sHorst/socketcan-linux-5.0/blob/master/usb-to-can_socketcan/ixx_usb_core.c#L403
But even when commenting out the line completely (which would result in a Memory leak for now) it does still not work. Since the err of usb_submit_urb(urb, GFP_KERNEL);
is ENOENT which indicates "specified interface or endpoint does not exist or is not enabled". I did not dig any deeper, do you have any idears, why it breaks here?
I am using a Kali VM (current as of now) with an USB2CAN interface.
Stefan
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.