All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Holger Schurig <holgerschurig@gmail.com>,
	Torsten Lang <torsten.lang@uweschneider.de>
Cc: linux-can@vger.kernel.org, Marc Kleine-Budde <mkl@pengutronix.de>
Subject: Re: can: flexcan: implement workaround for FIFO overruns (based on code by David Jander)
Date: Thu, 09 Jul 2015 10:43:21 +0200	[thread overview]
Message-ID: <559E3429.1070507@hartkopp.net> (raw)
In-Reply-To: <CAOpc7mHJY58mYWum5KLWDzfYyABWAGf8pieZJRSzYhUm85uwUA@mail.gmail.com>

On 09.07.2015 10:06, Holger Schurig wrote:
> 2015-07-08 16:38 GMT+02:00 Torsten Lang <torsten.lang@uweschneider.de>:
>> P. S. As mentioned I have some trouble getting the kernel to work on the hardware I use.
>> The main remaining problem is that my application no longer receives the CAN messages
>> correctly with kernel 4.1 - neither with the original FlexCAN driver nor with mine. As long
>> as y Qt application uses the CAN bus alone it only receives single messages about
>> every 30..60s (actually the test messages are transmitted every 250ms). As soon
>> as I start a candump in parallel my application also receives the test messages. I
>> currently have no explanation for this behaviour.

Kernel versions 4.1-rc to 4.1.1 (included) have a problem when timestamping is 
not enabled. candump enables the timestamping in your case -> makes it work 
properly.

Please apply this stable patch to the affected 4.1 kernels:

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=36c01245eb8046c16eee6431e7dbfbb302635fa8

This fix turned out to be a bit to brutal :-)

So here's the 'nice' rework of that fix:

http://marc.info/?l=linux-can&m=143531273819705&w=2

But the first fix will fix your problem.

Regards,
Oliver



>
> I'm on stable Linux 3.18.17 and do not observe this behavior.
>
> 4.1.x migth be whacky, because I once had the serial port hang in some
> DMA related code. I "fixed" this with a
>
> +#if 0
> +       if (is_imx6q_uart(sport) && !uart_console(port) &&
> +           !sport->dma_is_inited)
> +               imx_uart_dma_init(sport);
> +#endif
>
> ... but that was certainly a hack. My $CUSTOMER promply reported my
> other things like a stopping touchscreen, GUI app not accepting input
> anymore. I was flooded with other work, I want back to savety of
> 3.18.x :-)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

      reply	other threads:[~2015-07-09  8:43 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-08 14:38 can: flexcan: implement workaround for FIFO overruns (based on code by David Jander) Torsten Lang
2015-07-09  6:33 ` Holger Schurig
2015-07-09  6:38   ` Holger Schurig
2015-07-09  9:26   ` Torsten Lang
2015-07-09  9:32     ` Holger Schurig
2015-07-09  9:36       ` Marc Kleine-Budde
2015-07-09  9:42         ` Holger Schurig
2015-07-09  6:58 ` Alexander Stein
2015-07-09  7:27   ` Holger Schurig
2015-07-09  7:48     ` Alexander Stein
2015-07-09  7:59       ` Holger Schurig
2015-07-09 10:03         ` Torsten Lang
2015-07-22  8:00         ` Torsten Lang
2015-07-22  8:57           ` Marc Kleine-Budde
2015-07-24  3:53             ` Tom Evans
2015-07-24  8:45               ` Torsten Lang
2015-07-09  7:42 ` Tom Evans
2015-07-09  9:48   ` Torsten Lang
2015-07-09 10:05     ` Holger Schurig
2015-07-09 15:36     ` Tom Evans
2015-07-10  9:17       ` Torsten Lang
2015-07-11  6:42         ` Tom Evans
2015-07-09  8:06 ` Holger Schurig
2015-07-09  8:43   ` Oliver Hartkopp [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=559E3429.1070507@hartkopp.net \
    --to=socketcan@hartkopp.net \
    --cc=holgerschurig@gmail.com \
    --cc=linux-can@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=torsten.lang@uweschneider.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.