From: Marc Zyngier <marc.zyngier@arm.com>
To: Russell King - ARM Linux <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Gregory CLEMENT <gregory.clement@free-electrons.com>,
Allen Yan <yanwei@marvell.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Miquel Raynal <miquel.raynal@free-electrons.com>
Subject: Re: [PATCH] serial: mvebu-uart: Fix local flags handling on termios update
Date: Sun, 22 Apr 2018 18:07:28 +0100 [thread overview]
Message-ID: <20180422180728.42d7b354@why.wild-wind.fr.eu.org> (raw)
In-Reply-To: <20180422155515.GC16141@n2100.armlinux.org.uk>
On Sun, 22 Apr 2018 16:55:16 +0100
Russell King - ARM Linux <linux@armlinux.org.uk> wrote:
> On Sun, Apr 22, 2018 at 01:33:46PM +0100, Marc Zyngier wrote:
> > Commit 68a0db1d7da2 reworked the baud rate selection, but also added
> > a (not so) subtle change in the way the local flags (c_lflag in the
> > termios structure) are handled, forcing the new flags to always be the
> > same as the old ones.
> >
> > The reason for that particular change is both obscure and undocumented.
> > It also completely breaks userspace. Something as trivial as getty is
> > unusable:
> >
> > <example>
> > Debian GNU/Linux 9 sy-borg ttyMV0
> >
> > sy-borg login: root
> > root
> > [timeout]
> >
> > Debian GNU/Linux 9 sy-borg ttyMV0
> > </example>
> >
> > which is quite obvious in retrospect: getty cannot get in control of
> > the echo mode, is stuck in canonical mode, and times out without ever
> > seeing anything valid. It also begs the question of how this change was
> > ever tested.
> >
> > The fix is pretty obvious: stop messing with c_lflag, and the world
> > will be a happier place.
>
> The c_iflag code also looks suspicious as well. Apparently, the driver
> only supports INPCK and IGNPAR, but things such as ISTRIP, INLCR, IGNCR,
> ICRNL, IUCLC, IMAXBEL and IUTF8 are all software things done by the TTY
> layer and have nothing to do with the driver.
Indeed. I stuck with the most glaring issue (well, the one that
prevented me from using this particular box), but the whole termios
massaging is quite odd. Someone with a good understanding of the
intricacies of the TTY layer should definitely have a look at this.
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2018-04-22 17:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-22 12:33 Marc Zyngier
2018-04-22 15:55 ` Russell King - ARM Linux
2018-04-22 17:07 ` Marc Zyngier [this message]
2018-04-22 19:58 ` Russell King - ARM Linux
2018-04-23 15:04 ` Russell King - ARM Linux
2018-04-23 17:39 ` Russell King - ARM Linux
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=20180422180728.42d7b354@why.wild-wind.fr.eu.org \
--to=marc.zyngier@arm.com \
--cc=gregkh@linuxfoundation.org \
--cc=gregory.clement@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=miquel.raynal@free-electrons.com \
--cc=yanwei@marvell.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
all inboxes | Powered by JetHome®