On 07/19/2011 09:03 PM, Wolfgang Grandegger wrote:
> Hi Mike,
> 
> On 07/19/2011 07:58 PM, Mike Brown wrote:
>> On 07/19/2011 11:39 AM, Oliver Hartkopp wrote:
>>> On 19.07.2011 18:18, Mike Brown wrote:
>>>> On 07/19/2011 10:40 AM, Oliver Hartkopp wrote:
>>>>> On 19.07.2011 17:35, Mike Brown wrote:
>>>>>> On 07/19/2011 09:51 AM, Oliver Hartkopp wrote:
>>>>>>> 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.
>>>>>> I didn't dig this deep into the flexcan driver but did got deep
>>>>>> enough to see
>>>>>> this flag being set as well.  If read the SocketCAN documentation
>>>>>> correctly,
>>>>>> then if the driver doesn't set this flag then the PF_CAN layer
>>>>>> should handle
>>>>>> the loopback???   I'm trying to get a build with the flag cleared
>>>>>> in flexcan.c
>>>>> Yes - that's a good test!
>>>>>
>>>>> Feedback is appreciated :-)
>>>> Clearing the IFF_ECHO flag in flexcan.c fixes the problem.  I can now
>>>> run
>>>> cansend and candump on the same CAN interface.
>>>>
>>>> # candump -a can0,0:0
>>>>    can0    1  [1] 48                        'H'
>>>>
>>>> # cansend can0 001#48
>>>> #
>>>>
>>>> Safe to assume that the flexcan driver doesn't support loopback as
>>>> described
>>>> then?
>>>>
>>>> http://lxr.linux.no/#linux+v2.6.39/Documentation/networking/can.txt#L580
>>> Yes. Sigh.
>>>
>>> So this can be temporarily fixed by removing the line which sets
>>> IFF_ECHO ...
>>> but of course should be fixed by implementing the can_echo_skb stuff.
>>>
>>> Thanks for testing!
>>>
>>> I enhanced the mail subject to wake up the maintainers ;-)
> 
> Mike, could you please post your version of flexcan.c. It's not the one
> from mainline I suspect.

The arm flexcan has been introduced with commit
git describe e955cead031177b083fbf18d04a03c06e330a439 --contains
v2.6.36-rc1~571^2~139

Which means 2.6.36-rc1 was the first kernel containing the driver
working on arm.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to