public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: core: Fix the incorrect calculation for erase unit size.
@ 2011-09-08  5:59 Seungwon Jeon
  2011-09-08  6:39 ` Kyungmin Park
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Seungwon Jeon @ 2011-09-08  5:59 UTC (permalink / raw)
  To: linux-mmc; +Cc: cjb, linux-samsung-soc, kgene.kim, dh.han, Seungwon Jeon

Erase unit size of high capacity is multiple of 512KiB not 1024KiB.

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
---
 drivers/mmc/core/mmc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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];

--
1.7.0.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-09-14  3:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-08  5:59 [PATCH] mmc: core: Fix the incorrect calculation for erase unit size Seungwon Jeon
2011-09-08  6:39 ` Kyungmin Park
2011-09-08 13:19 ` Chris Ball
2011-09-14  2:27   ` Seungwon Jeon
2011-09-14  2:29     ` Chris Ball
2011-09-14  3:50       ` Seungwon Jeon
2011-09-08 20:27 ` J Freyensee
2011-09-11 17:32 ` ajh mls

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox