Skip to content

Commit 05d22e5

Browse files
zhangfeigaoabrodkin
authored andcommitted
[BACKPORT FROM 4.1] mmc: dw_mmc: init desc in dw_mci_idmac_init
Set 0 to des1 in 32bit case. Otherwise the random value of des1 will be used in dw_mci_translate_sglist: IDMAC_SET_BUFFER1_SIZE(desc, length) Signed-off-by: Fei Wang <[email protected]> Signed-off-by: Zhangfei Gao <[email protected]> Signed-off-by: Jaehoon Chung <[email protected]> Signed-off-by: Ulf Hansson <[email protected]> Signed-off-by: Alexey Brodkin <[email protected]>
1 parent ae2765c commit 05d22e5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/mmc/host/dw_mmc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,10 @@ static int dw_mci_idmac_init(struct dw_mci *host)
473473
host->ring_size = PAGE_SIZE / sizeof(struct idmac_desc);
474474

475475
/* Forward link the descriptor list */
476-
for (i = 0, p = host->sg_cpu; i < host->ring_size - 1; i++, p++)
476+
for (i = 0, p = host->sg_cpu; i < host->ring_size - 1; i++, p++) {
477477
p->des3 = host->sg_dma + (sizeof(struct idmac_desc) * (i + 1));
478+
p->des1 = 0;
479+
}
478480

479481
/* Set the last descriptor as the end-of-ring descriptor */
480482
p->des3 = host->sg_dma;

0 commit comments

Comments
 (0)