[RFC PATCH] mmc: meson-mx-sdhc: add DMA bounce buffer support

ZHENPENG YUAN yuanzhenpeng210 at gmail.com
Tue Dec 1 04:31:50 PST 2026


On Tue, Nov 10, 2026 at 02:39:46PM +0100, Ulf Hansson wrote:
> On Sun, Nov 1, 2026 at 11:52 PM Martin Blumenstingl
> <martin.blumenstingl at googlemail.com> wrote:
> >
> > Let's wait for Ulf's feedback in the next few days if it's something
> > that should go into MMC core (either by default or opt-in) or if we
> > should keep it driver specific.
>
> I think I need to see an updated patch to see whether it makes sense
> to move this to the mmc core. And even it would, we can always apply
> it and make rework on top.

Hi Ulf and Martin,

First, please accept my apologies for taking so long to reply -- some
personal matters kept me away from following up sooner.

I have now prepared and posted an updated v2 series as a separate thread:
  [PATCH v2 0/2] mmc: meson-mx-sdhc: fix DMA error handling and add bounce buffer
  https://lore.kernel.org/r/<MESSAGE-ID-OF-V2-COVER-LETTER>

This v2 series addresses all the issues raised in this thread
(https://lore.kernel.org/linux-mmc/CAFBinCBo0C=KABcg5ueDTRSJhF9vmWnPwYHbaMGTOYppOsabwA@mail.gmail.com/T/#t):
- Patch 1/2 splits out and fixes the DMA error completion bug flagged by
  Sashiko (checking !cmd->error as well as !data->error, always unmapping
  DMA, propagating ready-poll failures, and keeping mapping errors local).
- Patch 2/2 provides the cleaned-up 128 KiB multi-segment bounce buffer
  using data->sg_len == 1 for direct DMA, devm_get_free_pages() with
  single-segment fallback, and bounded max_blk_count for SDIO, along with
  the MMC_CAP2_MERGE_CAPABLE comparison details.

Best regards,
Zhenpeng



More information about the linux-arm-kernel mailing list