On 18.07.2011 20:03, Mike Brown wrote:
> All appears fine with the vcan interface - tst_rcv_own_msgs runs with both
> echo=1 or echo=0.   I suspected this would be case, since the CAN utilities
> candump and cansend work as expected when run on the vcan interface as well.

tst_rcv_own_msgs with echo=0 is trivial and does not check the complete loop
down to the CAN netdevice and up again.

Btw. does your 'real' flexcan work now as expected?

@Marc/Sascha: I just realized the line

    dev->flags |= IFF_ECHO; /* we support local echo in hardware */

in the flexcan source at

    http://lxr.linux.no/#linux+v2.6.39/drivers/net/can/flexcan.c#L943

But do you really mean, that the sent frames are pushed into the rx queue when
the TX is complete according

http://lxr.linux.no/#linux+v2.6.39/Documentation/networking/can.txt#L580

???

The tx complete interrupt in flexcan.c

http://lxr.linux.no/#linux+v2.6.39/drivers/net/can/flexcan.c#L585

does not do anything with can_[put|get|free]_echo_skb() ?!?

When the sent CAN frames are not pushed into the rx queue on successful
transmit IFF_ECHO must not be set in the device flags.

This mechanic does not really stick together with CAN_CTRLMODE_LOOPBACK

    http://lxr.linux.no/#linux+v2.6.39/drivers/net/can/flexcan.c#L619

as nothing is sent onto the bus, when CAN_CTRLMODE_LOOPBACK is enabled.

Regards,
Oliver
_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users

Reply via email to