[PATCH 1/2] RDMA/hfi1: Remove obsolete 32-bit DMA mask fallback
From: Ruizhe Zhou
Date: Wed Aug 12 2026 - 00:53:02 EST
The DMA API guarantees support for masks of 32 bits or wider and
explicitly identifies retrying a 32-bit mask after a 64-bit request as
incorrect:
https://docs.kernel.org/core-api/dma-api-howto.html#dma-addressing-capabilities
Remove the obsolete fallback while retaining the error check so that a
genuine DMA setup failure is still reported and aborts initialization.
Signed-off-by: Ruizhe Zhou <zhouruizhe@xxxxxxxxxxx>
---
drivers/infiniband/hw/hfi1/pcie.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/infiniband/hw/hfi1/pcie.c b/drivers/infiniband/hw/hfi1/pcie.c
index 1154b8cc713c..106bed4932c8 100644
--- a/drivers/infiniband/hw/hfi1/pcie.c
+++ b/drivers/infiniband/hw/hfi1/pcie.c
@@ -53,17 +53,9 @@ int hfi1_pcie_init(struct pci_dev *pdev)
ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
if (ret) {
- /*
- * If the 64 bit setup fails, try 32 bit. Some systems
- * do not setup 64 bit maps on systems with 2GB or less
- * memory installed.
- */
- ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
- if (ret) {
- dev_err(&pdev->dev, "Unable to set DMA mask: %pe\n",
- ERR_PTR(ret));
- goto bail;
- }
+ dev_err(&pdev->dev, "Unable to set DMA mask: %pe\n",
+ ERR_PTR(ret));
+ goto bail;
}
pci_set_master(pdev);
--
2.27.0