projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1f5977
)
mmc: only set blockaddressed for > 2GiB cards
author
Hanumath Prasad
<
[email protected]
>
Wed, 11 Aug 2010 01:01:45 +0000
(18:01 -0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 11 Aug 2010 15:59:03 +0000
(08:59 -0700)
A non-zero value of SEC_COUNT does not indicate that the card is sector
addressed. According to the MMC specification, cards with a density
greater than 2GiB are sector addressed.
Acked-by: Linus Walleij <
[email protected]
>
Signed-off-by: Hanumath Prasad <
[email protected]
>
Signed-off-by: Rabin Vincent <
[email protected]
>
Cc: <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/mmc/core/mmc.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/core/mmc.c
b/drivers/mmc/core/mmc.c
index cd8d3d2ea901cf8fff986c83e9c568ef8170ca28..ccba3869c0293a92cb27cfcaa73d855b01156ba9 100644
(file)
--- a/
drivers/mmc/core/mmc.c
+++ b/
drivers/mmc/core/mmc.c
@@
-234,7
+234,9
@@
static int mmc_read_ext_csd(struct mmc_card *card)
ext_csd[EXT_CSD_SEC_CNT + 1] << 8 |
ext_csd[EXT_CSD_SEC_CNT + 2] << 16 |
ext_csd[EXT_CSD_SEC_CNT + 3] << 24;
- if (card->ext_csd.sectors)
+
+ /* Cards with density > 2GiB are sector addressed */
+ if (card->ext_csd.sectors > (2u * 1024 * 1024 * 1024) / 512)
mmc_card_set_blockaddr(card);
}