Hi,

On Sun, Jan 31, 2010 at 11:03 PM, Paul Thomas <[email protected]> wrote:
> I've been using the mcp251x driver, and I'm getting a "write: No buffer
> space available" error. That is what cansend prints after I get into this
> state. I have a user space program that is reading and writing about 20 time
> a second.
>

this may mean that somehow the tx queue is stopped and not restarted.
I never seen this even under heavy traffic and bus disconneting /
short-circuiting. If this happened only with new versions it could
mean that the the elimination of the MERR interrupt could cause
problems but you said you see it even with the old version (just check
that in the old version you are using there is MERR handled in the
interrupt workqueue and activated in mcp251x_set_normal_mode).

Do you continue to see this problem if you stop all the programs that
write to CAN and just do a "cansend can0 123#abcd"? The other end
isn't receiving packets (I mean there is no activity on the CAN bus)?
Is there a flow of packetes the other way or it's stopped to?

>
> Is there some way to purge/flush the buffer? Is there some other work around
> sort of reloading the module?
>

well let's fix it and not work around it! ;-) Can you give me some
more information about the state of when this happens? For example,
can statistics:

cat /sys/bus/spi/drivers/mcp251x/spi0.?/net\:can0/statistics/*

and what ip thinks of interface status:

ip -details -statistics link show can0

Another thing that can give such kind of problems is interrupt wiring:
aren't you sharing interrupts, are you?

Can you try if triggering a bus-off condition takes you out of this
situation? I mean just short-circuit the CAN bus, the ip command above
will say you "can state BUS-OFF" and the you can do "ip link set can0
type can restart". What is strange is that you say that disconnecting
and reconnecting the bus works: the bus should go in ERROR PASSIVE
state and there is no netif_wake_queue when coming back from it.

Thanks for your help.

-- 
Christian Pellegrin, see http://www.evolware.org/chri/
"Real Programmers don't play tennis, or any other sport which requires
you to change clothes. Mountain climbing is OK, and Real Programmers
wear their climbing boots to work in case a mountain should suddenly
spring up in the middle of the computer room."
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core

Reply via email to