From patchwork Thu Sep 8 05:59:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seungwon Jeon X-Patchwork-Id: 1128962 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p886ErY4008521 for ; Thu, 8 Sep 2011 06:17:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758010Ab1IHGRO (ORCPT ); Thu, 8 Sep 2011 02:17:14 -0400 Received: from ganesha.gnumonks.org ([213.95.27.120]:39084 "EHLO ganesha.gnumonks.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757977Ab1IHGRO (ORCPT ); Thu, 8 Sep 2011 02:17:14 -0400 Received: from uucp by ganesha.gnumonks.org with local-bsmtp (Exim 4.72) (envelope-from ) id 1R1XvC-00083Z-Eh; Thu, 08 Sep 2011 08:17:10 +0200 Received: from [12.23.118.173] (helo=sunrise.dsn.sec.samsung.com) by jackpot.kr.gnumonks.org with esmtp (Exim 4.69) (envelope-from ) id 1R1Wr8-00050m-Bt; Thu, 08 Sep 2011 14:08:54 +0900 From: Seungwon Jeon To: linux-mmc@vger.kernel.org Cc: cjb@laptop.org, linux-samsung-soc@vger.kernel.org, kgene.kim@samsung.com, dh.han@samsung.com, Seungwon Jeon Subject: [PATCH] mmc: core: Fix the incorrect calculation for erase unit size. Date: Thu, 8 Sep 2011 14:59:25 +0900 Message-Id: <1315461565-16009-1-git-send-email-tgih.jun@samsung.com> X-Mailer: git-send-email 1.7.1 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 08 Sep 2011 06:17:15 +0000 (UTC) Erase unit size of high capacity is multiple of 512KiB not 1024KiB. Signed-off-by: Seungwon Jeon Acked-by: Kyungmin Park --- drivers/mmc/core/mmc.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- 1.7.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index b148bb1..7991ecf 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -332,7 +332,7 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd) card->ext_csd.hc_erase_timeout = 300 * ext_csd[EXT_CSD_ERASE_TIMEOUT_MULT]; card->ext_csd.hc_erase_size = - ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE] << 10; + ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE] << 9; card->ext_csd.rel_sectors = ext_csd[EXT_CSD_REL_WR_SEC_C];