[PATCH v2 4/5] mmc: fix mmc_bwrite() ignoring host get_b_max() callback

Kathpalia, Tanmay tanmay.kathpalia at altera.com
Tue Jul 14 13:31:27 CEST 2026


On 7/13/2026 7:02 PM, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan at nxp.com>
>
> mmc_bwrite() uses mmc->cfg->b_max directly to limit per-transfer block
> count. The read path (mmc_bread()) correctly calls mmc_get_b_max()
> which dispatches to the host driver get_b_max() callback. This callback
> allows host drivers to enforce DMA boundary constraints based on the
> buffer address.
>
> Fix mmc_bwrite() to use mmc_get_b_max() to match the read path. This
> requires removing the static qualifier from the non-DM mmc_get_b_max()
> and adding its declaration to mmc_private.h.
>
> Signed-off-by: Peng Fan <peng.fan at nxp.com>


Reviewed-by: Tanmay Kathpalia <tanmay.kathpalia at altera.com>



More information about the U-Boot mailing list