Skip to contentSkip to conversation

There is small problem to support the MMC card >4 GByte.

PATCH New Sukumar Ghorai 1 participant 1 message Sep 14, 2009 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 There is small problem to support the MMC card >4 GByte.

EXT_CSD_REV could be any value <=3D2 and are valid as per MMCA Specificatio= n. And it was checking for CSD_STRUCTURE filed of EXT_CSD register.

---
 drivers/mmc/core/mmc.c  |    2 +-
 include/linux/mmc/mmc.h |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)
drivers/mmc/core/mmc.c +1 -1
index 06084db..7b22a2e 100644
@@ -216,7 +216,7 @@ static int mmc_read_ext_csd(struct mmc_card *card)
                goto out;
        }
 
-       if (ext_csd_struct >=3D 2) {
+       if (ext_csd[EXT_CSD_STRUCT_REV] >=3D 2) {
                card->ext_csd.sectors =3D
                        ext_csd[EXT_CSD_SEC_CNT + 0] << 0 |
                        ext_csd[EXT_CSD_SEC_CNT + 1] << 8 |
include/linux/mmc/mmc.h +1 -0
index 14b81f3..c4e97a9 100644
@@ -252,6 +252,7 @@ struct _mmc_csd {
 #define EXT_CSD_BUS_WIDTH      183     /* R/W */
 #define EXT_CSD_HS_TIMING      185     /* R/W */
 #define EXT_CSD_CARD_TYPE      196     /* RO */
+#define EXT_CSD_STRUCT_REV 194     /* RO */
 #define EXT_CSD_REV            192     /* RO */
 #define EXT_CSD_SEC_CNT                212     /* RO, 4 bytes */
 

--
1.5.4.7

Thanks Regards,
Ghorai