Re: [PATCH] can: add Renesas R-Car CAN driver
From: Sergei Shtylyov <hidden>
Date: 2013-11-12 20:45:28
Also in:
linux-can, linux-sh
Hello. On 11/09/2013 04:02 AM, Sergei Shtylyov wrote:
quoted
quoted
quoted
2. ... with short-circuited CAN high and low and doing some time later a manual recovery with "ip link set can0 type can restart"
quoted
quoted
Now we have auto recovery only. Manual recovery was tested with the first driver version and worked.
quoted
What do you mean with "auto recovery"? Auto recovery by the hardware or via "restart-ms <ms>"? How do you choose between "manual" and "auto" recovery?
This exact test was done with hardware auto-recovery only. No "restart-ms" was programmed.
quoted
quoted
Terminal 1:
quoted
quoted
root@10.0.0.104:/opt/can-utils# ./cangen -n 1 -g 1 can0 root@10.0.0.104:/opt/can-utils# ./cangen -n 1 -g 1 can0 root@10.0.0.104:/opt/can-utils# ./cangen -n 1 -g 1 can0 root@10.0.0.104:/opt/can-utils#
quoted
quoted
Terminal 2:
quoted
quoted
root@10.0.0.104:/opt/can-utils# ./candump -td -e any,0:0,#FFFFFFFF (000.000000) can0 2000008C [8] 00 00 08 00 00 00 00 00 ERRORFRAME controller-problem{} protocol-violation{{tx-dominant-bit-error}{}} bus-error (000.021147) can0 20000144 [8] 00 00 00 00 00 00 00 00 ERRORFRAME controller-problem{} bus-off restarted-after-bus-off
quoted
Why does it get "restarted" directly after the bus-off?
Because we have hardware auto-recovery enabled.
quoted
quoted
(011.738522) can0 2000008C [8] 00 00 08 00 00 00 00 00 ERRORFRAME controller-problem{}
quoted
What controller problem? data[1] is not set for some reasom.
Not comments. Looking into it.
Sorry, this has been fixed a while ago. Now the log looks like:
root@10.0.0.104:/opt/can-utils# ./candump -td -e any,0:0,#FFFFFFFF
(000.000000) can0 2000008C [8] 00 28 08 00 00 00 88 00 ERRORFRAME
controller-problem{tx-error-warning,tx-error-passive}
protocol-violation{{tx-dominant-bit-error}{}}
bus-error
error-counter-tx-rx{{136}{0}}
(000.007578) can0 20000040 [8] 00 00 00 00 00 00 00 00 ERRORFRAME
bus-off
(000.091847) can0 20000100 [8] 00 00 00 00 00 00 00 00 ERRORFRAME
restarted-after-bus-off
(056.136722) can0 2000008C [8] 00 28 08 00 00 00 88 00 ERRORFRAME
controller-problem{tx-error-warning,tx-error-passive}
protocol-violation{{tx-dominant-bit-error}{}}
bus-error
error-counter-tx-rx{{136}{0}}
quoted
quoted
dmesg: rcar_can rcar_can.0 can0: Error warning interrupt rcar_can rcar_can.0 can0: Error passive interrupt rcar_can rcar_can.0 can0: Bus error interrupt: rcar_can rcar_can.0 can0: Bit Error (dominant) rcar_can rcar_can.0 can0: Error warning interrupt rcar_can rcar_can.0 can0: Error passive interrupt
quoted
Why are they reported again. You are already in error passive.
Don't know. :-/
This also has been dealt with. Here's an example:
rcar_can rcar_can.0 can0: Bus error interrupt:
rcar_can rcar_can.0 can0: ACK Error
rcar_can rcar_can.0 can0: Error warning interrupt
rcar_can rcar_can.0 can0: Bus error interrupt:
rcar_can rcar_can.0 can0: ACK Error
rcar_can rcar_can.0 can0: Error passive interrupt
WBR, Sergei