[Bug 2109529] Re: MCP251xFD Driver Failure on Ubuntu with CAN Interface
** Changed in: linux-raspi (Ubuntu) Status: Confirmed => Deferred -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2109529 Title: MCP251xFD Driver Failure on Ubuntu with CAN Interface To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2109529/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2109529] Re: MCP251xFD Driver Failure on Ubuntu with CAN Interface
This looks to be RT related. I don't think I can make much progress without access to the HW and a reproducer. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2109529 Title: MCP251xFD Driver Failure on Ubuntu with CAN Interface To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2109529/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2109529] Re: MCP251xFD Driver Failure on Ubuntu with CAN Interface
Ah, sorry for the confusion. It's been quite a while since I worked on that topic. As I mainly work on the PREMMPT_RT kernels, I simply forgot about that one test with the stock kernel. You are absolutely right. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2109529 Title: MCP251xFD Driver Failure on Ubuntu with CAN Interface To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2109529/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2109529] Re: MCP251xFD Driver Failure on Ubuntu with CAN Interface
Sydney, I'm trying to isolate the problem and take RT out of the picture first. I'm confused by your statement: > To be serious I never really looked on non RT patched releases on Ubuntu > 24.04. The bug description states: > Kernel 6.8.0-1020-raspi: > [130.086150] mcp251xfd spi0.0 can0: IRQ handler mcp251xfd_handle_tefif() > returned -22 (intf=0x31aa018). > [130.086464] mcp251xfd spi0.0 can0: IRQ handler returned -22. This indicates that the non-RT 6.8.0-1020-raspi kernel also has problems. Based on all the information in this bug, is the following correct? 6.8.0-1020-raspi - BAD 6.8.0-1028-raspi - GOOD 6.8.0-1028-raspi (+cbd1) - GOOD 6.8.0-2019-raspi-realtime - BAD 6.8.0-2023-raspi-realtime - BAD -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2109529 Title: MCP251xFD Driver Failure on Ubuntu with CAN Interface To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2109529/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2109529] Re: MCP251xFD Driver Failure on Ubuntu with CAN Interface
Let me recap the situation with the new information: I verified the MCP2518FD using manually applied RT patches on Kernel 6.6 (Debian) and Kernel 6.12 (Debian), with PREEMPT_RT enabled in the build configuration. While using Ubuntu, I relied on the Preempt RT kernels provided by the Ubuntu Pro subscription. Since there is no official PREEMPT_RT kernel available for Ubuntu 25.04 and Kernel 6.14, I was unable to test under the PREEMPT_RT configuration. This initially led me to assume that there was a dependency on the kernel releases. However, from a new perspective, it seems more likely that the RT patch is causing the issue. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2109529 Title: MCP251xFD Driver Failure on Ubuntu with CAN Interface To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2109529/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2109529] Re: MCP251xFD Driver Failure on Ubuntu with CAN Interface
Hi Jürg, thanks for looking into that issue. I tested the new kernel versions. The versions you specified are without RT Kernel Patch. To be serious I never really looked on non RT patched releases on Ubuntu 24.04. Running with Kernel "6.8.0-1028-raspi #32-Ubuntu SMP PREEMPT_DYNAMIC" the described issue is not present. Nevertheless I also tested you patched version. Also no issue. But I get the exact same issue with the RT patched Kernel 6.8.0-2023. I attached the dmesg output for you. ** Attachment added: "dmesg_6.8.0-2023-raspi-realtime.txt" https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2109529/+attachment/5879946/+files/dmesg_6.8.0-2023-raspi-realtime.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2109529 Title: MCP251xFD Driver Failure on Ubuntu with CAN Interface To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2109529/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2109529] Re: MCP251xFD Driver Failure on Ubuntu with CAN Interface
Sydney, sorry for the late reply. Can you please test linux-raspi 6.8.0-1028.32 in noble-updates and post the kernel log? I don't expect this to behave any better but wanted to confirm that the problem still exists in the latest version. Afterwards please test this [1], which is 6.8.0-1028.32 plus a couple of spi patches. [1] https://people.canonical.com/~juergh/lp2109529/ -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2109529 Title: MCP251xFD Driver Failure on Ubuntu with CAN Interface To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2109529/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2109529] Re: MCP251xFD Driver Failure on Ubuntu with CAN Interface
** Attachment added: "ubuntu25.04_config.txt" https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2109529/+attachment/5876031/+files/ubuntu25.04_config.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2109529 Title: MCP251xFD Driver Failure on Ubuntu with CAN Interface To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2109529/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2109529] Re: MCP251xFD Driver Failure on Ubuntu with CAN Interface
Hi Jürg, thanks for supporting here. 1. For Kernel 6.6 and 6.12 I'm referring to the Raspberry PI OS included ones aka https://github.com/raspberrypi/linux. I also tested it on a Ubuntu 25.04 Server image with Kernel 6.14 facing also no issues. It seems that this bug is kernel 6.8 related only. 2. for the config.txt I use the stock ones with just adding the same overlays on all systems. 3. To stay on one ecosystem I gonna attach the Ubuntu config.txt files. ** Attachment added: "ubuntu24.04_config.txt" https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2109529/+attachment/5876030/+files/ubuntu24.04_config.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2109529 Title: MCP251xFD Driver Failure on Ubuntu with CAN Interface To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2109529/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2109529] Re: MCP251xFD Driver Failure on Ubuntu with CAN Interface
> This error is not present on Kernel 6.6 and 6.12 and later. 1. Are you referring to the Raspberry Pi OS 6.6 and 6.12 kernels or the upstream kernel.org kernels? 2. Can you please post the content of /boot/firmware/config.txt from the (broken) Ubuntu system? 3. Can you please post the content of /boot/config.txt and the kernel log from a (working) Raspi OS system? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2109529 Title: MCP251xFD Driver Failure on Ubuntu with CAN Interface To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2109529/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2109529] Re: MCP251xFD Driver Failure on Ubuntu with CAN Interface
Sure. Find it attached here. ** Attachment added: "dmesg.txt" https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2109529/+attachment/5875012/+files/dmesg.txt -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2109529 Title: MCP251xFD Driver Failure on Ubuntu with CAN Interface To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2109529/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2109529] Re: MCP251xFD Driver Failure on Ubuntu with CAN Interface
The most important log is missing, the output of `dmesg'. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2109529 Title: MCP251xFD Driver Failure on Ubuntu with CAN Interface To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2109529/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2109529] Re: MCP251xFD Driver Failure on Ubuntu with CAN Interface
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: linux-raspi (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2109529 Title: MCP251xFD Driver Failure on Ubuntu with CAN Interface To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2109529/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2109529] Re: MCP251xFD Driver Failure on Ubuntu with CAN Interface
Hi all let me clarify this bug a little bit more. I just verified it again on a clean Ubuntu 24.04 Server image with Kernel 6.8.0-2019-raspi-realtime received via Ubuntu Pro Subscription. There is also some RT optimization done on that system: /boot/firmware/cmdline.txt: console=serial0,115200 multipath=off dwc_otg.lpm_enable=0 console=tty1 root=LABEL=writable rootfstype=ext4 rootwait fixrtc rcu_nocb_poll rcu_nocbs=2-3 audit=0 watchdog=0 skew_tick=1 kthread_cpus=0-1 irqaffinity=0-1 isolcpus=managed_irq,domain,2-3 The error, which could be seen here together with Codesys is: [ 379.824205] mcp251xfd spi0.0 can0: IRQ handler mcp251xfd_handle_tefif() returned -22. [ 379.824244] mcp251xfd spi0.0 can0: IRQ handler returned -22 (intf=0x3f1a8010). As described in the introduction by Bugra. This error is not present on Kernel 6.6 and 6.12 and later. I gonna add the apport information of this system beneath my comment. My apologies for the confusion. The other system had still the backported MCP251xFD kernel module included. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2109529 Title: MCP251xFD Driver Failure on Ubuntu with CAN Interface To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2109529/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2109529] Re: MCP251xFD Driver Failure on Ubuntu with CAN Interface
ProblemType: Bug AlsaVersion: Advanced Linux Sound Architecture Driver Version k6.8.0-2019-raspi-realtime. AplayDevices: Error: [Errno 2] No such file or directory: 'aplay' ApportVersion: 2.28.1-0ubuntu3.5 Architecture: arm64 ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord' AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/timer', '/dev/snd/seq', '/dev/snd/pcmC0D0p', '/dev/snd/controlC0', '/dev/snd/pcmC1D0p', '/dev/snd/controlC1', '/dev/snd/by-path'] failed with exit code 1: CRDA: N/A Card0.Amixer.info: Error: [Errno 2] No such file or directory: 'amixer' Card0.Amixer.values: Error: [Errno 2] No such file or directory: 'amixer' Card1.Amixer.info: Error: [Errno 2] No such file or directory: 'amixer' Card1.Amixer.values: Error: [Errno 2] No such file or directory: 'amixer' CasperMD5CheckResult: unknown CloudArchitecture: aarch64 CloudID: nocloud CloudName: unknown CloudPlatform: nocloud CloudSubPlatform: config-disk (/dev/mmcblk0p1) CurrentDmesg: Error: command ['dmesg'] failed with exit code 1: dmesg: read kernel buffer failed: Operation not permitted DistroRelease: Ubuntu 24.04 IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig' Lspci-vt: -[:00]---00.0-[01]00.0 Raspberry Pi Ltd RP1 PCIe 2.0 South Bridge Lsusb: Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 005 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Lsusb-t: /: Bus 001.Port 001: Dev 001, Class=root_hub, Driver=dwc2/1p, 480M /: Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/2p, 480M /: Bus 003.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 5000M /: Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/2p, 480M /: Bus 005.Port 001: Dev 001, Class=root_hub, Driver=xhci-hcd/1p, 5000M Package: linux-raspi (not installed) PciMultimedia: ProcFB: ProcKernelCmdLine: reboot=w coherent_pool=1M 8250.nr_uarts=1 pci=pcie_bus_safe snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 smsc95xx.macaddr=2C:CF:67:D4:04:C6 vc_mem.mem_base=0x3fc0 vc_mem.mem_size=0x4000 console=ttyAMA0,115200 multipath=off dwc_otg.lpm_enable=0 console=tty1 root=LABEL=writable rootfstype=ext4 rootwait fixrtc rcu_nocb_poll rcu_nocbs=2-3 audit=0 watchdog=0 skew_tick=1 kthread_cpus=0-1 irqaffinity=0-1 isolcpus=managed_irq,domain,2-3 ProcVersionSignature: Ubuntu 6.8.0-2019.20-raspi-realtime 6.8.12 RelatedPackageVersions: linux-restricted-modules-6.8.0-2019-raspi-realtime N/A linux-backports-modules-6.8.0-2019-raspi-realtime N/A linux-firmware 20240318.git3b128b60-0ubuntu2.11 RfKill: Error: [Errno 2] No such file or directory: 'rfkill' SourcePackage: linux-raspi Tags: noble Uname: Linux 6.8.0-2019-raspi-realtime aarch64 UpgradeStatus: No upgrade log present (probably fresh install) UserGroups: adm audio cdrom dialout games input netdev plugdev render sudo users video _MarkForUpload: True acpidump: ** Tags added: apport-collected noble -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2109529 Title: MCP251xFD Driver Failure on Ubuntu with CAN Interface To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2109529/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2109529] Re: MCP251xFD Driver Failure on Ubuntu with CAN Interface
This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run: apport-collect 2109529 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2109529 Title: MCP251xFD Driver Failure on Ubuntu with CAN Interface To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2109529/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2109529] Re: MCP251xFD Driver Failure on Ubuntu with CAN Interface
** Description changed: Hi there, One of our customer is using MCP251xFD driver (SPI to CAN converter) for their solutions based on RPi. Although simple socket communication works, the customer tries to run Codesys as part of their solution and while Codesys tries to access CAN interface, the following error is seen in the dmesg; Kernel 6.8.0-1020-raspi: ``` [130.086150] mcp251xfd spi0.0 can0: IRQ handler mcp251xfd_handle_tefif() returned -22 (intf=0x31aa018). [130.086464] mcp251xfd spi0.0 can0: IRQ handler returned -22. ``` Also tried with Kernel 6.8.0-2019-raspi-realtime; ``` [126.366427] mcp251xfd spi0.0: DMA transaction timed out [126.366430] mcp251xfd spi0.0: SPI transfer failed: -110 [126.366434] mcp251xfd spi0.0: failed to transfer one message to queue [126.366436] mcp251xfd spi0.0: noueue transfer failed: -110 [126.366439] mcp251xfd spi0.0: DMA transaction timed out [126.366441] mcp251xfd spi0.0: SPI transfer failed: -110 [126.366444] mcp251xfd spi0.0: failed to transfer one message from queue [126.632946] mcp251xfd spi0.0 can0: CRC read error at address 0x0e0c (length=4, data=00 00 00 00, CRC=0x808080) retrying. [126.632948] mcp251xfd spi0.0 can0: CRC read error at address 0x0e0c (length=4, data=00 00 00 00, CRC=0x808080) retrying. [126.632950] mcp251xfd spi0.0 can0: failed to set REQUESTED OPERATION MODE. ``` Feedback from customer; - Backporting kernel driver mcp251xfd does not help, because there are - dependencies like spi driver which is also needed to be investigated - further. According to the customer, the mentioned problem is only - available on 6.8. They have not observed any issues with linux kernel - version 6.6 and 6.12 within different - - The described problem is only seen for kernel 6.8. - There are no issues with Raspbian based OS with 6.6 and 6.12 kernel. + Backporting kernel driver mcp251xfd does not help, because there are dependencies like spi driver which is also needed to be investigated further. According to the customer, the described problem is only seen for kernel 6.8. + There are no issues with Raspbian based OS with 6.6 and 6.12 kernel. Thanks, Bugra -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2109529 Title: MCP251xFD Driver Failure on Ubuntu with CAN Interface To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2109529/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 2109529] Re: MCP251xFD Driver Failure on Ubuntu with CAN Interface
** Tags added: kern-13110 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2109529 Title: MCP251xFD Driver Failure on Ubuntu with CAN Interface To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/2109529/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
