From patchwork Thu Sep 1 06:19:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Girish K S X-Patchwork-Id: 3821 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 87B0723F25 for ; Thu, 1 Sep 2011 06:20:06 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id 73E9AA185DB for ; Thu, 1 Sep 2011 06:20:06 +0000 (UTC) Received: by fxd18 with SMTP id 18so601492fxd.11 for ; Wed, 31 Aug 2011 23:20:06 -0700 (PDT) Received: by 10.223.4.133 with SMTP id 5mr1178977far.81.1314858006283; Wed, 31 Aug 2011 23:20:06 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.11.8 with SMTP id m8cs40657lab; Wed, 31 Aug 2011 23:20:06 -0700 (PDT) Received: by 10.68.13.169 with SMTP id i9mr1818427pbc.195.1314858004400; Wed, 31 Aug 2011 23:20:04 -0700 (PDT) Received: from mail-pz0-f45.google.com (mail-pz0-f45.google.com [209.85.210.45]) by mx.google.com with ESMTPS id 6si10614183pbc.119.2011.08.31.23.20.03 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 31 Aug 2011 23:20:04 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.210.45 is neither permitted nor denied by best guess record for domain of girish.shivananjappa@linaro.org) client-ip=209.85.210.45; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.45 is neither permitted nor denied by best guess record for domain of girish.shivananjappa@linaro.org) smtp.mail=girish.shivananjappa@linaro.org Received: by pzk33 with SMTP id 33so3037471pzk.32 for ; Wed, 31 Aug 2011 23:20:03 -0700 (PDT) Received: by 10.68.50.100 with SMTP id b4mr1596882pbo.336.1314858003087; Wed, 31 Aug 2011 23:20:03 -0700 (PDT) Received: from girishks ([115.113.119.130]) by mx.google.com with ESMTPS id t6sm2000994pbg.4.2011.08.31.23.20.00 (version=SSLv3 cipher=OTHER); Wed, 31 Aug 2011 23:20:02 -0700 (PDT) From: Girish K S To: linux-mmc@vger.kernel.org Cc: cjb@laptop.org, kgene.kim@samsung.com, patches@linaro.org, linux-samsung-soc@vger.kernel.org, Girish K S Subject: [PATCH] mmc: core: Fix Ignore obselete ext csd in eMMC4.5 Date: Thu, 1 Sep 2011 11:49:51 +0530 Message-Id: <1314857991-6848-1-git-send-email-girish.shivananjappa@linaro.org> X-Mailer: git-send-email 1.7.1 In the eMMC 4.5 specification the EC_ERASE_MULT and SEC_TRIM_MULT have become obselete and donot carry any valid information. This patch makes sure that the above mentioned parameters are used only for versions below eMMC 4.5. All the versions above 4.5 will ignore their usage by assuming them as dont cares. Signed-off-by: Girish K S --- drivers/mmc/core/core.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 91a0a74..47ce1e4 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1351,8 +1351,12 @@ static unsigned int mmc_mmc_erase_timeout(struct mmc_card *card, erase_timeout = 1; } - /* Multiplier for secure operations */ - if (arg & MMC_SECURE_ARGS) { + /* Multiplier for secure operations + * eMMC 4.5 specification defines these values + * sec_erase_mult,sec_trim_mult as obselete(so dont care). + * These multipliers are only valid for versions < eMMC 4.5 + */ + if ((arg & MMC_SECURE_ARGS) && (card->ext_csd.rev < 6)) { if (arg == MMC_SECURE_ERASE_ARG) erase_timeout *= card->ext_csd.sec_erase_mult; else