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

Shawn Lin posted 4 patches 2 months ago
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(-)
[PATCH 0/4] Refactoring to support per-instance configurable max segments for dw_mmc
Posted by Shawn Lin 2 months ago
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
Re: [PATCH 0/4] Refactoring to support per-instance configurable max segments for dw_mmc
Posted by Ulf Hansson 1 month ago
On Thu, 9 Apr 2026 at 09:48, Shawn Lin <shawn.lin@rock-chips.com> wrote:
>
>
> 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
>

Patch 1 and 2 applied for next, thanks!

Kind regards
Uffe