Skip to content

Commit cfb81f2

Browse files
Vijaya Krishna Nivarthibroonie
authored andcommitted
spi: spi-qcom-qspi: Call dma_wmb() after setting up descriptors
After setting up dma descriptors and before initiaiting dma transfer, call dma_wmb() to ensure all writes go through. This doesn't fix any reported problem but is added for safety. Signed-off-by: Vijaya Krishna Nivarthi <[email protected]> Fixes: b5762d9 ("spi: spi-qcom-qspi: Add DMA mode support") Reviewed-by: Douglas Anderson <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent f7ba36d commit cfb81f2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/spi/spi-qcom-qspi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,10 @@ static int qcom_qspi_transfer_one(struct spi_master *master,
443443

444444
ret = qcom_qspi_setup_dma_desc(ctrl, xfer);
445445
if (ret != -EAGAIN) {
446-
if (!ret)
446+
if (!ret) {
447+
dma_wmb();
447448
qcom_qspi_dma_xfer(ctrl);
449+
}
448450
goto exit;
449451
}
450452
dev_warn_once(ctrl->dev, "DMA failure, falling back to PIO\n");

0 commit comments

Comments
 (0)