Re: [PATCH 0/2] RDMA: Remove obsolete 32-bit DMA mask fallbacks
From: Leon Romanovsky
Date: Tue Sep 01 2026 - 09:44:21 EST
On Wed, 12 Aug 2026 11:36:45 +0800, Ruizhe Zhou wrote:
> hfi1 and mlx5 data direct both set a 64-bit DMA mask and retry with a
> 32-bit mask if the first call fails. This treats the return value of
> dma_set_mask_and_coherent() as an indication that the platform requires
> a narrower DMA width.
>
> That is not a correct interpretation of dma_set_mask_and_coherent().
> The mask describes the DMA addresses the device can accept and constrains
> subsequent mappings to that range. A 64-bit mask includes every address
> permitted by a 32-bit mask, including addresses from a platform that only
> produces 32-bit DMA addresses. Retrying with 32 bits therefore adds a stricter
> constraint and cannot correct a failure to establish the 64-bit mask.
> The DMA API HOWTO explicitly calls this fallback pattern incorrect [1].
> See [2] and [3] for details.
>
> [...]
Applied, thanks!
[1/2] RDMA/hfi1: Remove obsolete 32-bit DMA mask fallback
https://git.kernel.org/rdma/rdma/c/901c15a2099d43
[2/2] RDMA/mlx5: Remove obsolete 32-bit DMA mask fallback
https://git.kernel.org/rdma/rdma/c/08a978db86e877
Best regards,
--
Leon Romanovsky <leon@xxxxxxxxxx>