From 0a8bc1ad90ad990dbd1e1761f183b844b02ebb42 Mon Sep 17 00:00:00 2001 From: Ruizhe Zhou Date: Thu, 3 Sep 2026 16:43:38 +0800 Subject: [PATCH] net: renesas: rswitch: 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 wider 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 still aborts initialization. Signed-off-by: Ruizhe Zhou Link: https://patch.msgid.link/20260903084339.870562-14-zhouruizhe@resnics.com Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/renesas/rswitch_main.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/renesas/rswitch_main.c b/drivers/net/ethernet/renesas/rswitch_main.c index 755232994fcc..64b821ca02f8 100644 --- a/drivers/net/ethernet/renesas/rswitch_main.c +++ b/drivers/net/ethernet/renesas/rswitch_main.c @@ -2162,11 +2162,8 @@ static int renesas_eth_sw_probe(struct platform_device *pdev) return -ENOMEM; ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(40)); - if (ret < 0) { - ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); - if (ret < 0) - return ret; - } + if (ret) + return ret; priv->gwca.index = AGENT_INDEX_GWCA; priv->gwca.num_queues = min(RSWITCH_NUM_PORTS * NUM_QUEUES_PER_NDEV,