serial: stm32: fix rx error handling
authorErwan Le Ray <erwan.leray@st.com>
Tue, 21 May 2019 15:45:42 +0000 (17:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 May 2019 07:58:28 +0000 (09:58 +0200)
commit4f01d833fdcdd6f9b85d9e5d5d7568eb683626a7
tree0fdd202a46cccc09fa2a6c2b2d929b7055a80c0a
parentc8a9d043947b4acb19a65f7fac2bd0893e581cd5
serial: stm32: fix rx error handling

- Fixes parity and framing error bit by clearing parity and framing error
  flag. The current implementation doesn't clear the error bits when an
  error is detected.
- Fixes the incorrect name of framing error clearing flag in header file.
- Fixes misalignement between data frame and errors status. The status
  read for "n" frame was the status of "n+1" frame".
- Fixes break detection was not triggered by the expected register.

Fixes: 48a6092fb41f ("serial: stm32-usart: Add STM32 USART Driver")
Signed-off-by: Erwan Le Ray <erwan.leray@st.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/stm32-usart.c
drivers/tty/serial/stm32-usart.h