Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 396f7894 authored by Prudhvi Yarlagadda's avatar Prudhvi Yarlagadda Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarPrudhvi Yarlagadda <pyarlaga@codeaurora.org>
parent 9e329357
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment