]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
serial: tegra: fix CREAD handling for PIO
authorJohan Hovold <johan@kernel.org>
Fri, 10 Jul 2020 13:59:46 +0000 (15:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Jul 2020 08:19:56 +0000 (10:19 +0200)
commitb6727b8f25f4ee03fd33257e4ff6b64017685ab9
tree715ae4111f53cf86bb3cb22422e33e3824fe7cfe
parentfed64b9dbfbe54ccc7d8b7c72dcc06362439cd62
serial: tegra: fix CREAD handling for PIO

commit b374c562ee7ab3f3a1daf959c01868bae761571c upstream.

Commit 33ae787b74fc ("serial: tegra: add support to ignore read") added
support for dropping input in case CREAD isn't set, but for PIO the
ignore_status_mask wasn't checked until after the character had been
put in the receive buffer.

Note that the NULL tty-port test is bogus and will be removed by a
follow-on patch.

Fixes: 33ae787b74fc ("serial: tegra: add support to ignore read")
Cc: stable <stable@vger.kernel.org> # 5.4
Cc: Shardar Shariff Md <smohammed@nvidia.com>
Cc: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20200710135947.2737-2-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/serial-tegra.c