summaryrefslogtreecommitdiff
path: root/arch/arm/boot/dts/exynos3250-pinctrl.dtsi
diff options
context:
space:
mode:
authorZhiyong Tao <zhiyong.tao@mediatek.com>2021-07-29 11:46:40 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-07-29 18:06:37 +0300
commit7c4a509d3815a260c423c0633bd73695250ac26d (patch)
treea8f83abd57c5cb6d62ed56539de25e4204e433ad /arch/arm/boot/dts/exynos3250-pinctrl.dtsi
parent06e91df16f3e1ca1a1886968fb22d4258f3b6b6f (diff)
downloadlinux-7c4a509d3815a260c423c0633bd73695250ac26d.tar.xz
serial: 8250_mtk: fix uart corruption issue when rx power off
Fix uart corruption issue when rx power off. Add spin lock in mtk8250_dma_rx_complete function in APDMA mode. when uart is used as a communication port with external device(GPS). when external device(GPS) power off, the power of rx pin is also from 1.8v to 0v. Even if there is not any data in rx. But uart rx pin can capture the data "0". If uart don't receive any data in specified cycle, uart will generates BI(Break interrupt) interrupt. If external device(GPS) power off, we found that BI interrupt appeared continuously and very frequently. When uart interrupt type is BI, uart IRQ handler(8250 framwork API:serial8250_handle_irq) will push data to tty buffer. mtk8250_dma_rx_complete is a task of mtk_uart_apdma_rx_handler. mtk8250_dma_rx_complete priority is lower than uart irq handler(serial8250_handle_irq). if we are in process of mtk8250_dma_rx_complete, uart appear BI interrupt:1)serial8250_handle_irq will priority execution.2)it may cause write tty buffer conflict in mtk8250_dma_rx_complete. So the spin lock protect the rx receive data process is not break. Signed-off-by: Zhiyong Tao <zhiyong.tao@mediatek.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20210729084640.17613-2-zhiyong.tao@mediatek.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arm/boot/dts/exynos3250-pinctrl.dtsi')
0 files changed, 0 insertions, 0 deletions