Thanks to Jussi Kivilinna
9169ff6a15
stm32_serial: fix freezing serial port. Serial interrupt enable/disable functions
do not disable interrupts and can freeze device when serial interrupt is received
while execution is at those functions.
Trivially triggered with two or more threads write to regular syslog stream and to
emergency stream. In this case, freeze happens because of mismatch of priv->ie
(TXEIE == 0) and actually enabled interrupts in USART registers (TXEIE == 1),
which leads to unhandled TXE interrupt and causes interrupt storm for USART.