Loading drivers/mmc/core/mmc.c +17 −7 Original line number Diff line number Diff line Loading @@ -161,6 +161,7 @@ static int mmc_read_ext_csd(struct mmc_card *card) { int err; u8 *ext_csd; unsigned int ext_csd_struct; BUG_ON(!card); Loading Loading @@ -209,6 +210,14 @@ static int mmc_read_ext_csd(struct mmc_card *card) goto out; } ext_csd_struct = ext_csd[EXT_CSD_REV]; if (ext_csd_struct > 2) { printk("%s: unrecognised EXT_CSD structure version %d\n", mmc_hostname(card->host), ext_csd_struct); return -EINVAL; } if (ext_csd_struct >= 2) { card->ext_csd.sectors = ext_csd[EXT_CSD_SEC_CNT + 0] << 0 | ext_csd[EXT_CSD_SEC_CNT + 1] << 8 | Loading @@ -216,6 +225,7 @@ static int mmc_read_ext_csd(struct mmc_card *card) ext_csd[EXT_CSD_SEC_CNT + 3] << 24; if (card->ext_csd.sectors) mmc_card_set_blockaddr(card); } switch (ext_csd[EXT_CSD_CARD_TYPE]) { case EXT_CSD_CARD_TYPE_52 | EXT_CSD_CARD_TYPE_26: Loading include/linux/mmc/mmc.h +1 −0 Original line number Diff line number Diff line Loading @@ -227,6 +227,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_REV 192 /* RO */ #define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */ /* Loading Loading
drivers/mmc/core/mmc.c +17 −7 Original line number Diff line number Diff line Loading @@ -161,6 +161,7 @@ static int mmc_read_ext_csd(struct mmc_card *card) { int err; u8 *ext_csd; unsigned int ext_csd_struct; BUG_ON(!card); Loading Loading @@ -209,6 +210,14 @@ static int mmc_read_ext_csd(struct mmc_card *card) goto out; } ext_csd_struct = ext_csd[EXT_CSD_REV]; if (ext_csd_struct > 2) { printk("%s: unrecognised EXT_CSD structure version %d\n", mmc_hostname(card->host), ext_csd_struct); return -EINVAL; } if (ext_csd_struct >= 2) { card->ext_csd.sectors = ext_csd[EXT_CSD_SEC_CNT + 0] << 0 | ext_csd[EXT_CSD_SEC_CNT + 1] << 8 | Loading @@ -216,6 +225,7 @@ static int mmc_read_ext_csd(struct mmc_card *card) ext_csd[EXT_CSD_SEC_CNT + 3] << 24; if (card->ext_csd.sectors) mmc_card_set_blockaddr(card); } switch (ext_csd[EXT_CSD_CARD_TYPE]) { case EXT_CSD_CARD_TYPE_52 | EXT_CSD_CARD_TYPE_26: Loading
include/linux/mmc/mmc.h +1 −0 Original line number Diff line number Diff line Loading @@ -227,6 +227,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_REV 192 /* RO */ #define EXT_CSD_SEC_CNT 212 /* RO, 4 bytes */ /* Loading