Hi Marc,

On 07/19/2011 11:03 PM, Marc Kleine-Budde wrote:
> 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.

I know and also the necessary device-tree bindings for the PowerPC P1010
are missing in the mainline version of the flexcan driver. The driver is
from Freescale's LTIB-Tree for the P1010. For some reason, the doc for
that bindings already sneaked into the mainline kernel, see my
complaints here:

https://lists.berlios.de/pipermail/socketcan-core/2011-June/005818.html

Now we have the source and are able to provide the necessary bindings. I
have still not found a Manual about the Flexcan on the P1010. Maybe
there are slight differences as well.

Wolfgang.

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

Reply via email to