From e7d0cff7773bc11699eb27ebe81ad131498facb3 Mon Sep 17 00:00:00 2001 From: Ruizhe Zhou Date: Thu, 3 Sep 2026 16:43:31 +0800 Subject: [PATCH] net: hns3: Remove obsolete 32-bit DMA mask fallback 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 Link: https://patch.msgid.link/20260903084339.870562-7-zhouruizhe@resnics.com Signed-off-by: Jakub Kicinski --- 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);