public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] mmc-utils: lsmmc.c: print_mmc_cid(): correct year/month parsing
@ 2025-11-04 20:00 Peter Korsgaard
  2025-11-04 20:00 ` [PATCH 2/2] mmc-utils: lsmmc.c: print_{mmc,sd}_cid(): correct month names Peter Korsgaard
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Peter Korsgaard @ 2025-11-04 20:00 UTC (permalink / raw)
  To: linux-mmc, Avri Altman, Ulf Hansson; +Cc: Peter Korsgaard

The parsing logic for the MMC manufacturing date had the year and month
swapped.  From JESD84:

The manufacturing date, MDT, is composed of two hexadecimal digits, four
bits each, representing a two digits date code m/y; The “m” field, most
significant nibble, is the month code.  1 = January.  The “y” field, least
significant nibble, is the year code.

Notice that this is the opposite of the SD bit ordering.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 lsmmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lsmmc.c b/lsmmc.c
index 799e1ea..7331c1b 100644
--- a/lsmmc.c
+++ b/lsmmc.c
@@ -589,7 +589,7 @@ static void print_mmc_cid(struct config *config, char *cid)
 
 	parse_bin(cid, "8u6r2u8u48a4u4u32u4u4u7u1r",
 		&mid, &cbx, &oid, &pnm[0], &prv_major, &prv_minor, &psn,
-		&mdt_year, &mdt_month, &crc);
+		&mdt_month, &mdt_year, &crc);
 
 	pnm[6] = '\0';
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-11-11 17:37 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-04 20:00 [PATCH 1/2] mmc-utils: lsmmc.c: print_mmc_cid(): correct year/month parsing Peter Korsgaard
2025-11-04 20:00 ` [PATCH 2/2] mmc-utils: lsmmc.c: print_{mmc,sd}_cid(): correct month names Peter Korsgaard
2025-11-11 17:36   ` Ulf Hansson
2025-11-05  2:04 ` [PATCH 1/2] mmc-utils: lsmmc.c: print_mmc_cid(): correct year/month parsing Shawn Lin
2025-11-05  6:56   ` Peter Korsgaard
2025-11-05  7:07   ` Peter Korsgaard
2025-11-05  7:23     ` Shawn Lin
2025-11-05 19:57       ` Avri Altman
2025-11-05 20:16         ` Peter Korsgaard
2025-11-07  1:39         ` Shawn Lin
2025-11-11 17:26         ` Ulf Hansson
2025-11-11 17:36 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox