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>
Tue, 21 Jul 2020 18:58:25 +0000 (20:58 +0200)
commitb374c562ee7ab3f3a1daf959c01868bae761571c
tree5b7311f2e9936ab074efb6f2dfa6e6cb5780c46b
parent22a82fa7d6c3e16d56a036b1fa697a39b954adf0
serial: tegra: fix CREAD handling for PIO

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