serial: msm_geni_serial: Don't queue the rx dma buffer in stop rx
Don't queue a new dma rx buffer only when the rx_length_in register
is zero and dma_done interrupt bit is set. The rx_length_in register
shows number of bytes received and this can be zero when dma_done
interrupt bit is set when we give a cancel command.
This helps when there is a race condition between rx data coming into
rx fifo and a cancel_s_cmd is given. The rx data will end up consuming
the rx dma buffer mapped for cancel command and due to this dma engine
will be in active state even though geni goes to inactive state.
Issue is that we get a dma_done interrupt for the previously pending
EOT byte which came for cancel command. And this interrupt will come
when we queue the rx buffer in start_rx and this might cause uart
to read partial data from rx fifo.
Change-Id: Id3d9b32330c1ac4205100a30936bd4015e20f24d
Signed-off-by:
Prudhvi Yarlagadda <pyarlaga@codeaurora.org>
Loading
Please register or sign in to comment