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: 6295871 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0D8C99F326 for ; Wed, 29 Apr 2015 13:32:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 86797201CD for ; Wed, 29 Apr 2015 13:32:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BFE8D2012E for ; Wed, 29 Apr 2015 13:32:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422884AbbD2NcQ (ORCPT ); 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-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; bh=ZNFBLjRrqmh+zOIyM1fE7geBCx/+nbIAYB/I8IYzUZc=; b=XYpOl9EnSSrvWYD+wl1dt7Z5+6URJwB8V6gdJ5EIfdg5H/yFy1VARxuQEHiclPc2vP k21KM3Z1QotK8Q8iezjqE/rCozmLTElfp7a+gsknJYdKBzeBwr+eYCJzVWWYL0zSTVai 7BBLPaOAp845fZub0JNWSEpIyU6bxqV+FIM8NNCOwDvta0mMlEhIfIChzfDOPOJz+La8 d7f9uL0/DKDvWnfdpxH00vKBzfUB+abOUsLmFPBkqctcV5vTpVd32iz+0BCCzA0LBLdv a49pXOCTCpeEnsHVKiJALrr73BiM4zP5Iv/qqE/Uh5XtQcbwJTSNLnKWqNyio6cWoZUp tYgg== X-Gm-Message-State: ALoCoQlYR09MqLXlg8Tqjk25mMfmu2tkQBqHcr5fkh7rp3VlRZLfrSOFwXF7hZcPznyKHXo2GL47 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: 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_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);