Skip to content

Commit 75e33c5

Browse files
Ville Bailliebroonie
authored andcommitted
spi: atmel: Fix PDC transfer setup bug
atmel_spi_dma_map_xfer to never be called in PDC mode. This causes the driver to silently fail. This patch changes the conditional to match the behaviour of the previous commit before the refactor. Fixes: 5fa5e6d ("spi: atmel: Switch to transfer_one transfer method") Signed-off-by: Ville Baillie <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 59c4e19 commit 75e33c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/spi/spi-atmel.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1301,7 +1301,7 @@ static int atmel_spi_one_transfer(struct spi_master *master,
13011301
* DMA map early, for performance (empties dcache ASAP) and
13021302
* better fault reporting.
13031303
*/
1304-
if ((!master->cur_msg_mapped)
1304+
if ((!master->cur_msg->is_dma_mapped)
13051305
&& as->use_pdc) {
13061306
if (atmel_spi_dma_map_xfer(as, xfer) < 0)
13071307
return -ENOMEM;
@@ -1381,7 +1381,7 @@ static int atmel_spi_one_transfer(struct spi_master *master,
13811381
}
13821382
}
13831383

1384-
if (!master->cur_msg_mapped
1384+
if (!master->cur_msg->is_dma_mapped
13851385
&& as->use_pdc)
13861386
atmel_spi_dma_unmap_xfer(master, xfer);
13871387

0 commit comments

Comments
 (0)