tty: serial: qcom_geni_serial: Fix RX cancel command failure
authorsatya priya <skakit@codeaurora.org>
Tue, 11 Feb 2020 10:13:02 +0000 (15:43 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Feb 2020 15:38:55 +0000 (16:38 +0100)
commit56ad5b4b7405ec08ef3f2b33cd59f5b3bca6577c
tree9f1c345a42e2c59aa4ba8f3ed019ab7638794edb
parente6ebad85883d99b15ef20f522d46de5f88e64848
tty: serial: qcom_geni_serial: Fix RX cancel command failure

[ Upstream commit 679aac5ead2f18d223554a52b543e1195e181811 ]

RX cancel command fails when BT is switched on and off multiple times.

To handle this, poll for the cancel bit in SE_GENI_S_IRQ_STATUS register
instead of SE_GENI_S_CMD_CTRL_REG.

As per the HPG update, handle the RX last bit after cancel command
and flush out the RX FIFO buffer.

Signed-off-by: satya priya <skakit@codeaurora.org>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/1581415982-8793-1-git-send-email-skakit@codeaurora.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/qcom_geni_serial.c