On 05/31/2010 05:29 PM, Navaneethan P wrote:
> Hi Oliver and Wolfgang,
> 
> Sorry for late reply. 
> 
>> The normal loopback is done in software by setting IFF_ECHO and handling
>> echo skb's appropriately. can_put_echo_skb() should be called in the
>> xmit function and can_get_echo_skb() when the TX is done (normally when
>> the TX done interrupt occurs). This seems not be implemented in your
>> driver.
> 
> If I enable, can_get_echo_skb and can_pet_echo_skb, irrespective of the 
> CAN_RAW_RECV_OWN_MSG, sent frames are looped back.
> Is this because I set the IFF_ECHO in my driver?

Setting IFF_ECHO means that the driver is doing the loopback via
can_get/put_echo_skb.

> Can you please make me understand this issue?

If you don't set it (and don't use can_get/put_echo_skb), the upper
layer will do the loopback for you. See:

http://lxr.linux.no/#linux+v2.6.34/net/can/af_can.c#L248

> CAN_RAW_RECV_OWN_MSGS may not be frequently used. but it has to be 
> supported by the CAN driver as per the can documentation section 4.1.3. 
> right?
> 
> Has any body tested CAN_RAW_RECV_OWN_MSGS on linux kernel 2.6.31?or is it 
> the problem with my driver. 

Does it work if you *unset* IFF_ECHO and do *not* use can_get/put_echo_skb?

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

Reply via email to