Skip to content

Commit 9d739bc

Browse files
Peng Mavinodkoul
authored andcommitted
dmaengine: fsl-qdma: fix SoC may hang on 16 byte unaligned read
There is chip (ls1028a) errata: The SoC may hang on 16 byte unaligned read transactions by QDMA. Unaligned read transactions initiated by QDMA may stall in the NOC (Network On-Chip), causing a deadlock condition. Stalled transactions will trigger completion timeouts in PCIe controller. Workaround: Enable prefetch by setting the source descriptor prefetchable bit ( SD[PF] = 1 ). Implement this workaround. Cc: [email protected] Fixes: b092529 ("dmaengine: fsl-qdma: Add qDMA controller driver for Layerscape SoCs") Signed-off-by: Peng Ma <[email protected]> Signed-off-by: Frank Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent bbcc1c8 commit 9d739bc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/dma/fsl-qdma.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
#define FSL_QDMA_CMD_WTHROTL_OFFSET 20
110110
#define FSL_QDMA_CMD_DSEN_OFFSET 19
111111
#define FSL_QDMA_CMD_LWC_OFFSET 16
112+
#define FSL_QDMA_CMD_PF BIT(17)
112113

113114
/* Field definition for Descriptor status */
114115
#define QDMA_CCDF_STATUS_RTE BIT(5)
@@ -384,7 +385,8 @@ static void fsl_qdma_comp_fill_memcpy(struct fsl_qdma_comp *fsl_comp,
384385
qdma_csgf_set_f(csgf_dest, len);
385386
/* Descriptor Buffer */
386387
cmd = cpu_to_le32(FSL_QDMA_CMD_RWTTYPE <<
387-
FSL_QDMA_CMD_RWTTYPE_OFFSET);
388+
FSL_QDMA_CMD_RWTTYPE_OFFSET) |
389+
FSL_QDMA_CMD_PF;
388390
sdf->data = QDMA_SDDF_CMD(cmd);
389391

390392
cmd = cpu_to_le32(FSL_QDMA_CMD_RWTTYPE <<

0 commit comments

Comments
 (0)