All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: Grant Edwards <grant.b.edwards@gmail.com>, linux-serial@vger.kernel.org
Subject: Re: tcflow(TCOON/TCOOFF) vs. received XON/XOFF characters
Date: Thu, 17 Jul 2014 09:09:47 -0400	[thread overview]
Message-ID: <53C7CB1B.3010804@hurleysoftware.com> (raw)
In-Reply-To: <lq6c9q$isi$1@ger.gmane.org>

On 07/16/2014 01:20 PM, Grant Edwards wrote:
> I'm working on the regression test appliction I use to test the serial
> drivers I maintain, and I've run into a problem with interaction
> between tcflow(TCOON/TCOOFF) and XON/XOFF using bog-standard 16x50
> UARTs and the normal in-kernel driver.
>
> When I call tcflow(TCOOFF) on a tty device and then write data to that
> tty device, the data isn't sent. That's what I expect. But, when an
> XON is then received by that port, it does not start the tx data.
>
> Conversly, when a serial port receives an XOFF, it stops sending
> data as it should, but a subsequent call to tcflow(TCOON) does not
> casue it to start sending data.
>
> Am I misunderstanding how tcflow(TCOxxx) is supposed to interact with
> XON/XOFF flow control?
>
> Or is something broken in the tty layer or uart driver?

tcflow(TCOxxx) flow control is independent of IXON flow control.
The union of both flow states determines if the tty can output;

                      IXON = true        IXON = false
                   START       STOP
tcflow(TCOON)      on         off          on
tcflow(TCOOFF)     off        off          off

Regards,
Peter Hurley

PS - The various flow states are not SMP-safe. I'm working to correct that.

  reply	other threads:[~2014-07-17 13:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-16 17:20 tcflow(TCOON/TCOOFF) vs. received XON/XOFF characters Grant Edwards
2014-07-17 13:09 ` Peter Hurley [this message]
2014-07-17 14:03   ` Grant Edwards
2014-07-17 18:18     ` Peter Hurley

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=53C7CB1B.3010804@hurleysoftware.com \
    --to=peter@hurleysoftware.com \
    --cc=grant.b.edwards@gmail.com \
    --cc=linux-serial@vger.kernel.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.