public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: dw_mmc: init desc in dw_mci_idmac_init
@ 2015-04-29 13:31 Zhangfei Gao
  2015-04-30  8:01 ` Jaehoon Chung
  2015-04-30 14:16 ` Zhangfei Gao
  0 siblings, 2 replies; 6+ messages in thread
From: Zhangfei Gao @ 2015-04-29 13:31 UTC (permalink / raw)
  To: Jaehoon Chung, Ulf Hansson; +Cc: linux-mmc, Zhangfei Gao, Fei Wang

Set 0 to des1 in 32bit case.
Otherwise the random value of des1 will be used in
dw_mci_translate_sglist: IDMAC_64ADDR_SET_BUFFER1_SIZE(desc, length)

Signed-off-by: Fei Wang <w.f@huawei.com>
Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
---
 drivers/mmc/host/dw_mmc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 241454f..488a8af 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -589,9 +589,11 @@ static int dw_mci_idmac_init(struct dw_mci *host)
 		host->ring_size = PAGE_SIZE / sizeof(struct idmac_desc);
 
 		/* Forward link the descriptor list */
-		for (i = 0, p = host->sg_cpu; i < host->ring_size - 1; i++, p++)
+		for (i = 0, p = host->sg_cpu; i < host->ring_size - 1; i++, p++) {
 			p->des3 = cpu_to_le32(host->sg_dma +
 					(sizeof(struct idmac_desc) * (i + 1)));
+			p->des1 = 0;
+		}
 
 		/* Set the last descriptor as the end-of-ring descriptor */
 		p->des3 = cpu_to_le32(host->sg_dma);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-05-04  0:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-29 13:31 [PATCH] mmc: dw_mmc: init desc in dw_mci_idmac_init Zhangfei Gao
2015-04-30  8:01 ` Jaehoon Chung
2015-04-30  8:37   ` zhangfei
     [not found]     ` <CAELcNGSWV_EVECekLcnP=x992XO8=164bUcA=P=G28Ee0J6myg@mail.gmail.com>
2015-04-30 14:13       ` Zhangfei Gao
2015-04-30 14:16 ` Zhangfei Gao
2015-05-04  0:07   ` Jaehoon Chung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox