summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGary King <gking@nvidia.com>2009-12-21 15:52:43 -0800
committerGary King <gking@nvidia.com>2009-12-21 15:52:43 -0800
commit479accfb4dec15c9eb19ea40c2b7b1cb80c02855 (patch)
tree2c2c3660373261f523fcfe3c94269b5c856fd777 /drivers
parentc9f5c7568be6c5ab9e97e3526d206a860dd25b1a (diff)
mmc: don't bug when EMBEDDED_MMC_START_OFFSET > CSD capacity
for sector-addressed cards, the CSD capacity will generally be a small number, and this will often be less than the byte offset of the EMBEDDED_MMC_START_OFFSET. bugging in this case is wrong.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/core/mmc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index a5f27fff8962..9dabe5292d6d 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -143,7 +143,7 @@ static int mmc_decode_csd(struct mmc_card *card)
m = UNSTUFF_BITS(resp, 62, 12);
csd->capacity = (1 + m) << (e + 2);
#ifdef CONFIG_EMBEDDED_MMC_START_OFFSET
- BUG_ON(card->host->ops->get_host_offset(card->host) >= csd->capacity);
+ /* for sector-addressed cards, this will cause csd->capacity to wrap */
csd->capacity -= card->host->ops->get_host_offset(card->host);
#endif