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:
Girish Mahadevan <girishm@codeaurora.org>
Loading
Please register or sign in to comment