[PATCH] powerpc/iommu: DMA address offset is incorrectly calculated with 2MB TCEs

Michael Ellerman mpe at ellerman.id.au
Wed Apr 19 08:46:28 AEST 2023

Gaurav Batra <gbatra at linux.vnet.ibm.com> writes:
> When DMA window is backed by 2MB TCEs, the DMA address for the mapped
> page should be the offset of the page relative to the 2MB TCE. The code
> was incorrectly setting the DMA address to the beginning of the TCE
> range.
> Mellanox driver is reporting timeout trying to ENABLE_HCA for an SR-IOV
> ethernet port, when DMA window is backed by 2MB TCEs.
> Signed-off-by: Gaurav Batra <gbatra at linux.vnet.ibm.com>
> Reviewed-by: Greg Joyce <gjoyce at linux.vnet.ibm.com>
> Reviewed-by: Brian King <brking at linux.vnet.ibm.com>
> ---
>  arch/powerpc/kernel/iommu.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)

This should have a Fixes: tag.

I guess it's:

  387273118714 ("powerps/pseries/dma: Add support for 2M IOMMU page size")

Can you confirm?


More information about the Linuxppc-dev mailing list