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: 6303911 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A732EBEEE1 for ; Thu, 30 Apr 2015 14:16:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C8EA6201EF for ; Thu, 30 Apr 2015 14:16:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E49A6201EC for ; Thu, 30 Apr 2015 14:16:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751115AbbD3OQo (ORCPT ); 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-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=OKPlxQqche6Sgh5NbIlqjujvZBiC+rdn1phLsAD7wgE=; b=dVaW5kr9lEhxxYZqW/UoaQfNBuFBHeTgGff0RY2ffUvFL/KfWgJal8+Ud1MIDUGAxD D5Qi17SzbVBNVztywknkNj6T/0Q5sjsDpyOS7VaLpOy01pVAv7rkqMzRhLduANLR2a1I dSoB5J1xXIBOSHVAIMEtuWoJeBdB2/+MNYJwM7h0UVhIcA1FBmBRDYDiui1u+apUGa78 1YmaF6EOo4x3aqbsgcGplte1mH/RFXYysMwEFvlyViOZx36kDgdmv1CVQzlgeVTh28hG JxDQhkzEH/YvCDM3ibAzmjioAJKuQ2lSpPe/ifk8+quS5TgqaOd/MIlKIsvXe1rgiQ4h 9FTA== X-Gm-Message-State: ALoCoQm7pGKJQzwkpfQJe2yZo+7bPnoJ3PUdGTzGKndET5GGZ/0kxpZ3sQA3g3Q2wlUTnHTcEywF 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: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);