Skip to content

Commit ba9f39a

Browse files
committed
mmc: core: Allow BKOPS and CACHE ctrl even if no HPI support
In commit 5320226 ("mmc: core: Disable HPI for certain Hynix eMMC cards"), then intent was to prevent HPI from being used for some eMMC cards, which didn't properly support it. However, that went too far, as even BKOPS and CACHE ctrl became prevented. Let's restore those parts and allow BKOPS and CACHE ctrl even if HPI isn't supported. Fixes: 5320226 ("mmc: core: Disable HPI for certain Hynix eMMC cards") Cc: Pratibhasagar V <pratibha@codeaurora.org> Cc: <stable@vger.kernel.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
1 parent a0741ba commit ba9f39a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/mmc/core/mmc.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -526,8 +526,7 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd)
526526
card->cid.year += 16;
527527

528528
/* check whether the eMMC card supports BKOPS */
529-
if (!mmc_card_broken_hpi(card) &&
530-
ext_csd[EXT_CSD_BKOPS_SUPPORT] & 0x1) {
529+
if (ext_csd[EXT_CSD_BKOPS_SUPPORT] & 0x1) {
531530
card->ext_csd.bkops = 1;
532531
card->ext_csd.man_bkops_en =
533532
(ext_csd[EXT_CSD_BKOPS_EN] &
@@ -1793,8 +1792,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
17931792
* If cache size is higher than 0, this indicates
17941793
* the existence of cache and it can be turned on.
17951794
*/
1796-
if (!mmc_card_broken_hpi(card) &&
1797-
card->ext_csd.cache_size > 0) {
1795+
if (card->ext_csd.cache_size > 0) {
17981796
err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
17991797
EXT_CSD_CACHE_CTRL, 1,
18001798
card->ext_csd.generic_cmd6_time);

0 commit comments

Comments
 (0)