summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/card/block.c7
-rw-r--r--drivers/mmc/core/core.c4
-rw-r--r--include/linux/mmc/card.h1
3 files changed, 11 insertions, 1 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 74a7c6ca6826..71caa588a019 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -4111,6 +4111,13 @@ static const struct mmc_fixup blk_fixups[] =
MMC_QUIRK_LONG_READ_TIME),
/*
+ * Hynix eMMC cards need longer data read timeout than
+ * indicated in CSD.
+ */
+ MMC_FIXUP(CID_NAME_ANY, CID_MANFID_HYNIX, CID_OEMID_ANY, add_quirk_mmc,
+ MMC_QUIRK_LONG_READ_TIME),
+
+ /*
* On these Samsung MoviNAND parts, performing secure erase or
* secure trim can result in unrecoverable corruption due to a
* firmware bug.
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 13e06f96d0c9..65113800026c 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1962,9 +1962,11 @@ void mmc_set_data_timeout(struct mmc_data *data, const struct mmc_card *card)
* Address this by setting the read timeout to a "reasonably high"
* value. For the cards tested, 300ms has proven enough. If necessary,
* this value can be increased if other problematic cards require this.
+ * Certain Hynix 5.x cards giving read timeout even with 300ms.
+ * Increasing further to max value (4s).
*/
if (mmc_card_long_read_time(card) && data->flags & MMC_DATA_READ) {
- data->timeout_ns = 300000000;
+ data->timeout_ns = 4000000000u;
data->timeout_clks = 0;
}
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index 0f0c9963950e..8ebf9988b04e 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -486,6 +486,7 @@ struct mmc_fixup {
#define CID_MANFID_MICRON 0x13
#define CID_MANFID_SAMSUNG 0x15
#define CID_MANFID_KINGSTON 0x70
+#define CID_MANFID_HYNIX 0x90
#define CID_MANFID_ANY (-1u)
#define CID_OEMID_ANY ((unsigned short) -1)