-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interrupt handling #16
Comments
Hey @urimashi, feel free to test my rewrite of the mcp25xxfd driver. It's available at: https://github.com/marckleinebudde/linux/tree/v4.19-rpi/mcp25xxfd-20200211-17 |
@marckleinebudde But when I port your v4.19-rpi/mcp25xxfd-20200429-46 brach, I got some problems such as: drivers/net/can/spi/mcp25xxfd/mcp25xxfd-core.c:2462:41: error: 'const struct spi_device' has no member named 'controller' My kernel version is 4.9.190. According to this blog: https://www.spinics.net/lists/linux-can/msg01938.html , you have a patch which can solve this issue. Can you show me that? Many thanks |
Hey @tayear, if you are on a raspi, please use the latest Raspi OS, it contains the If you want to use any kernel older than v5.10, some, probably a lot of patches need to be back ported, you are missing for example: marckleinebudde/linux@8caab75 Note: You have stated porting an old outdated driver, that never got mainline. It obviously has bugs. Please don't use that. Use the latest mainline kernel (v5.16) or a recent raspi OS. |
@marckleinebudde It seems there are only two choices for me: |
Hey @tayear, which SoC are you using? v4.9.170 is really, really old. The |
I'm using AllWinner T507. |
Hello @tayear, You start with a the |
Hi, @marckleinebudde |
Hardware: NXP SOC i.MX 8M Min
OS: Linux kernel 4.14.98 + mcp25xxfd-V8.2
The following error messages are generated during a trasnsmission attempt:
[ 43.425070] BUG: using __this_cpu_add() in preemptible [00000000] code: irq/70-
mcp25xxf/3073
[ 43.435474] caller is __this_cpu_preempt_check+0x18/0x20
[ 43.440821] CPU: 3 PID: 3073 Comm: irq/70-mcp25xxf Not tainted 4.14.98-06024-gefb8424cb055-dirty raspberrypi#19
[ 43.449954] Hardware name: CompuLab SB-UCM-iMX8 board (DT)
[ 43.455441] Call trace:
[ 43.457897] [] dump_backtrace+0x0/0x3c0
[ 43.463298] [] show_stack+0x14/0x20
[ 43.468354] [] dump_stack+0x8c/0xac
[ 43.473407] [] check_preemption_disabled+0xf8/0x100
[ 43.479850] [] __this_cpu_preempt_check+0x18/0x20
[ 43.486120] [] __netif_receive_skb_core+0x98/0x9f8
[ 43.492476] [] __netif_receive_skb+0x14/0x60
[ 43.498312] [] netif_receive_skb_internal+0x28/0x118
[ 43.504841] [] netif_receive_skb+0x1c/0xe0
[ 43.510523] [] mcp25xxfd_can_int+0x53c/0x9c0 [mcp25xxfd]
[ 43.517402] [] irq_thread_fn+0x28/0x88
[ 43.522716] [] irq_thread+0x108/0x180
[ 43.527944] [] kthread+0x130/0x138
[ 43.532910] [] ret_from_fork+0x10/0x18
[ 43.538556] mcp25xxfd spi0.0 can0: CAN Bus error experienced
[ 43.544283] BUG: using __this_cpu_add() in preemptible [00000000] code: irq/70-mcp25xxf/3073
[ 43.552757] caller is __this_cpu_preempt_check+0x18/0x20
[ 43.558097] CPU: 3 PID: 3073 Comm: irq/70-mcp25xxf Not tainted 4.14.98-06024-gefb8424cb055-dirty raspberrypi#19
[ 43.567230] Hardware name: CompuLab SB-UCM-iMX8 board (DT)
[ 43.572716] Call trace:
[ 43.575172] [] dump_backtrace+0x0/0x3c0
[ 43.580573] [] show_stack+0x14/0x20
[ 43.585628] [] dump_stack+0x8c/0xac
[ 43.590682] [] check_preemption_disabled+0xf8/0x100
[ 43.597124] [] __this_cpu_preempt_check+0x18/0x20
[ 43.603394] [] __netif_receive_skb_core+0x98/0x9f8
[ 43.609749] [] __netif_receive_skb+0x14/0x60
[ 43.615585] [] netif_receive_skb_internal+0x28/0x118
[ 43.622114] [] netif_receive_skb+0x1c/0xe0
[ 43.627796] [] mcp25xxfd_can_int+0x53c/0x9c0 [mcp25xxfd]
[ 43.634674] [] irq_thread_fn+0x28/0x88
[ 43.639988] [] irq_thread+0x108/0x180
[ 43.645216] [] kthread+0x130/0x138
[ 43.650183] [] ret_from_fork+0x10/0x18
[ 525.908095] audit: type=1006 audit(1581600601.680:3): pid=3079 uid=0 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=2 res=1
Device tree configuration:
can0: can@0 {
compatible = "microchip,mcp2517fd";
reg = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_can0>;
interrupt-parent = <&gpio1>;
interrupts = <8 IRQ_TYPE_EDGE_FALLING>;
spi-max-frequency = <20000000>;
clocks = <&clk40m>;
};
CAN bus port configuration:
ip link set can0 type can bitrate 500000
Please let me know if additional information is needed.
Thanks,
Uri
The text was updated successfully, but these errors were encountered: