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

Commit e3461f89 authored by Girish Mahadevan's avatar Girish Mahadevan
Browse files

spi: spi_qsd: Separate rx and tx completion objects



Use a dedicated completion for rx and tx instead of a common completion
object for both.
Currently a single completion object is used for both streams but the
driver does a wait only once, however the DMA driver will signal
completion twice. This could be problematic in DMA related
transfers involving big buffers where you need to send more than one
buffer for a SPI transfer as the driver does an init_completion() on the
completion object again. This could cause a race between the DMA driver's
ISR setting the completion object and the SPI driver calling init on the
same object.
To work around this potential race condition, use dedicated completion
object for each stream and don't call init_completion() API during the
same transfer (it is called once per transfer)

Change-Id: Ib061b614bbc9036411d97ad964ed4c2f56880eae
Signed-off-by: default avatarGirish Mahadevan <girishm@codeaurora.org>
parent 8ca03863
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