Commit 836dc2fe89c968c10cada87e0dfae6626f8f9da3
Committed by
Chris Ball
1 parent
8e1c4e4d73
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
mmc: core: Fix bit width test failing on old eMMC cards
PARTITION_SUPPORT needs to be set before doing the compare on version number so the bit width test does not get invalid data. Before this patch, a Sandisk iNAND eMMC card would detect 1-bit width although the hardware supports 4-bit. Only affects old emmc devices - pre 4.4 devices. Reported-by: Elad Yi <elad.yi@gmail.com> Signed-off-by: Philip Rakity <prakity@yahoo.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Chris Ball <cjb@laptop.org>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
drivers/mmc/core/mmc.c
... | ... | @@ -369,13 +369,13 @@ |
369 | 369 | ext_csd[EXT_CSD_SEC_FEATURE_SUPPORT]; |
370 | 370 | card->ext_csd.raw_trim_mult = |
371 | 371 | ext_csd[EXT_CSD_TRIM_MULT]; |
372 | + card->ext_csd.raw_partition_support = ext_csd[EXT_CSD_PARTITION_SUPPORT]; | |
372 | 373 | if (card->ext_csd.rev >= 4) { |
373 | 374 | /* |
374 | 375 | * Enhanced area feature support -- check whether the eMMC |
375 | 376 | * card has the Enhanced area enabled. If so, export enhanced |
376 | 377 | * area offset and size to user by adding sysfs interface. |
377 | 378 | */ |
378 | - card->ext_csd.raw_partition_support = ext_csd[EXT_CSD_PARTITION_SUPPORT]; | |
379 | 379 | if ((ext_csd[EXT_CSD_PARTITION_SUPPORT] & 0x2) && |
380 | 380 | (ext_csd[EXT_CSD_PARTITION_ATTRIBUTE] & 0x1)) { |
381 | 381 | hc_erase_grp_sz = |