Skip to content

mmc-utils: lsmmc: Fix Manufacturing Date decoding

[email protected] linux-mmc 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2mmc-utils: lsmmc: fix CID manufacturing date decodinglsmmc.c+22 -20 replies
2/2mmc-utils: lsmmc: cache ext_csd revision for MMC deviceslsmmc.c mmc_cmds.c mmc_cmds.h+40 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] mmc-utils: lsmmc: Fix Manufacturing Date decoding

From: Avri Altman <[email protected]>

This series fixes the decoding of the Manufacturing Date (MDT) field in the CID register within lsmmc.

The MDT year field is a 4-bit value relative to a base year. To determine the correct base year (1997, 2013, or 2029), the tool must consult the Extended CSD Revision (EXT_CSD_REV).

Previously, lsmmc processed registers in isolation and often lacked access to the EXT_CSD revision, leading to incorrect dates (e.g., interpreting a 2022 card as 2006).

Patch 1 updates the CID printing logic to select the correct base year based on the cached EXT_CSD revision.

Patch 2 ensures that lsmmc successfully retrieves and caches the EXT_CSD revision.

Avri Altman (2):
mmc-utils: lsmmc: fix CID manufacturing date decoding
mmc-utils: lsmmc: cache ext_csd revision for MMC devices

 lsmmc.c    | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
 mmc_cmds.c |  2 +-
 mmc_cmds.h |  3 +++
 3 files changed, 62 insertions(+), 3 deletions(-)
Signature · 1 line
2.34.1