We're using kernel 2.6.28 on an at91sam9g20ek derived board that has an
mcp2515 card on it. We've compiled the mcp251x driver successfully, and
can load it as follows:
modprobe atmel_spi
(this loads the mcp251x driver too)
modprobe can-raw
We then do:
printf 125000 > /sys/class/net/can0/can_bittiming/bitrate
ifconfig can0 up
and the can0 interface appears. However, when running the can test
program supplied at http://en.wikipedia.org/wiki/SocketCAN, we get the
following output, after which the board resets:
------------[ cut here ]------------
WARNING: at net/sched/sch_generic.c:226 dev_watchdog+0x168/0x258()
NETDEV WATCHDOG: can0 (mcp251x): transmit timed out
Modules linked in: can_raw can mcp251x can_dev atmel_spi ipt_MASQUERADE
iptable_filter iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4
envoydriver_lcd envoydriver_binary envoydriver_adc at24
[<c0245ca0>] (dump_stack+0x0/0x14) from [<c003c244>]
(warn_slowpath+0x5c/0x78)
[<c003c1e8>] (warn_slowpath+0x0/0x78) from [<c01dd3f4>]
(dev_watchdog+0x168/0x258)
r3:c3bc8000 r2:c02cfbe8
r6:c3bc8000 r5:c3a420cc r4:c06aede8
[<c01dd28c>] (dev_watchdog+0x0/0x258) from [<c0045ec4>]
(run_timer_softirq+0x174/0x200)
[<c0045d50>] (run_timer_softirq+0x0/0x200) from [<c004156c>]
(__do_softirq+0x7c/0x13c)
[<c00414f0>] (__do_softirq+0x0/0x13c) from [<c0041684>] (irq_exit+0x58/0x98)
[<c004162c>] (irq_exit+0x0/0x98) from [<c0029074>]
(__exception_text_start+0x74/0x90)
r4:00000013
[<c0029000>] (__exception_text_start+0x0/0x90) from [<c0029a78>]
(__irq_svc+0x38/0x80)
Exception stack(0xc2e31d78 to 0xc2e31dc0)
1d60: 00000001
c03ce138
1d80: 00000008 00005e0a c2d80608 60000013 c2e31e80 c2d80608 c2d80000
c3bc8570
1da0: ffffffff c2e31dd4 00000199 c2e31dc0 c005f608 c0248ab0 20000013
ffffffff
r5:fefff000 r4:ffffffff
[<c0248a68>] (_spin_unlock_irqrestore+0x0/0x4c) from [<bf044a98>]
(atmel_spi_transfer+0x1d4/0x1fc [atmel_spi])
r5:60000013 r4:c2e31e64
[<bf0448c4>] (atmel_spi_transfer+0x0/0x1fc [atmel_spi]) from
[<c0183dac>] (spi_sync+0x90/0xb8)
[<c0183d1c>] (spi_sync+0x0/0xb8) from [<bf054304>]
(mcp251x_read_reg+0xc0/0xe8 [mcp251x])
r8:c3bc84a0 r7:0000002d r6:c2e873c0 r5:c2e87b00 r4:00000003
[<bf054244>] (mcp251x_read_reg+0x0/0xe8 [mcp251x]) from [<bf054fb4>]
(mcp251x_irq_work_handler+0x284/0x4a8 [mcp251x])
[<bf054d30>] (mcp251x_irq_work_handler+0x0/0x4a8 [mcp251x]) from
[<c004d3e0>] (run_workqueue+0x11c/0x208)
[<c004d2c4>] (run_workqueue+0x0/0x208) from [<c004d8d4>]
(worker_thread+0x108/0x11c)
[<c004d7cc>] (worker_thread+0x0/0x11c) from [<c0051688>] (kthread+0x5c/0x94)
r8:00000000 r7:00000000 r6:c004d7cc r5:c2c0dd80 r4:c2e30000
[<c005162c>] (kthread+0x0/0x94) from [<c003f3c8>] (do_exit+0x0/0x700)
r6:00000000 r5:00000000 r4:00000000
---[ end trace 5d5682685acfc407 ]---
mcp251x spi0.0: timeout in txing a packet, restarting
Does anyone have any idea why this might be? We were wondering if we
needed to use a later kernel (easier said than done using openembedded)
or an earlier version of socketcan (we're using the one in trunk)?
Thanks,
Nick
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core