Giter VIP home page Giter VIP logo

socketcan-linux-5.0's People

Contributors

jackthompsonnz avatar mixaill avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

socketcan-linux-5.0's Issues

Missing support for asm_inline in Linux 5.4

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

Segmentation fault (core dumped)

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)

5.13.0-27-generic Compilation issues

Issue:

Outright compilation error for 5.13.0.-27 generic

Error 1:

/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

Error 2:

/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)

Potential Fixes:

Removing the MODULE_SUPPORTED_DEVICE and passing a nullptr for the third (additional) parameter.

Using low speed on Ixxat USB-to-CAN v2

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?

Segfault with Kernel 5.15

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

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.