Thread (21 messages) flat view 21 messages, 6 authors, 10d ago

Re: [PATCH net-next 08/14] net/mlx4: Remove obsolete 32-bit DMA mask fallback

From: Tariq Toukan <tariqt@nvidia.com>
Date: 2026-09-07 08:38:01
Also in: linux-rdma, lkml


On 03/09/2026 11:43, Ruizhe Zhou wrote:
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.
You also switched dev_warn into dev_err.
Patch LGTM.

Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
quoted hunk ↗ jump to hunk
Signed-off-by: Ruizhe Zhou <redacted>
---
  drivers/net/ethernet/mellanox/mlx4/main.c | 8 ++------
  1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index c851daa5da9f..036135df23bf 100644
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -3863,12 +3863,8 @@ static int __mlx4_init_one(struct pci_dev *pdev, int pci_dev_data,
  
  	err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
  	if (err) {
-		dev_warn(&pdev->dev, "Warning: couldn't set 64-bit PCI DMA mask\n");
-		err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
-		if (err) {
-			dev_err(&pdev->dev, "Can't set PCI DMA mask, aborting\n");
-			goto err_release_regions;
-		}
+		dev_err(&pdev->dev, "Can't set PCI DMA mask, aborting\n");
+		goto err_release_regions;
  	}
  
  	/* Allow large DMA segments, up to the firmware limit of 1 GB */
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help