All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/3] mmc-utils: lsmmc: add 'mmc list' command
@ 2026-08-09  8:21 Torstein Eide
  2026-08-09  8:21 ` [PATCH v5 1/3] mmc-utils: lsmmc: Use external .ids files and accept /dev, /sys/block paths Torstein Eide
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Torstein Eide @ 2026-08-09  8:21 UTC (permalink / raw)
  To: linux-mmc; +Cc: Torstein Eide

This series adds a 'mmc list' command to lsmmc that scans
/sys/bus/mmc/devices/ and prints a one-line summary per MMC/SD device
(device name, /dev path, bus type, manufacturer, product, revision,
serial number, and manufacturing date), and teaches the existing
register-read commands to accept /dev and /sys/block paths directly
instead of only sysfs device directories.

Changes since v4:
- New patch 2 ("Factor out CID month/year helpers"): extracts the
  month-name table and manufacturing-year derivation that
  print_sd_cid() and print_mmc_cid() each open-coded into shared
  helpers (month_name(), sd_cid_year(), mmc_cid_year()), so patch 3
  has a single place to reuse instead of duplicating (and
  miscomputing) that logic.
- Patch 3 (Add mmc list command): print_list_entry() now uses those
  shared helpers instead of its own copy, which fixes two bugs the
  duplicated code had: the month table was indexed 0-based while
  mdt_month is 1-based, and the MMC manufacturing year hardcoded
  "1997 + mdt_year" instead of applying the ext_csd_rev based
  base-year adjustment. Also removed a stray double blank line.

Torstein Eide (3):
  mmc-utils: lsmmc: Use external .ids files and accept /dev, /sys/block
    paths
  mmc-utils: lsmmc: Factor out CID month/year helpers
  mmc-utils: lsmmc: Add mmc list command

 Makefile           |   8 +-
 docs/HOWTO.rst     |  71 ++++-
 lsmmc.c            | 645 ++++++++++++++++++++++++++-------------------
 mmc.c              |   6 +-
 mmc_cmds.h         |   1 +
 multimediacard.ids |  16 ++
 sdcard.ids         |  23 ++
 7 files changed, 485 insertions(+), 285 deletions(-)
 create mode 100644 multimediacard.ids
 create mode 100644 sdcard.ids

-- 
2.53.0


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

end of thread, other threads:[~2026-08-10  5:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-09  8:21 [PATCH v5 0/3] mmc-utils: lsmmc: add 'mmc list' command Torstein Eide
2026-08-09  8:21 ` [PATCH v5 1/3] mmc-utils: lsmmc: Use external .ids files and accept /dev, /sys/block paths Torstein Eide
2026-08-09  8:21 ` [PATCH v5 2/3] mmc-utils: lsmmc: Factor out CID month/year helpers Torstein Eide
2026-08-09  8:21 ` [PATCH v5 3/3] mmc-utils: lsmmc: Add mmc list command Torstein Eide
2026-08-10  5:46 ` [PATCH v5 0/3] mmc-utils: lsmmc: add 'mmc list' command Avri Altman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.