Skip to content

Commit abeb2e9

Browse files
Yonghan Yegregkh
authored andcommitted
serial: sprd: Add clearing break interrupt operation
A break interrupt will be generated if the RX line was pulled low, which means some abnomal behaviors occurred of the UART. In this case, we still need to clear this break interrupt status, otherwise it will cause irq storm to crash the whole system. Fixes: b7396a3 ("tty/serial: Add Spreadtrum sc9836-uart driver support") Signed-off-by: Yonghan Ye <[email protected]> Cc: stable <[email protected]> Signed-off-by: Baolin Wang <[email protected]> Link: https://lore.kernel.org/r/925e51b73099c90158e080b8f5bed9b3b38c4548.1575460601.git.baolin.wang7@gmail.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0e4f7f9 commit abeb2e9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/tty/serial/sprd_serial.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,9 @@ static irqreturn_t sprd_handle_irq(int irq, void *dev_id)
679679
if (ims & SPRD_IMSR_TIMEOUT)
680680
serial_out(port, SPRD_ICLR, SPRD_ICLR_TIMEOUT);
681681

682+
if (ims & SPRD_IMSR_BREAK_DETECT)
683+
serial_out(port, SPRD_ICLR, SPRD_IMSR_BREAK_DETECT);
684+
682685
if (ims & (SPRD_IMSR_RX_FIFO_FULL | SPRD_IMSR_BREAK_DETECT |
683686
SPRD_IMSR_TIMEOUT))
684687
sprd_rx(port);

0 commit comments

Comments
 (0)