Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebb3f1e1 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mmc: core: Fix disabling of cache for Hynix cards"

parents 4ffe992a cb808fc8
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -3192,9 +3192,6 @@ static const struct mmc_fixup blk_fixups[] =
	MMC_FIXUP("SEM04G", 0x45, CID_OEMID_ANY, add_quirk_mmc,
		  MMC_QUIRK_INAND_DATA_TIMEOUT),

	/* Disable cache for this cards */
	MMC_FIXUP("H8G2d", CID_MANFID_HYNIX, CID_OEMID_ANY, add_quirk_mmc,
		  MMC_QUIRK_CACHE_DISABLE),
	END_FIXUP
};

+8 −5
Original line number Diff line number Diff line
@@ -66,6 +66,14 @@ static const struct mmc_fixup mmc_fixups[] = {
	MMC_FIXUP_EXT_CSD_REV(CID_NAME_ANY, CID_MANFID_HYNIX,
			      0x014a, add_quirk, MMC_QUIRK_BROKEN_HPI, 5),

	/*
	 * Some Hynix cards exhibit data corruption over reboots if cache is
	 * enabled. Disable cache for all versions until a class of cards that
	 * show this behavior is identified.
	 */
	MMC_FIXUP("H8G2d", CID_MANFID_HYNIX, CID_OEMID_ANY, add_quirk_mmc,
		  MMC_QUIRK_CACHE_DISABLE),

	END_FIXUP
};

@@ -1579,11 +1587,6 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
			card->ext_csd.cache_ctrl = 1;
		}
	}
	if (card->quirks & MMC_QUIRK_CACHE_DISABLE) {
		pr_warn("%s: This is Hynix card, cache disabled!\n",
				mmc_hostname(card->host));
		card->ext_csd.cache_ctrl = 0;
	}

	/*
	 * The mandatory minimum values are defined for packed command.