diff options
| author | Ruizhe Zhou <zhouruizhe@resnics.com> | 2026-09-03 16:43:31 +0800 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-09-08 16:46:26 -0700 |
| commit | e7d0cff7773bc11699eb27ebe81ad131498facb3 (patch) | |
| tree | 28b485f10811a0b221ca1e7c5902d73345ba39c1 | |
| parent | 0b861b6ee2ec79dd941820436bbb03991947f5a5 (diff) | |
| download | linux-next-e7d0cff7773bc11699eb27ebe81ad131498facb3.tar.gz linux-next-e7d0cff7773bc11699eb27ebe81ad131498facb3.zip | |
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 <zhouruizhe@resnics.com>
Link: https://patch.msgid.link/20260903084339.870562-7-zhouruizhe@resnics.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
| -rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 9 |
1 files 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); |
