From: Okash Khawaja <okash.khawaja@gmail.com>
To: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Samuel Thibault <samuel.thibault@ens-lyon.org>,
linux-kernel@vger.kernel.org, William Hubbs <w.d.hubbs@gmail.com>,
Chris Brannon <chris@the-brannons.com>,
Kirk Reiser <kirk@reisers.ca>,
speakup@linux-speakup.org, devel@driverdev.osuosl.org,
John Covici <covici@ccs.covici.com>
Subject: Re: [patch 1/1] staging: speakup: flush tty buffers and ensure hardware flow control
Date: Fri, 12 May 2017 20:35:18 +0100 [thread overview]
Message-ID: <20170512193518.GA25825@sanghar> (raw)
In-Reply-To: <20170511143314.590cb399@alans-desktop>
On Thu, May 11, 2017 at 02:33:14PM +0100, Alan Cox wrote:
> On Thu, 11 May 2017 09:29:14 +0100
> Okash Khawaja <okash.khawaja@gmail.com> wrote:
>
> > Hi Alan,
> >
> > On Wed, May 10, 2017 at 08:41:51PM +0100, Alan Cox wrote:
> > > > + if (!(tmp_termios.c_cflag & CRTSCTS)) {
> > > > + tmp_termios.c_cflag |= CRTSCTS;
> > > > + ret = tty_set_termios(tty, &tmp_termios);
> > > > + if (ret)
> > > > + pr_warn("speakup: Failed to set hardware flow control\n");
> > >
> > > You should check the tty c_cflag after the call rather than rely on an
> > > error code. Strictly speaking tty_set_termios should error if no tty bits
> > > are changed by the request but it never has on Linux. Instead check the
> > > tty gave you the result you wanted.
> > Thanks. I will replace the check for return value with check for c_cflag.
> >
> > May be we should fix this in tty_set_termios?
>
> Possibly. It however changes the external kernel ABI. It's also not a
> simple memcmp because any undefined bits must be ignored.
>
> Make a patch, try it and see what breaks ? If nothing breaks then yes it
> makes sense IMHO too.
Right, thanks for the heads up. I'll see if I get round to doing it. For
external kernel ABI, will we need to check libc implementations of
termios functions? Will that be sufficient?
Thanks,
Okash
next prev parent reply other threads:[~2017-05-12 19:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-09 12:40 [patch 0/1] staging: speakup: flush tty buffers and ensure hardware flow control okash.khawaja
2017-05-09 12:40 ` [patch 1/1] " okash.khawaja
2017-05-10 19:41 ` Alan Cox
2017-05-11 8:29 ` Okash Khawaja
2017-05-11 13:33 ` Alan Cox
2017-05-12 19:35 ` Okash Khawaja [this message]
2017-05-12 20:18 ` Alan Cox
2017-05-12 19:43 ` [patch v2 " Okash Khawaja
2017-05-15 10:45 ` Greg Kroah-Hartman
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=20170512193518.GA25825@sanghar \
--to=okash.khawaja@gmail.com \
--cc=chris@the-brannons.com \
--cc=covici@ccs.covici.com \
--cc=devel@driverdev.osuosl.org \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=gregkh@linuxfoundation.org \
--cc=kirk@reisers.ca \
--cc=linux-kernel@vger.kernel.org \
--cc=samuel.thibault@ens-lyon.org \
--cc=speakup@linux-speakup.org \
--cc=w.d.hubbs@gmail.com \
/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 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).