[PATCH 0/4] Refactoring to support per-instance configurable max segments for dw_mmc

From: Shawn Lin

Date: Thu Apr 09 2026 - 03:50:40 EST



The first patch is a defensive fix that addresses a crash caused by
incorrect max segment numbers provided by host drivers. Patches 2
through 4 then perform a step-by-step refactoring of the dw_mmc
code to support per-instance configurable max segments, which host
drivers can utilize in the future.



Shawn Lin (4):
mmc: core: mmc: core: Add validation for host-provided max_segs
mmc: dw_mmc: Move misplaced comment
mmc: dw_mmc: Add desc_num field for clarity
mmc: dw_mmc: Convert descriptor ring buffer to per-instance
configurable

drivers/mmc/core/queue.c | 8 +++++++-
drivers/mmc/host/dw_mmc.c | 27 +++++++++++++--------------
drivers/mmc/host/dw_mmc.h | 4 +++-
3 files changed, 23 insertions(+), 16 deletions(-)

--
2.7.4