On Wed, 21 Jan 2015 10:33:19 +0000, Andri Yngvason
[off-list ref] wrote:
Quoting Ahmed S. Darwish (2015-01-20 21:45:37)
quoted
From: Ahmed S. Darwish <redacted>
Replace most of the can interface's state and error counters
handling with the new can-dev can_change_state() mechanism.
Suggested-by: Andri Yngvason <redacted>
Signed-off-by: Ahmed S. Darwish <redacted>
---
drivers/net/can/usb/kvaser_usb.c | 114
+++++++++++++++++++--------------------
1 file changed, 55 insertions(+), 59 deletions(-)
diff --git a/drivers/net/can/usb/kvaser_usb.c
b/drivers/net/can/usb/kvaser_usb.c
index 971c5f9..0386d3f 100644
--- a/drivers/net/can/usb/kvaser_usb.c
+++ b/drivers/net/can/usb/kvaser_usb.c
...
Looks good.
Would be nice to see some "candump" traces as well. Ahmed, could you
please generate such traces doing:
1. Execute in a session:
# candump -t d -e any,0:0,#FFFFFFFF
2. Execute in another session:
# cangen -g 10 -D i can0
3. Disconnect the CAN cable
4. After a while reconnect the CAN cable
5. Stop candump and save the trace.
and to test bus-off:
1. Execute in a session:
# candump -t d -e any,0:0,#FFFFFFFF
2. Execute in another session:
# cangen -g 10 -D i can0
3. Short-circuit the CAN low and high wires of the CAN cable
4. After a while remove the short-circuit.
5. Stop candump and save the trace.
Thanks,
Wolfgang.