From b2b73f540ec8397ce591651cf00b1d3866fb9c41 Mon Sep 17 00:00:00 2001 From: Minkyu Kang Date: Wed, 20 Oct 2010 20:36:17 +0900 Subject: [PATCH] mmc: fix the lba value with high capacity Signed-off-by: Minkyu Kang --- drivers/mmc/mmc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index affa043..d50b2c5 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -889,7 +889,10 @@ int mmc_startup(struct mmc *mmc) mmc->block_dev.lun = 0; mmc->block_dev.type = 0; mmc->block_dev.blksz = mmc->read_bl_len; - mmc->block_dev.lba = lldiv(mmc->capacity, mmc->read_bl_len); + if (mmc->high_capacity) + mmc->block_dev.lba = mmc->capacity; + else + mmc->block_dev.lba = lldiv(mmc->capacity, mmc->read_bl_len); sprintf(mmc->block_dev.vendor, "Man %06x Snr %08x", mmc->cid[0] >> 8, (mmc->cid[2] << 8) | (mmc->cid[3] >> 24)); sprintf(mmc->block_dev.product, "%c%c%c%c%c", mmc->cid[0] & 0xff, -- 2.7.4