> Hello,

> On 08/02/2010 10:26 PM, Michael Stocks wrote:
>> Goodday All,
>> Could anyone help with this problem.
>>
>> I have socketcan built as part of my kernel 2.6.34 configuration using 
>> MCP251x driver (mainline).
>> The receive works perfectly using my own application and candump.
>>
>> When transmitting both my own application and cansend fail with 'no buffer 
>> space' errors.
>> Using a CAN bus monitor I never see any activity when I transmit.
>
> Does "candump any,0:0,#FFFFFFFF" report any problems?

No, the above works fine.

>> So I guess something is stopping the transmitted frame getting beyond the 
>> socket buffer, hence the error.

> Yes, 'no buffer space' means that the TX queue is full. This may happen
> and you should therefore check the return value of the send() call and
> retry if "errno==ENOBUFS". Nevertheless, messages should still go out to
> the bus.

I've found that after one or more sends (which don't get to the bus) an 
'ifconfig can0 down' will flush the first unsent message onto the bus, all 
other unsent messages are lost.

>> Using the same hardware with my previous image, kernel 2.6.30 using out of 
>> kernel (svn) socketcan everything works.
>> Using vcan instead of real hardware everything thing works OK.

> Unfortunately, the mainline driver is different to the one in the SVN
> repository, e.g. it uses an irq thread instead of a work queue and
> further optimizations.
>

I'll try the SVN driver to see if I get different behaviour.

>> I did a trawl of the net before posting and found a similar thread in the 
>> socketcan-core forum but there was no conclusion.

> Yes, related problems with that driver have been reported recently and a
> patch was posted to fix them, IIRC. Unfortunately, I don't have a
> MPC251x hardware at hand for testing.

I'll see if I can find the patch and give that a go as well.
I need to solve this problem so any other hints or ideas would be welcome.

> Wolfgang.

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

Reply via email to