aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/stm32-usart.h
diff options
context:
space:
mode:
authorErwan Le Ray <erwan.leray@st.com>2019-05-21 17:45:43 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-24 09:58:29 +0200
commit6c5962f30bce147b1c83869085f3ddde3b34c9e3 (patch)
tree271cb4b5f46d1756134c5fd5a6894b9b35aa5691 /drivers/tty/serial/stm32-usart.h
parent4f01d833fdcdd6f9b85d9e5d5d7568eb683626a7 (diff)
downloadlinux-6c5962f30bce147b1c83869085f3ddde3b34c9e3.tar.gz
serial: stm32: fix rx data length when parity enabled
- Fixes a rx data error when data length < 8 bits and parity is enabled. RDR register MSB is used for parity bit reception. - Adds a mask to ignore MSB when data is get from RDR. Fixes: 3489187204eb ("serial: stm32: adding dma support") Signed-off-by: Erwan Le Ray <erwan.leray@st.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/stm32-usart.h')
-rw-r--r--drivers/tty/serial/stm32-usart.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tty/serial/stm32-usart.h b/drivers/tty/serial/stm32-usart.h
index 8d34802e572e..30d2433e27c3 100644
--- a/drivers/tty/serial/stm32-usart.h
+++ b/drivers/tty/serial/stm32-usart.h
@@ -254,6 +254,7 @@ struct stm32_port {
bool hw_flow_control;
bool fifoen;
int wakeirq;
+ int rdr_mask; /* receive data register mask */
};
static struct stm32_port stm32_ports[STM32_MAX_PORTS];