Re: [PATCH] mmc: dw_mmc: init desc in dw_mci_idmac_init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.

On 04/29/2015 10:31 PM, Zhangfei Gao wrote:
> 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)

I'm not understanding this comment.
how does it use the IDMAC_64ADDR_SET_BUFFER1_SIZE(desc, length)?

Best Regards,
Jaehoon Chung
> 
> Signed-off-by: Fei Wang <w.f@xxxxxxxxxx>
> Signed-off-by: Zhangfei Gao <zhangfei.gao@xxxxxxxxxx>
> ---
>  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);
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux