linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* can: flexcan: problems with bus error reporting om i.MX53
@ 2014-07-25 18:16 Matthias Klein
  2014-07-25 19:04 ` Sebastian Andrzej Siewior
  2014-07-28  6:34 ` Matthias Klein
  0 siblings, 2 replies; 3+ messages in thread
From: Matthias Klein @ 2014-07-25 18:16 UTC (permalink / raw)
  To: wg, mkl, linux-can, support; +Cc: Sebastian Siewior

Hi all,

we had the following problems when we enabled bus error reporting on an 
i.MX537 (Ka-Ro TX53-8130):
- interrupt flooding when sending a packet on an open bus
- bus state change notifications did not work properly
- second bus state change after bus recovery was not properly notified

The patches in the next mails fix all these problems and are tested 
against mainline linux 3.12.24-rt38 with PREEMPT_RT patch.

Best regards,
Matthias Klein


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

* Re: can: flexcan: problems with bus error reporting om i.MX53
  2014-07-25 18:16 can: flexcan: problems with bus error reporting om i.MX53 Matthias Klein
@ 2014-07-25 19:04 ` Sebastian Andrzej Siewior
  2014-07-28  6:34 ` Matthias Klein
  1 sibling, 0 replies; 3+ messages in thread
From: Sebastian Andrzej Siewior @ 2014-07-25 19:04 UTC (permalink / raw)
  To: Matthias Klein; +Cc: wg, mkl, linux-can, support

* Matthias Klein | 2014-07-25 20:16:34 [+0200]:

>Hi all,
>
>we had the following problems when we enabled bus error reporting on
>an i.MX537 (Ka-Ro TX53-8130):
>- interrupt flooding when sending a packet on an open bus

This happens because
#1 the ISR always returns that it handled the interrupt even if it did
   nothing
#2 on error the interrupt source remains asserted on an open CAN bus as
   long as the CAN bus is open. This was verified on iMX53 (which has
   FLEXCAN_HAS_BROKEN_ERR_STATE) and imx6q

>- bus state change notifications did not work properly
The error-passive -> error warning transition was not reported to
userland, #3

>- second bus state change after bus recovery was not properly notified
The second transition from error-passive to error-warning does not work
properly. By second is meant a transition while the error counter >0
(in test scenarion  120 < x < 128). After the BUS was closed, the CAN
controller was able to send packages (they were received) but the
internal state said passive mode and the error counter was >128 and
decrementing with each can message sent.
New #4.

>Best regards,
>Matthias Klein

Sebastian

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

* Re: can: flexcan: problems with bus error reporting om i.MX53
  2014-07-25 18:16 can: flexcan: problems with bus error reporting om i.MX53 Matthias Klein
  2014-07-25 19:04 ` Sebastian Andrzej Siewior
@ 2014-07-28  6:34 ` Matthias Klein
  1 sibling, 0 replies; 3+ messages in thread
From: Matthias Klein @ 2014-07-28  6:34 UTC (permalink / raw)
  To: wg, mkl, linux-can, support; +Cc: Sebastian Siewior

For the sake of completeness I have reworked the patch based on:

b1aa1c7 can: flexcan: fix transition from and to freeze mode
                           in chip_{,un}freeze


If I find some spare time will have a look into the "can: berr_limit 
support" series [1].

[1] http://comments.gmane.org/gmane.linux.can/4070


Best regards,
Matthias Klein


Am 25.07.2014 20:16, schrieb Matthias Klein:
> Hi all,
>
> we had the following problems when we enabled bus error reporting on 
> an i.MX537 (Ka-Ro TX53-8130):
> - interrupt flooding when sending a packet on an open bus
> - bus state change notifications did not work properly
> - second bus state change after bus recovery was not properly notified
>
> The patches in the next mails fix all these problems and are tested 
> against mainline linux 3.12.24-rt38 with PREEMPT_RT patch.
>
> Best regards,
> Matthias Klein
>


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

end of thread, other threads:[~2014-07-28  6:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-25 18:16 can: flexcan: problems with bus error reporting om i.MX53 Matthias Klein
2014-07-25 19:04 ` Sebastian Andrzej Siewior
2014-07-28  6:34 ` Matthias Klein

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).