serial: xuartps: Rewrite the interrupt handling logic
authorAnirudha Sarangi <anirudha.sarangi@xilinx.com>
Thu, 22 Sep 2016 15:58:14 +0000 (16:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Sep 2016 10:54:41 +0000 (12:54 +0200)
commitc8dbdc842d30618e4f7e315e3b0e6c43de7915f3
tree7443792c2619eb219f720948ca3c45e64ac5d88d
parent8e5481d98bbf1de0ff06a3e488b668572d578e61
serial: xuartps: Rewrite the interrupt handling logic

The existing interrupt handling logic has following issues.
- Upon a parity error with default configuration, the control
  never comes out of the ISR thereby hanging Linux.
- The error handling logic around framing and parity error are buggy.
  There are chances that the errors will never be captured.
This patch ensures that the status registers are cleared on all cases so
that a hang situation never arises.

Signed-off-by: Anirudha Sarangi <anirudh@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
[stelford@cadence.com: cherry picked from
https://github.com/Xilinx/linux-xlnx commit
ac297e20d399850d7a8e373b6eccf2e183c15165 with manual conflict resolution]
Signed-off-by: Scott Telford <stelford@cadence.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/xilinx_uartps.c