linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [mcp251x - spi] Blocked to "wait_for_completion"
@ 2012-12-06 11:22 Mylene Josserand
  2012-12-06 11:49 ` Marc Kleine-Budde
  0 siblings, 1 reply; 5+ messages in thread
From: Mylene Josserand @ 2012-12-06 11:22 UTC (permalink / raw)
  To: linux-can

Hi everyone,


I am new to this mailing list so I hope I am writing to the good section. 
It is the first time I use CAN protocol so I am a newbie !
I am currently working on CAN with the driver MCP251x for my company.

For some reasons, my company have the kernel 2.6.32.59 version. The MCP251x driver have been backported from the Linux version 2.6.34.
I am testing it but only for reading purpose. So I have a set-up to send CAN frame (in another computer) and received them with candump (this is what I want).


When I send CAN frames every 20 ms, the CAN interface seems to be blocked after 1-2 minutes (sometimes 5 minutes) of reading. In fact, the candump stop showing CAN messages and I can not act anymore on it. 
If I increase the interval time between frames (100 msec), the time before being blocked is around 30-40 minutes. And if it is every 1 sec, it is after 13 hours !

I have made some debugging traces on the driver and I saw that the problem is in the call of "spi_sync" function (in the "mcp251x_spi_trans" function).
I have done the same on the "spi.c" and I saw that the spi is blocked by the "wait_for_completion" function. What is it waiting for ?
With some readings, I saw that this function is not stoppable so it is normal that the function is blocked. But I did not understand why it is blocking in this function only after some times.

Can you have some explanation of this problem ? Have you already seen that before ?
How solve it ? Update the kernel to new version ? (If you have new version, could you test it please ?)
I have seen that some new kernel version (3.0.53 and upper) have some update on this spi_sync function. Is this going to fix this problem or not ?


Thank you in advance for any help !


PS : I had an Undelivered response. I did not know if my email has been sent so I send it a 2nd time. Sorry for potential spam !


Best regards,


Mylene JOSSERAND

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-12-07  7:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-06 11:22 [mcp251x - spi] Blocked to "wait_for_completion" Mylene Josserand
2012-12-06 11:49 ` Marc Kleine-Budde
2012-12-06 13:43   ` Mylene Josserand
2012-12-06 14:21     ` Marc Kleine-Budde
2012-12-07  7:28       ` Mylene Josserand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).