All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Freyder <steve@freyder.net>
To: C Smith <csmithquestions@gmail.com>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: rt_dev_send() stalls periodic task
Date: Mon, 22 Apr 2019 18:44:17 -0500	[thread overview]
Message-ID: <5CBE51D1.80801@freyder.net> (raw)
In-Reply-To: <CA+K1mPHu1d3dbDdTLdgutBmbFV72PGLXS-H0c9MUc6XfypsXyw@mail.gmail.com>

On 4/22/2019 5:56 PM, C Smith wrote:
> Please don't think the cross-link.c app config has the magic answer. 
> Changing RX timeouts to prevent TX stalls would be an open loop hack 
> that might fail the serial traffic jitters differently.   The most 
> suspicious difference between the two apps is that : cross-link.c 
> behaves very regularly in terms of timing, because it receives its own 
> transmissions.   My app receives packets from another computer 
> asynchronously (full duplex). So there is likely a random timing 
> anomaly causing the problem.  Any properly working UART and driver 
> should be able to handle this, National Semiconductor would say. But I 
> have a strange serial port, and it is tricking the xeno_16550A driver.
>
> Jan alluded to a buffer-filling race condition in his comment.
> I also fear that Receive interrupt handlers are somehow clearing 
> Transmit interrupts?
>
> I didn't look at the stack trace when my app hung at startup due to 
> that infinite RX config. BTW there was no serial traffic whatsover 
> during this hang. I could try it again and look at the stack...
> Also, it would be too hard to rewrite my apps to send single bytes. 
> Its two computers, rigid packet protocols & CRCs etc. Lots and lots of 
> code. Thats why I did that test app.
>
> -C Smith
Anything that can prove that there's no hardware problem causing
lost TX interrupts is good.  I remember you said that you had three
serial ports, and one never failed like this, the other two *do*
fail like this.  Isn't that true?  That seems important.


  reply	other threads:[~2019-04-22 23:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-15 17:28 rt_dev_send() stalls periodic task C Smith
2019-04-16  8:03 ` Jan Kiszka
2019-04-18  6:42   ` C Smith
2019-04-18  8:36     ` Jan Kiszka
2019-04-21  4:33       ` C Smith
2019-04-21 20:10         ` Steve Freyder
2019-04-22  6:40           ` C Smith
2019-04-22  6:45             ` Jan Kiszka
2019-04-22 19:51               ` Steve Freyder
2019-04-22 20:58                 ` Steve Freyder
2019-04-22 22:56                   ` C Smith
2019-04-22 23:44                     ` Steve Freyder [this message]
2019-04-23 12:15               ` Jan Kiszka
2019-04-24  6:53                 ` C Smith
2019-04-25  7:15                 ` C Smith
2019-04-25  8:23                   ` Jan Kiszka
2019-04-26  0:59                     ` C Smith
2019-04-26 16:38                       ` Jan Kiszka
2019-04-24 13:05 Jeff Webb
2019-04-24 14:36 ` Jan Kiszka
2019-04-26  0:41   ` Jeff Webb

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=5CBE51D1.80801@freyder.net \
    --to=steve@freyder.net \
    --cc=csmithquestions@gmail.com \
    --cc=xenomai@xenomai.org \
    /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.