From 91c4f6751bcf2ca2a7274d2fe8cc116e5551c810 Mon Sep 17 00:00:00 2001 From: Ruben Date: Mon, 13 Mar 2017 21:57:24 +0100 Subject: [PATCH] Updated revision check for newer mmc revisions Issue : new _15_ oneplusx device's won't recognize the mmc memory Solution : Updated revision check for newer mmc revisions --- drivers/mmc/core/mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 290e284b4ef1..5720157eb76a 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -347,7 +347,7 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd) /* Version is coded in the CSD_STRUCTURE byte in the EXT_CSD register */ card->ext_csd.raw_ext_csd_structure = ext_csd[EXT_CSD_STRUCTURE]; if (card->csd.structure == 3) { - if (card->ext_csd.raw_ext_csd_structure > 2) { + if (card->ext_csd.raw_ext_csd_structure > 8) { pr_err("%s: unrecognised EXT_CSD structure " "version %d\n", mmc_hostname(card->host), card->ext_csd.raw_ext_csd_structure); @@ -357,7 +357,7 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd) } card->ext_csd.rev = ext_csd[EXT_CSD_REV]; - if (card->ext_csd.rev > 7) { + if (card->ext_csd.rev > 8) { pr_err("%s: unrecognised EXT_CSD revision %d\n", mmc_hostname(card->host), card->ext_csd.rev); err = -EINVAL;