* [PATCH v2 0/2] mmc: core: Extend manufacturing date beyond 2025
@ 2025-11-28 5:20 Avri Altman
2025-11-28 5:20 ` [PATCH v2 1/2] mmc: core: Adjust MDT " Avri Altman
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Avri Altman @ 2025-11-28 5:20 UTC (permalink / raw)
To: Ulf Hansson, linux-mmc; +Cc: Avri Altman
Hi Ulf,
This patch series addresses the upcoming exhaustion of the eMMC
manufacturing date (MDT) year field, which is limited to a 4-bit value
in the CID register. Under the current standard (EXT_CSD_REV=8), the
representable years end in 2025.
The first patch implements the recently approved JEDEC standard update
for EXT_CSD_REV=9. This update rolls over the 4-bit year codes to cover
a new 16-year period, extending the range up to 2038.
The second patch introduces a quirk to handle vendor-specific behavior.
Some eMMC vendors are not yet updating their devices to EXT_CSD_REV=9
but still need to report manufacturing dates for 2026 and beyond. These
devices re-purpose the year codes for 2010-2012 to represent 2026-2028.
Thanks,
Avri
---
Changes in v2:
- move the fixup to `mmc_ext_csd_fixups`
- State the correct spec release
- Fixed a typo in the commit message of the second patch.
---
Avri Altman (2):
mmc: core: Adjust MDT beyond 2025
mmc: core: Add quirk for incorrect manufacturing date
drivers/mmc/core/card.h | 6 ++++++
drivers/mmc/core/mmc.c | 12 ++++++++++++
drivers/mmc/core/quirks.h | 3 +++
include/linux/mmc/card.h | 1 +
4 files changed, 22 insertions(+)
--
2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/2] mmc: core: Adjust MDT beyond 2025
2025-11-28 5:20 [PATCH v2 0/2] mmc: core: Extend manufacturing date beyond 2025 Avri Altman
@ 2025-11-28 5:20 ` Avri Altman
2025-11-28 5:20 ` [PATCH v2 2/2] mmc: core: Add quirk for incorrect manufacturing date Avri Altman
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Avri Altman @ 2025-11-28 5:20 UTC (permalink / raw)
To: Ulf Hansson, linux-mmc; +Cc: Avri Altman, Shawn Lin
JEDEC JESD84-B51B which was released in September 2025, increases the
manufacturing year limit for eMMC devices. The eMMC manufacturing year
is stored in a 4-bit field in the CID register. Originally, it covered
1997–2012. Later, with EXT_CSD_REV=8, it was extended up to 2025. Now,
with EXT_CSD_REV=9, the range is rolled over by another 16 years, up to
2038.
The mapping is as follows:
cid[8..11] | rev ≤ 4 | 8 ≥ rev > 4 | rev > 8
---------------------------------------------
0 | 1997 | 2013 | 2029
1 | 1998 | 2014 | 2030
2 | 1999 | 2015 | 2031
3 | 2000 | 2016 | 2032
4 | 2001 | 2017 | 2033
5 | 2002 | 2018 | 2034
6 | 2003 | 2019 | 2035
7 | 2004 | 2020 | 2036
8 | 2005 | 2021 | 2037
9 | 2006 | 2022 | 2038
10 | 2007 | 2023 |
11 | 2008 | 2024 |
12 | 2009 | 2025 |
13 | 2010 | | 2026
14 | 2011 | | 2027
15 | 2012 | | 2028
Signed-off-by: Avri Altman <avri.altman@sandisk.com>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
---
drivers/mmc/core/mmc.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 7c86efb1044a..f744dd501842 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -671,7 +671,14 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd)
card->ext_csd.enhanced_rpmb_supported =
(card->ext_csd.rel_param &
EXT_CSD_WR_REL_PARAM_EN_RPMB_REL_WR);
+
+ if (card->ext_csd.rev >= 9) {
+ /* Adjust production date as per JEDEC JESD84-B51B September 2025 */
+ if (card->cid.year < 2023)
+ card->cid.year += 16;
+ }
}
+
out:
return err;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/2] mmc: core: Add quirk for incorrect manufacturing date
2025-11-28 5:20 [PATCH v2 0/2] mmc: core: Extend manufacturing date beyond 2025 Avri Altman
2025-11-28 5:20 ` [PATCH v2 1/2] mmc: core: Adjust MDT " Avri Altman
@ 2025-11-28 5:20 ` Avri Altman
2025-12-08 9:34 ` [PATCH v2 0/2] mmc: core: Extend manufacturing date beyond 2025 Avri Altman
2025-12-15 15:43 ` Ulf Hansson
3 siblings, 0 replies; 8+ messages in thread
From: Avri Altman @ 2025-11-28 5:20 UTC (permalink / raw)
To: Ulf Hansson, linux-mmc; +Cc: Avri Altman
Some eMMC vendors need to report manufacturing dates beyond 2025 but are
reluctant to update the EXT_CSD revision from 8 to 9. Changing the
Updating the EXT_CSD revision may involve additional testing or
qualification steps with customers. To ease this transition and avoid a
full re-qualification process, a workaround is needed. This
patch introduces a temporary quirk that re-purposes the year codes
corresponding to 2010, 2011, and 2012 to represent the years 2026, 2027,
and 2028, respectively. This solution is only valid for this three-year
period.
After 2028, vendors must update their firmware to set EXT_CSD_REV=9 to
continue reporting the correct manufacturing date in compliance with the
JEDEC standard.
The `MMC_QUIRK_BROKEN_MDT` is introduced and enabled for all Sandisk
devices to handle this behavior.
Signed-off-by: Avri Altman <avri.altman@sandisk.com>
---
drivers/mmc/core/card.h | 6 ++++++
drivers/mmc/core/mmc.c | 5 +++++
drivers/mmc/core/quirks.h | 3 +++
include/linux/mmc/card.h | 1 +
4 files changed, 15 insertions(+)
diff --git a/drivers/mmc/core/card.h b/drivers/mmc/core/card.h
index 1200951bab08..a9619dd45270 100644
--- a/drivers/mmc/core/card.h
+++ b/drivers/mmc/core/card.h
@@ -89,6 +89,7 @@ struct mmc_fixup {
#define CID_MANFID_MICRON 0x13
#define CID_MANFID_SAMSUNG 0x15
#define CID_MANFID_APACER 0x27
+#define CID_MANFID_SANDISK_MMC 0x45
#define CID_MANFID_SWISSBIT 0x5D
#define CID_MANFID_KINGSTON 0x70
#define CID_MANFID_HYNIX 0x90
@@ -305,4 +306,9 @@ static inline int mmc_card_no_uhs_ddr50_tuning(const struct mmc_card *c)
return c->quirks & MMC_QUIRK_NO_UHS_DDR50_TUNING;
}
+static inline int mmc_card_broken_mdt(const struct mmc_card *c)
+{
+ return c->quirks & MMC_QUIRK_BROKEN_MDT;
+}
+
#endif
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index f744dd501842..8846550a8892 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -676,6 +676,11 @@ static int mmc_decode_ext_csd(struct mmc_card *card, u8 *ext_csd)
/* Adjust production date as per JEDEC JESD84-B51B September 2025 */
if (card->cid.year < 2023)
card->cid.year += 16;
+ } else {
+ /* Handle vendors with broken MDT reporting */
+ if (mmc_card_broken_mdt(card) && card->cid.year >= 2010 &&
+ card->cid.year <= 2012)
+ card->cid.year += 16;
}
}
diff --git a/drivers/mmc/core/quirks.h b/drivers/mmc/core/quirks.h
index c417ed34c057..f5e8a0f6d11b 100644
--- a/drivers/mmc/core/quirks.h
+++ b/drivers/mmc/core/quirks.h
@@ -170,6 +170,9 @@ static const struct mmc_fixup __maybe_unused mmc_ext_csd_fixups[] = {
MMC_FIXUP_EXT_CSD_REV(CID_NAME_ANY, CID_MANFID_NUMONYX,
0x014e, add_quirk, MMC_QUIRK_BROKEN_HPI, 6),
+ MMC_FIXUP(CID_NAME_ANY, CID_MANFID_SANDISK_MMC, CID_OEMID_ANY, add_quirk_mmc,
+ MMC_QUIRK_BROKEN_MDT),
+
END_FIXUP
};
diff --git a/include/linux/mmc/card.h b/include/linux/mmc/card.h
index e9e964c20e53..4722dd7e46ce 100644
--- a/include/linux/mmc/card.h
+++ b/include/linux/mmc/card.h
@@ -329,6 +329,7 @@ struct mmc_card {
#define MMC_QUIRK_BROKEN_CACHE_FLUSH (1<<16) /* Don't flush cache until the write has occurred */
#define MMC_QUIRK_BROKEN_SD_POWEROFF_NOTIFY (1<<17) /* Disable broken SD poweroff notify support */
#define MMC_QUIRK_NO_UHS_DDR50_TUNING (1<<18) /* Disable DDR50 tuning */
+#define MMC_QUIRK_BROKEN_MDT (1<<19) /* Wrong manufacturing year */
bool written_flag; /* Indicates eMMC has been written since power on */
bool reenable_cmdq; /* Re-enable Command Queue */
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* RE: [PATCH v2 0/2] mmc: core: Extend manufacturing date beyond 2025
2025-11-28 5:20 [PATCH v2 0/2] mmc: core: Extend manufacturing date beyond 2025 Avri Altman
2025-11-28 5:20 ` [PATCH v2 1/2] mmc: core: Adjust MDT " Avri Altman
2025-11-28 5:20 ` [PATCH v2 2/2] mmc: core: Add quirk for incorrect manufacturing date Avri Altman
@ 2025-12-08 9:34 ` Avri Altman
2025-12-09 11:42 ` Ulf Hansson
2025-12-15 15:43 ` Ulf Hansson
3 siblings, 1 reply; 8+ messages in thread
From: Avri Altman @ 2025-12-08 9:34 UTC (permalink / raw)
To: Ulf Hansson, linux-mmc@vger.kernel.org
> Hi Ulf,
>
> This patch series addresses the upcoming exhaustion of the eMMC manufacturing
> date (MDT) year field, which is limited to a 4-bit value in the CID register. Under
> the current standard (EXT_CSD_REV=8), the representable years end in 2025.
>
> The first patch implements the recently approved JEDEC standard update for
> EXT_CSD_REV=9. This update rolls over the 4-bit year codes to cover a new 16-
> year period, extending the range up to 2038.
>
> The second patch introduces a quirk to handle vendor-specific behavior.
> Some eMMC vendors are not yet updating their devices to EXT_CSD_REV=9 but
> still need to report manufacturing dates for 2026 and beyond. These devices re-
> purpose the year codes for 2010-2012 to represent 2026-2028.
Ulf hi,
Would appreciate if you could look at this before year end.
Thanks,
Avri
>
> Thanks,
> Avri
>
> ---
> Changes in v2:
> - move the fixup to `mmc_ext_csd_fixups`
> - State the correct spec release
> - Fixed a typo in the commit message of the second patch.
> ---
>
> Avri Altman (2):
> mmc: core: Adjust MDT beyond 2025
> mmc: core: Add quirk for incorrect manufacturing date
>
> drivers/mmc/core/card.h | 6 ++++++
> drivers/mmc/core/mmc.c | 12 ++++++++++++
> drivers/mmc/core/quirks.h | 3 +++
> include/linux/mmc/card.h | 1 +
> 4 files changed, 22 insertions(+)
>
> --
> 2.34.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 0/2] mmc: core: Extend manufacturing date beyond 2025
2025-12-08 9:34 ` [PATCH v2 0/2] mmc: core: Extend manufacturing date beyond 2025 Avri Altman
@ 2025-12-09 11:42 ` Ulf Hansson
0 siblings, 0 replies; 8+ messages in thread
From: Ulf Hansson @ 2025-12-09 11:42 UTC (permalink / raw)
To: Avri Altman; +Cc: linux-mmc@vger.kernel.org
On Mon, 8 Dec 2025 at 10:34, Avri Altman <Avri.Altman@sandisk.com> wrote:
>
> > Hi Ulf,
> >
> > This patch series addresses the upcoming exhaustion of the eMMC manufacturing
> > date (MDT) year field, which is limited to a 4-bit value in the CID register. Under
> > the current standard (EXT_CSD_REV=8), the representable years end in 2025.
> >
> > The first patch implements the recently approved JEDEC standard update for
> > EXT_CSD_REV=9. This update rolls over the 4-bit year codes to cover a new 16-
> > year period, extending the range up to 2038.
> >
> > The second patch introduces a quirk to handle vendor-specific behavior.
> > Some eMMC vendors are not yet updating their devices to EXT_CSD_REV=9 but
> > still need to report manufacturing dates for 2026 and beyond. These devices re-
> > purpose the year codes for 2010-2012 to represent 2026-2028.
> Ulf hi,
> Would appreciate if you could look at this before year end.
The series looks good to me. I will apply it as soon as we have the v6.19-rc1.
[...]
Kind regards
Uffe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 0/2] mmc: core: Extend manufacturing date beyond 2025
2025-11-28 5:20 [PATCH v2 0/2] mmc: core: Extend manufacturing date beyond 2025 Avri Altman
` (2 preceding siblings ...)
2025-12-08 9:34 ` [PATCH v2 0/2] mmc: core: Extend manufacturing date beyond 2025 Avri Altman
@ 2025-12-15 15:43 ` Ulf Hansson
2025-12-15 16:28 ` Avri Altman
3 siblings, 1 reply; 8+ messages in thread
From: Ulf Hansson @ 2025-12-15 15:43 UTC (permalink / raw)
To: Avri Altman; +Cc: linux-mmc, Avri Altman
On Fri, 28 Nov 2025 at 06:20, Avri Altman <avri.altman@gmail.com> wrote:
>
> Hi Ulf,
>
> This patch series addresses the upcoming exhaustion of the eMMC
> manufacturing date (MDT) year field, which is limited to a 4-bit value
> in the CID register. Under the current standard (EXT_CSD_REV=8), the
> representable years end in 2025.
>
> The first patch implements the recently approved JEDEC standard update
> for EXT_CSD_REV=9. This update rolls over the 4-bit year codes to cover
> a new 16-year period, extending the range up to 2038.
>
> The second patch introduces a quirk to handle vendor-specific behavior.
> Some eMMC vendors are not yet updating their devices to EXT_CSD_REV=9
> but still need to report manufacturing dates for 2026 and beyond. These
> devices re-purpose the year codes for 2010-2012 to represent 2026-2028.
>
> Thanks,
> Avri
>
> ---
> Changes in v2:
> - move the fixup to `mmc_ext_csd_fixups`
> - State the correct spec release
> - Fixed a typo in the commit message of the second patch.
> ---
>
> Avri Altman (2):
> mmc: core: Adjust MDT beyond 2025
> mmc: core: Add quirk for incorrect manufacturing date
>
> drivers/mmc/core/card.h | 6 ++++++
> drivers/mmc/core/mmc.c | 12 ++++++++++++
> drivers/mmc/core/quirks.h | 3 +++
> include/linux/mmc/card.h | 1 +
> 4 files changed, 22 insertions(+)
>
> --
> 2.34.1
>
I have applied the series for next, thanks!
However, I noticed that the author of the patch has your gmail-address
and the sob has your sandisk-address. I guess we should change to your
sandisk-address to be in both places, no?
Kind regards
Uffe
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH v2 0/2] mmc: core: Extend manufacturing date beyond 2025
2025-12-15 15:43 ` Ulf Hansson
@ 2025-12-15 16:28 ` Avri Altman
2025-12-17 13:44 ` Ulf Hansson
0 siblings, 1 reply; 8+ messages in thread
From: Avri Altman @ 2025-12-15 16:28 UTC (permalink / raw)
To: Ulf Hansson; +Cc: linux-mmc@vger.kernel.org
> I have applied the series for next, thanks!
>
> However, I noticed that the author of the patch has your gmail-address and the
> sob has your sandisk-address. I guess we should change to your sandisk-address
> to be in both places, no?
Yes. Sorry for missing this.
Thanks,
Avri
>
> Kind regards
> Uffe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 0/2] mmc: core: Extend manufacturing date beyond 2025
2025-12-15 16:28 ` Avri Altman
@ 2025-12-17 13:44 ` Ulf Hansson
0 siblings, 0 replies; 8+ messages in thread
From: Ulf Hansson @ 2025-12-17 13:44 UTC (permalink / raw)
To: Avri Altman; +Cc: linux-mmc@vger.kernel.org
On Mon, 15 Dec 2025 at 17:28, Avri Altman <Avri.Altman@sandisk.com> wrote:
>
> > I have applied the series for next, thanks!
> >
> > However, I noticed that the author of the patch has your gmail-address and the
> > sob has your sandisk-address. I guess we should change to your sandisk-address
> > to be in both places, no?
> Yes. Sorry for missing this.
No worries, I have amended the commits accordingly.
Kind regards
Uffe
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-12-17 13:45 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-28 5:20 [PATCH v2 0/2] mmc: core: Extend manufacturing date beyond 2025 Avri Altman
2025-11-28 5:20 ` [PATCH v2 1/2] mmc: core: Adjust MDT " Avri Altman
2025-11-28 5:20 ` [PATCH v2 2/2] mmc: core: Add quirk for incorrect manufacturing date Avri Altman
2025-12-08 9:34 ` [PATCH v2 0/2] mmc: core: Extend manufacturing date beyond 2025 Avri Altman
2025-12-09 11:42 ` Ulf Hansson
2025-12-15 15:43 ` Ulf Hansson
2025-12-15 16:28 ` Avri Altman
2025-12-17 13:44 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox