From patchwork Thu Apr 30 14:16:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 47854 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6A3652121F for ; Thu, 30 Apr 2015 14:28:57 +0000 (UTC) Received: by wgin8 with SMTP id n8sf15594283wgi.0 for ; Thu, 30 Apr 2015 07:28:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=dhk7fsq2HCNxppBb7SJ7Rqvt7Z0u1/f5IQy/mDIwMJ0=; b=eeIO8gEcKDbuh0cCYLuWW0WmIlcj7lXB8+Ng3JvoxijDF0U7rFgSc40Iq2vmN0T7aG BFLQSjSVRenRbkFpcMLxw0NQn4XIb38V0tXThlXAzDCoXhJne+/J6kcI4FRXR8p18iFs 6uAt4M6b0jJzDFuH/ibikKDsDchy/zqmVLGAPUe/sh1wiq03PizESRZrlUtKOtLANf/1 8SrTfFavbVopCf7VBfLGmQFO6hhe7PRtIhEp5hcZDV/ycMExbjLj7vd7/zQEuWoSu2z5 ImvgiTxoRJKn9G0Iuuxw7Xyh3B1BZSfRGT/IplSdddnoQmzBzzSlWui1ityIZKVunmnf tA1A== X-Gm-Message-State: ALoCoQn8Az26UxL7hq3BmOAp5pC2aaHsTDhA57y6gikIHdBJNGgki9vcoWm4PqGVA3JlmdC7/KxJ X-Received: by 10.180.107.33 with SMTP id gz1mr1881890wib.3.1430404136771; Thu, 30 Apr 2015 07:28:56 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.120.9 with SMTP id ky9ls306543lab.98.gmail; Thu, 30 Apr 2015 07:28:56 -0700 (PDT) X-Received: by 10.112.47.73 with SMTP id b9mr4084790lbn.46.1430404136614; Thu, 30 Apr 2015 07:28:56 -0700 (PDT) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id e4si1877915laf.74.2015.04.30.07.28.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Apr 2015 07:28:56 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by lbbuc2 with SMTP id uc2so45890987lbb.2 for ; Thu, 30 Apr 2015 07:28:56 -0700 (PDT) X-Received: by 10.152.37.228 with SMTP id b4mr4011540lak.117.1430404136390; Thu, 30 Apr 2015 07:28:56 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp3148701lbt; Thu, 30 Apr 2015 07:28:48 -0700 (PDT) X-Received: by 10.66.250.106 with SMTP id zb10mr8787909pac.36.1430403434965; Thu, 30 Apr 2015 07:17:14 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tc7si3694980pbc.137.2015.04.30.07.16.44; Thu, 30 Apr 2015 07:17:14 -0700 (PDT) Received-SPF: none (google.com: linux-mmc-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751115AbbD3OQo (ORCPT + 3 others); Thu, 30 Apr 2015 10:16:44 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:34155 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751183AbbD3OQn (ORCPT ); Thu, 30 Apr 2015 10:16:43 -0400 Received: by pacyx8 with SMTP id yx8so61155419pac.1 for ; Thu, 30 Apr 2015 07:16:43 -0700 (PDT) X-Received: by 10.68.132.194 with SMTP id ow2mr8678462pbb.51.1430403402952; Thu, 30 Apr 2015 07:16:42 -0700 (PDT) Received: from localhost.localdomain ([104.207.83.5]) by mx.google.com with ESMTPSA id tr6sm2376951pab.4.2015.04.30.07.16.39 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Apr 2015 07:16:41 -0700 (PDT) From: Zhangfei Gao To: Jaehoon Chung , Ulf Hansson Cc: linux-mmc@vger.kernel.org, Zhangfei Gao , Fei Wang Subject: [PATCH] mmc: dw_mmc: init desc in dw_mci_idmac_init Date: Thu, 30 Apr 2015 22:16:28 +0800 Message-Id: <1430403388-4184-1-git-send-email-zhangfei.gao@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430314316-15971-1-git-send-email-zhangfei.gao@linaro.org> References: <1430314316-15971-1-git-send-email-zhangfei.gao@linaro.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: zhangfei.gao@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 Signed-off-by: Zhangfei Gao --- 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);