msm_serial_hs: Disable Rx DM Interface before sending flush

The execution of Rx enqueue command, Rx flush command and setting of
rx.flush state should happen in atomic way. It happens that start_rx()
and set_termios() might be executing concurrently while doing Bluetooth
ON after some iterations, which is putting ADM into bad state and it
stalls Rx transfer showing as Bus Error.

Disable Rx DM Interface before sending flush command and changing
protocol configuration from set_termios(). This will make sure that even
enqueue/flush is not in synchronization while changing the baud rate OR
moving between different line discipline (not supposed to happen
frequently, but in some case it is seen). There is hardware signals
( uart _dm_rx_dm_req and uart _dm_rx_dm_ack ) between UARTDM core and ADM
which is used to make request and acknowledge the same. Disabling Rx DM
interface causes ADM to terminate the current RX transfer.

CRs-Fixed: 296523
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
1 file changed