OSDN Git Service

serial: uartps: Add a timeout to the tx empty wait
authorShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Mon, 10 Feb 2020 17:18:25 +0000 (10:18 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Feb 2020 21:33:24 +0000 (16:33 -0500)
commit4d905fc227cec77ecd85d8235fae55ac19b89659
treeac07fd299fbf6f3e29a8b5363608177a0d06b10a
parent070818b71dca057ba69c53f2a3c8098508ece818
serial: uartps: Add a timeout to the tx empty wait

commit 277375b864e8147975b064b513f491e2a910e66a upstream

In case the cable is not connected then the target gets into
an infinite wait for tx empty.
Add a timeout to the tx empty wait.

Reported-by: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable <stable@vger.kernel.org> # 4.19
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/xilinx_uartps.c