From patchwork Wed Apr 29 13:31:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 47711 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 597522121F for ; Wed, 29 Apr 2015 13:32:22 +0000 (UTC) Received: by lbbqq2 with SMTP id qq2sf6387058lbb.0 for ; Wed, 29 Apr 2015 06:32:21 -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:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=H+68W/sbPaqeQMYfduFAkeB1x00W8aogxZZJKiEvHrk=; b=jblRXAfbAtLwhoTQS0qQyNDDYRBFhc8ph3iBHWvcNPSQGjsAzh6SYxDokC7DI4XGOr kTxeRM+acBt8QYK3/at75H/ZFU+ldjFf8TB5o+XH3+FTEaxVd1Ac0mvhLj0lEslngwEX npPjbGNoGyxw9bOG0g9WGhewmiX+j4GzeFRj5OFFwqaTFuS7KYm8ZDQtRYsvgAvI977f 07zEtb8Xj2IKlocjvG+nIh0FViwUYkgq5DFTE9hUsSFefOAsnEGxerY5mNsQXWtmgroe FhRC0greIPZoiRQkoqEVW+NCEcE71llCaUksI4Pv6xpTIAKpb1Jv9xspmG0nIcG0KoFX OGlg== X-Gm-Message-State: ALoCoQnfzbbWKXOjUv1AYO5KXuUUIe7n1mcXv/dEZHtgoYoMavpkrZ7D/mPGo4MVCcu+vXx748BS X-Received: by 10.180.106.10 with SMTP id gq10mr13075777wib.0.1430314340970; Wed, 29 Apr 2015 06:32:20 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.42 with SMTP id u10ls206563laz.64.gmail; Wed, 29 Apr 2015 06:32:20 -0700 (PDT) X-Received: by 10.112.146.97 with SMTP id tb1mr19326786lbb.12.1430314340747; Wed, 29 Apr 2015 06:32:20 -0700 (PDT) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com. [209.85.217.171]) by mx.google.com with ESMTPS id pw2si19393457lbb.33.2015.04.29.06.32.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Apr 2015 06:32:20 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by lbbzk7 with SMTP id zk7so20312713lbb.0 for ; Wed, 29 Apr 2015 06:32:20 -0700 (PDT) X-Received: by 10.152.9.66 with SMTP id x2mr18898240laa.36.1430314340279; Wed, 29 Apr 2015 06:32:20 -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 l1csp2507172lbt; Wed, 29 Apr 2015 06:32:19 -0700 (PDT) X-Received: by 10.69.16.35 with SMTP id ft3mr15936686pbd.35.1430314338542; Wed, 29 Apr 2015 06:32:18 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wl5si39493676pab.105.2015.04.29.06.32.17; Wed, 29 Apr 2015 06:32:18 -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 S1422884AbbD2NcQ (ORCPT + 3 others); Wed, 29 Apr 2015 09:32:16 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:33652 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1422935AbbD2NcQ (ORCPT ); Wed, 29 Apr 2015 09:32:16 -0400 Received: by pacwv17 with SMTP id wv17so28171904pac.0 for ; Wed, 29 Apr 2015 06:32:15 -0700 (PDT) X-Received: by 10.66.139.109 with SMTP id qx13mr41664751pab.110.1430314335382; Wed, 29 Apr 2015 06:32:15 -0700 (PDT) Received: from localhost.localdomain ([180.150.153.56]) by mx.google.com with ESMTPSA id bs4sm25456797pbc.3.2015.04.29.06.32.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Apr 2015 06:32:14 -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: Wed, 29 Apr 2015 21:31:56 +0800 Message-Id: <1430314316-15971-1-git-send-email-zhangfei.gao@linaro.org> X-Mailer: git-send-email 1.9.1 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.171 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_64ADDR_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);