[PATCH net-next 06/14] net: hns3: Remove obsolete 32-bit DMA mask fallback
From: Ruizhe Zhou
Date: Thu Sep 03 2026 - 04:50:44 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/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index e6af939c1c19..e43bd2035edb 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -9156,13 +9156,8 @@ static int hclge_pci_init(struct hclge_dev *hdev)
ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
if (ret) {
- ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
- if (ret) {
- dev_err(&pdev->dev,
- "can't set consistent PCI DMA\n");
- goto err_disable_device;
- }
- dev_warn(&pdev->dev, "set DMA mask to 32 bits\n");
+ dev_err(&pdev->dev, "can't set consistent PCI DMA\n");
+ goto err_disable_device;
}
ret = pci_request_regions(pdev, HCLGE_DRIVER_NAME);
--
2.27.0