From nobody Sat Sep 26 07:57:58 2026 Received: from mail-m32121.qiye.163.com (mail-m32121.qiye.163.com [220.197.32.121]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 31C4F3F6C5F; Thu, 3 Sep 2026 08:44:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=220.197.32.121 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788425097; cv=none; b=GSiUSczSXJ//BChs9hQsK2fNhw7TiMVaiW9qiV7tPcUuoQgN7XzYU/6B5/06UG+I2hxHBJ3brH4vaUK4G0UiUEcWNgsg9PDUUFXwZRsuZBynXKiLp04RQvaHEWmdpL0MAa3DSbssrtqxNK0g4bHTp4QeS0/QjvvEpA0X1icnv8U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788425097; c=relaxed/simple; bh=1grAJ1YvpwiB5F6wed9dB7HQWycCm4pvIhcZN+bl2T8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=FnYUELXwTa6wJgzZB/VIDM3ByzHbyT0FfZLLDrJ/a+TBaEgi6ytTPi3nev5UzNboaRjZRBjhThazvHTbKIY3M2D2O+FDwRPeTNYc7hWQYngaeEjswSF3w73cMkEOkpaz5lmcPYMftww/IYqaUDR9IdT0dQHgmxkeKV0gBJ7d55U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com; spf=pass smtp.mailfrom=resnics.com; arc=none smtp.client-ip=220.197.32.121 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=resnics.com Received: from localhost.localdomain (unknown [115.220.204.6]) by smtp.qiye.163.com (Hmail) with ESMTP id 4c65c5a79; Thu, 3 Sep 2026 16:44:44 +0800 (GMT+08:00) From: Ruizhe Zhou To: Sukhdeep Singh , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ruizhe Zhou Subject: [PATCH net-next 01/14] net: atlantic: Remove obsolete 32-bit DMA mask fallback Date: Thu, 3 Sep 2026 16:43:26 +0800 Message-Id: <20260903084339.870562-2-zhouruizhe@resnics.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20260903084339.870562-1-zhouruizhe@resnics.com> References: <20260903084339.870562-1-zhouruizhe@resnics.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-HM-Tid: 0aa066711e5703ackunm85c9d55b5cbff X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWRgWCB1ZQUpXWS1ZQUlXWQ8JGhUIEh9ZQVkZGElKVkNMQ0JLSU1JSk9DQlYVFA kWGhdVEwETFhoSFyQUDg9ZV1kYEgtZQVlKSk5VSUlLVUlLT1VNWVdZFhoPEhUdFFlBWU9LSFVKS0 lPT09IVUpLS1VKQktLWQY+ Content-Type: text/plain; charset="utf-8" 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-capabili= ties Remove the obsolete fallback while retaining the error check so that a genuine DMA setup failure still aborts initialization. Signed-off-by: Ruizhe Zhou --- drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c b/drivers= /net/ethernet/aquantia/atlantic/aq_pci_func.c index 005d6ef4fc36..04b3ef840b36 100644 --- a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c +++ b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c @@ -125,8 +125,6 @@ static int aq_pci_func_init(struct pci_dev *pdev) int err; =20 err =3D dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); - if (err) - err =3D dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); if (err) { err =3D -ENOSR; goto err_exit; --=20 2.27.0 From nobody Sat Sep 26 07:57:58 2026 Received: from mail-m49195.qiye.163.com (mail-m49195.qiye.163.com [45.254.49.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 69000463B9B; Thu, 3 Sep 2026 09:00:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.254.49.195 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788426014; cv=none; b=PmfLbiutP+GWZ7cqNHM/lxSTILNgGmL4wZvbDImDsW3Z3X8y5jitJvfYt8PZqFrPnp5EszqsVfgwn1yYyF+gg9ahXNGOULv5ZFQgV9kmoi2dm4Zu1//KZiNy0qPKkCLY/nAtijpbAhxDBec3crt0dbMeUWtS5Ktp9SqkvuFgmjE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788426014; c=relaxed/simple; bh=DP5ug96jSZhhbn5PiK1JRJeUkMOpEdyiGgmuGPV7Km4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=YBM+dP4sTIBROHPEfv6+YC50/fWoYSsFYlVRsu4SnSnYJfugLpICEsFNBl5h6eD5XmcITzz9RRwHEbTuPYsvJu0G/T8r2yk6ZtYC1dP5Tf7EfMa9owtzxXogK9GkVKpCyU+9qaDJ41KgSPl6kNHE+BWQEPwyMQEcmggHlbRZm5A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com; spf=pass smtp.mailfrom=resnics.com; arc=none smtp.client-ip=45.254.49.195 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=resnics.com Received: from localhost.localdomain (unknown [115.220.204.6]) by smtp.qiye.163.com (Hmail) with ESMTP id 4c65c5a83; Thu, 3 Sep 2026 16:44:45 +0800 (GMT+08:00) From: Ruizhe Zhou To: Chris Snook , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ruizhe Zhou Subject: [PATCH net-next 02/14] net: alx: Remove obsolete 32-bit DMA mask fallback Date: Thu, 3 Sep 2026 16:43:27 +0800 Message-Id: <20260903084339.870562-3-zhouruizhe@resnics.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20260903084339.870562-1-zhouruizhe@resnics.com> References: <20260903084339.870562-1-zhouruizhe@resnics.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-HM-Tid: 0aa0667122c303ackunm85c9d55b5cc0c X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWRgWCB1ZQUpXWS1ZQUlXWQ8JGhUIEh9ZQVlCSx1DVktOTUgYGUtPSBpMHVYVFA kWGhdVEwETFhoSFyQUDg9ZV1kYEgtZQVlKSk5VSUlLVUlLT1VNWVdZFhoPEhUdFFlBWU9LSFVKS0 lPT09IVUpLS1VKQktLWQY+ Content-Type: text/plain; charset="utf-8" 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-capabili= ties 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 --- drivers/net/ethernet/atheros/alx/main.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet= /atheros/alx/main.c index ab262e66f986..3ca69fd14a5c 100644 --- a/drivers/net/ethernet/atheros/alx/main.c +++ b/drivers/net/ethernet/atheros/alx/main.c @@ -1727,15 +1727,12 @@ static int alx_probe(struct pci_dev *pdev, const st= ruct pci_device_id *ent) * shared register for the high 32 bits, so only a single, aligned, * 4 GB physical address range can be used for descriptors. */ - if (!dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64))) { - dev_dbg(&pdev->dev, "DMA to 64-BIT addresses\n"); - } else { - err =3D dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); - if (err) { - dev_err(&pdev->dev, "No usable DMA config, aborting\n"); - goto out_pci_disable; - } + err =3D dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); + if (err) { + dev_err(&pdev->dev, "No usable DMA config, aborting\n"); + goto out_pci_disable; } + dev_dbg(&pdev->dev, "DMA to 64-BIT addresses\n"); =20 err =3D pci_request_mem_regions(pdev, alx_drv_name); if (err) { --=20 2.27.0 From nobody Sat Sep 26 07:57:58 2026 Received: from mail-m15594.qiye.163.com (mail-m15594.qiye.163.com [101.71.155.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B1A30443E3F; Thu, 3 Sep 2026 08:44:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=101.71.155.94 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788425100; cv=none; b=V/1c2cv6b/QpSrebU03/cXrh4t99SrihKrIPKDLqKtyOWFBJ3npi5pErzkb/2zuHQ8POhsrVP0KBN/0Yw9uKqAFGNW9MjhCY359LgESfmgUu7FCaqUaLx37QL6MsgU7Cw+psbuqlG5l0SBG9AqJI9PHdcFEBLyz0l6vulk8P098= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788425100; c=relaxed/simple; bh=OK+xl65sbnTrx+Xo06xjRtmxQFFRMlFv2LiruiVyY1U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=HDxSdOOM8eW9l2H9cDiqpQiZNe48HxZ7YMyJOtxOW72T4YmvZgdmcBvNE/zTjUHtBOzbtAb+UCEH1BuzwqKsLVOkJzdTyfCSS6fjMmh4q9Wwgj1A6F4XWCKW2cpKqa+Yi2nqeEfPzOjqx1oZ/HnM1yumjknJm5kKCX5gTG8PvO8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com; spf=pass smtp.mailfrom=resnics.com; arc=none smtp.client-ip=101.71.155.94 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=resnics.com Received: from localhost.localdomain (unknown [115.220.204.6]) by smtp.qiye.163.com (Hmail) with ESMTP id 4c65c5a8e; Thu, 3 Sep 2026 16:44:46 +0800 (GMT+08:00) From: Ruizhe Zhou To: Florian Fainelli , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ruizhe Zhou , Broadcom internal kernel review list Subject: [PATCH net-next 03/14] net: systemport: Remove obsolete 32-bit DMA mask fallback Date: Thu, 3 Sep 2026 16:43:28 +0800 Message-Id: <20260903084339.870562-4-zhouruizhe@resnics.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20260903084339.870562-1-zhouruizhe@resnics.com> References: <20260903084339.870562-1-zhouruizhe@resnics.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-HM-Tid: 0aa0667127ce03ackunm85c9d55b5cc19 X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWRgWCB1ZQUpXWS1ZQUlXWQ8JGhUIEh9ZQVlDSUlIVh5CGk5DTEIaQx5MHlYVFA kWGhdVEwETFhoSFyQUDg9ZV1kYEgtZQVlKSk5VSUlLVUlLT1VNWVdZFhoPEhUdFFlBWU9LSFVKS0 lPT09IVUpLS1VKQktLWQY+ Content-Type: text/plain; charset="utf-8" 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-capabili= ties 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 --- drivers/net/ethernet/broadcom/bcmsysport.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ether= net/broadcom/bcmsysport.c index 4d06c6ba6641..4f0ec136b606 100644 --- a/drivers/net/ethernet/broadcom/bcmsysport.c +++ b/drivers/net/ethernet/broadcom/bcmsysport.c @@ -2453,8 +2453,6 @@ static int bcm_sysport_probe(struct platform_device *= pdev) return -EINVAL; =20 ret =3D dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(40)); - if (ret) - ret =3D dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); if (ret) { dev_err(&pdev->dev, "unable to set DMA mask: %d\n", ret); return ret; --=20 2.27.0 From nobody Sat Sep 26 07:57:58 2026 Received: from mail-m49226.qiye.163.com (mail-m49226.qiye.163.com [45.254.49.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA3EA431E68; Thu, 3 Sep 2026 11:07:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.254.49.226 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788433644; cv=none; b=BffK6nfLVtdvUHkiRa28s94Zy1RELkGJ7afMEGHtqqSVT8RlkHF7zM6tnCEpxXtrtEpn0o/L11QyH3GQ9AZ5jia38lQBuzp3gvcfZXY2iAcBM7TsaLEbcbfHtJcNf5Otg/3Ygkx4s8SkT4UGJhljX8S2gKNRi8l3qgqmVjTPHy8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788433644; c=relaxed/simple; bh=IJGozM6s/ale0r1EEkXytOcvAiIFZCktGMSge/1lhxY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=XGHz5ePtDxVjH1NSVt67uAf+ophRsiaKiEWbytW+tNQURO5mToLo7ElEl59HSz5PgG9H+SM4FolU/RBKsfkxIwK1YYi3wlgFyMMcZQb+S8aiXDwd7VcpLPhyNg7KNvC1msHduKzf8/ipv5NrcU0JYELBoJxGPCdHfp4iPw6KTt0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com; spf=pass smtp.mailfrom=resnics.com; arc=none smtp.client-ip=45.254.49.226 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=resnics.com Received: from localhost.localdomain (unknown [115.220.204.6]) by smtp.qiye.163.com (Hmail) with ESMTP id 4c65c5a96; Thu, 3 Sep 2026 16:44:48 +0800 (GMT+08:00) From: Ruizhe Zhou To: Michael Chan , Pavan Chebbi , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ruizhe Zhou Subject: [PATCH net-next 04/14] bnxt_en: Remove obsolete 32-bit DMA mask fallback Date: Thu, 3 Sep 2026 16:43:29 +0800 Message-Id: <20260903084339.870562-5-zhouruizhe@resnics.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20260903084339.870562-1-zhouruizhe@resnics.com> References: <20260903084339.870562-1-zhouruizhe@resnics.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-HM-Tid: 0aa066712c6603ackunm85c9d55b5cc23 X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWRgWCB1ZQUpXWS1ZQUlXWQ8JGhUIEh9ZQVlDSU4eVk1CS0pCSkhPSx5DSVYVFA kWGhdVEwETFhoSFyQUDg9ZV1kYEgtZQVlKSk5VSUlLVUlLT1VNWVdZFhoPEhUdFFlBWU9LSFVKS0 lPT09IVUpLS1VKQktLWQY+ Content-Type: text/plain; charset="utf-8" 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-capabili= ties 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 --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethern= et/broadcom/bnxt/bnxt.c index d59bcca73a2b..1d5cb53f4258 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -15610,8 +15610,8 @@ static int bnxt_init_board(struct pci_dev *pdev, st= ruct net_device *dev) goto init_err_disable; } =20 - if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)) !=3D 0 && - dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)) !=3D 0) { + rc =3D dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); + if (rc) { dev_err(&pdev->dev, "System does not support DMA, aborting\n"); rc =3D -EIO; goto init_err_release; --=20 2.27.0 From nobody Sat Sep 26 07:57:58 2026 Received: from mail-m49247.qiye.163.com (mail-m49247.qiye.163.com [45.254.49.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 101BC442FD4; Thu, 3 Sep 2026 08:44:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.254.49.247 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788425101; cv=none; b=n7XHgDw7eqJxQ/VrhAZ9jZ1sEJEkIv2w4VIrtNI85kgLsOnuXdMYQnE2/P1wc0QK5rVnRfVz4qT9E2tI1VSS0BWLrtuPQZHgAIupgkltLJSABGVHkd34BPSefRAdkeS20DPpi5mrxufrvv+Esp12Zg3VF0lbwu5DCqmz6m1stRk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788425101; c=relaxed/simple; bh=bD/E5OXt9bu31EjGp9Dxo768gwyJHnmNAZC/wG3PPGw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=H2MgAlKiQ4YkXIwjhaJJ0bhZcsXsADw9VaHDYk0lc1JJh+AnoFDytdmCf2H3UJWMvP2aratXkBvLwbaZvwZ1ovuZvrStpjKCM/MC88oGSWlWTwPrSh+oh8/x8y6EToNKW2Wi0ZpSgGldpoYihnT+SuaSqgC1mOfwaO1o40n6c8I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com; spf=pass smtp.mailfrom=resnics.com; arc=none smtp.client-ip=45.254.49.247 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=resnics.com Received: from localhost.localdomain (unknown [115.220.204.6]) by smtp.qiye.163.com (Hmail) with ESMTP id 4c65c5aa0; Thu, 3 Sep 2026 16:44:49 +0800 (GMT+08:00) From: Ruizhe Zhou To: Satish Kharat , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ruizhe Zhou Subject: [PATCH net-next 05/14] enic: Remove obsolete 32-bit DMA mask fallback Date: Thu, 3 Sep 2026 16:43:30 +0800 Message-Id: <20260903084339.870562-6-zhouruizhe@resnics.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20260903084339.870562-1-zhouruizhe@resnics.com> References: <20260903084339.870562-1-zhouruizhe@resnics.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-HM-Tid: 0aa0667130a703ackunm85c9d55b5cc2b X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWRgWCB1ZQUpXWS1ZQUlXWQ8JGhUIEh9ZQVlCQ05NVk5DTUkZSEtOSE4dGlYVFA kWGhdVEwETFhoSFyQUDg9ZV1kYEgtZQVlKSk5VSUlLVUlLT1VNWVdZFhoPEhUdFFlBWU9LSFVKS0 lPT09IVUpLS1VKQktLWQY+ Content-Type: text/plain; charset="utf-8" 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-capabili= ties Remove the obsolete fallback while retaining the error check so that a genuine DMA setup failure is still reported and aborts initialization. A successful setup now necessarily uses the 47-bit mask, so remove the redundant using_dac flag and advertise NETIF_F_HIGHDMA directly. Signed-off-by: Ruizhe Zhou --- drivers/net/ethernet/cisco/enic/enic_main.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethe= rnet/cisco/enic/enic_main.c index 0baef7a120ec..d32fd03bbf6a 100644 --- a/drivers/net/ethernet/cisco/enic/enic_main.c +++ b/drivers/net/ethernet/cisco/enic/enic_main.c @@ -2991,7 +2991,6 @@ static int enic_probe(struct pci_dev *pdev, const str= uct pci_device_id *ent) struct device *dev =3D &pdev->dev; struct net_device *netdev; struct enic *enic; - int using_dac =3D 0; unsigned int i; int err; #ifdef CONFIG_PCI_IOV @@ -3033,20 +3032,11 @@ static int enic_probe(struct pci_dev *pdev, const s= truct pci_device_id *ent) =20 pci_set_master(pdev); =20 - /* Query PCI controller on system for DMA addressing - * limitation for the device. Try 47-bit first, and - * fail to 32-bit. - */ - + /* The device supports DMA addresses up to 47 bits. */ err =3D dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(47)); if (err) { - err =3D dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); - if (err) { - dev_err(dev, "No usable DMA configuration, aborting\n"); - goto err_out_release_regions; - } - } else { - using_dac =3D 1; + dev_err(dev, "No usable DMA configuration, aborting\n"); + goto err_out_release_regions; } =20 /* Map vNIC resources from BAR0-5 @@ -3319,8 +3309,7 @@ static int enic_probe(struct pci_dev *pdev, const str= uct pci_device_id *ent) netdev->hw_features |=3D NETIF_F_NTUPLE; #endif =20 - if (using_dac) - netdev->features |=3D NETIF_F_HIGHDMA; + netdev->features |=3D NETIF_F_HIGHDMA; =20 netdev->priv_flags |=3D IFF_UNICAST_FLT; =20 --=20 2.27.0 From nobody Sat Sep 26 07:57:58 2026 Received: from mail-m121146.qiye.163.com (mail-m121146.qiye.163.com [115.236.121.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D5E83F1ABD; Thu, 3 Sep 2026 08:44:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.236.121.146 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788425098; cv=none; b=rnKNDg9NTQiIhHYKBxV7buvxtkCkW+SrbXGLSeAOLLRoh+6/S/wPpCaZCkkEiUNbO5OjPFmB6UqLaCpz5RFX5XNIuJbkPbuLbXDMJEb/Wuge+d6vGGqnMy8yo0Wb0agO5+lkIljQNtKK+kpYSL5aGDsU/f3Z2XRvwhD6723Oit8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788425098; c=relaxed/simple; bh=WzO0/5VgtoQy9YHoIUq4rYaLurn+/lVYQDSoAk8b6AI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Qjg6Hbzo2TAshIOnR7ZAjO3C70FMeuCY1U+DbKxesExQE2yOjpiA7jSYgKdGHAk1wlpqPAbeUp8fACOqAT+I0yKDdHncg//qq8pucbvkNMlDfvfg2N6ahp2XtZbdURmOiqcScTu6NYm5/sWYE9hC0/w+W1EHntqnJndlcTKtwu0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com; spf=pass smtp.mailfrom=resnics.com; arc=none smtp.client-ip=115.236.121.146 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=resnics.com Received: from localhost.localdomain (unknown [115.220.204.6]) by smtp.qiye.163.com (Hmail) with ESMTP id 4c65c5aa6; Thu, 3 Sep 2026 16:44:50 +0800 (GMT+08:00) From: Ruizhe Zhou To: Jian Shen , Jijie Shao , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ruizhe Zhou Subject: [PATCH net-next 06/14] net: hns3: Remove obsolete 32-bit DMA mask fallback Date: Thu, 3 Sep 2026 16:43:31 +0800 Message-Id: <20260903084339.870562-7-zhouruizhe@resnics.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20260903084339.870562-1-zhouruizhe@resnics.com> References: <20260903084339.870562-1-zhouruizhe@resnics.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-HM-Tid: 0aa0667134ea03ackunm85c9d55b5cc33 X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWRgWCB1ZQUpXWS1ZQUlXWQ8JGhUIEh9ZQVkaTE4fVklOQkJPSR4YShpIQ1YVFA kWGhdVEwETFhoSFyQUDg9ZV1kYEgtZQVlKSk5VSUlLVUlLT1VNWVdZFhoPEhUdFFlBWU9LSFVKS0 lPT09IVUpLS1VKQktLWQY+ Content-Type: text/plain; charset="utf-8" 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-capabili= ties 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 --- 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/driv= ers/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) =20 ret =3D dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); if (ret) { - ret =3D 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; } =20 ret =3D pci_request_regions(pdev, HCLGE_DRIVER_NAME); --=20 2.27.0 From nobody Sat Sep 26 07:57:58 2026 Received: from mail-m1973188.qiye.163.com (mail-m1973188.qiye.163.com [220.197.31.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F20DE468C2A; Thu, 3 Sep 2026 09:00:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=220.197.31.88 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788426019; cv=none; b=pDEqG12SixEMZgeh7POQgM9Q4AvZ3tDGFrDKEUN/nVrA5+nBSSvCNhMFhxxTfHR1l5Q3PVTjYsRoB6C4k7fAFpL1XYWVgdFBTaiMRCv+s/eX4mGWsKk0YkuQXHgIKKXmyQNHt7v9MtW2luq/lCIEpCArldy1/RQ3r2DA8k+W06Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788426019; c=relaxed/simple; bh=PTRJfemoe3i9ze7JJ09GzPD00fOSPDt8dJ99Gq6OhIY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=kA70KOS+Ry4dhmq6OgL0sVPnl4YgT/09ewBbMHJWZ7BVXrRPUEOaL5LfDcs9TBLR0bbeRYMhK1oUJBLPbc+uQ9bLQDz0u+D2qZ2suFGuwiJNnYkzlfsWslqCFVqa7M9ejyGBcPK/gz4RW6MNLlrruBli2tGz8hRrFZFyUPQncnk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com; spf=pass smtp.mailfrom=resnics.com; arc=none smtp.client-ip=220.197.31.88 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=resnics.com Received: from localhost.localdomain (unknown [115.220.204.6]) by smtp.qiye.163.com (Hmail) with ESMTP id 4c65c5aac; Thu, 3 Sep 2026 16:44:51 +0800 (GMT+08:00) From: Ruizhe Zhou To: Tony Nguyen , Przemek Kitszel , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ruizhe Zhou , intel-wired-lan@lists.osuosl.org Subject: [PATCH net-next 07/14] fm10k: Remove obsolete 32-bit DMA mask fallback Date: Thu, 3 Sep 2026 16:43:32 +0800 Message-Id: <20260903084339.870562-8-zhouruizhe@resnics.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20260903084339.870562-1-zhouruizhe@resnics.com> References: <20260903084339.870562-1-zhouruizhe@resnics.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-HM-Tid: 0aa0667139c003ackunm85c9d55b5cc3c X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWRgWCB1ZQUpXWS1ZQUlXWQ8JGhUIEh9ZQVkZGR5OVh8eGEgfQkNJTUwZGlYVFA kWGhdVEwETFhoSFyQUDg9ZV1kYEgtZQVlKSk5VSUlLVUlLT1VNWVdZFhoPEhUdFFlBWU9LSFVKS0 lPT09IVUpLS1VKQktLWQY+ Content-Type: text/plain; charset="utf-8" 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-capabili= ties 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 --- drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c b/drivers/net/eth= ernet/intel/fm10k/fm10k_pci.c index f5b4d062709a..afe939f8f4ef 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c @@ -2111,8 +2111,6 @@ static int fm10k_probe(struct pci_dev *pdev, const st= ruct pci_device_id *ent) } =20 err =3D dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(48)); - if (err) - err =3D dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); if (err) { dev_err(&pdev->dev, "DMA configuration failed: %d\n", err); --=20 2.27.0 From nobody Sat Sep 26 07:57:58 2026 Received: from mail-m3296.qiye.163.com (mail-m3296.qiye.163.com [220.197.32.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D71F3459ADC; Thu, 3 Sep 2026 08:45:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=220.197.32.96 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788425108; cv=none; b=QCGE+1AZyM+3OfHQcPS90z7/DsZRma/tNnj73xkZkHl48E02SsbQuDuy+/AM9iI8tFiMzGaDF35iOk+o9XVmfJxkRFYjzbthmpgsnIgUkWAIBrBM6uQFCtBNogzbzv4uXDRG0UvCg0gabhujCJkIJ7dPdE5/qO1XpKz1V7X8Duk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788425108; c=relaxed/simple; bh=hKrDGdxW2JPGjGpQbTdFvuDbjv9KcF3zP8DH4D5mPjA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=QrQ31c0tBQA9PSyweXD9haBLXIsN7GY5uoloL9ErDpf0dZ8IMqtJdWC6K4Ot+YM1uZO3OhmmkPLL45g5LH0KE0k7G3eKZCfLnN8CpuV2EWIOIz7b5hkRK5MJFZxs5q6zmDUKOOs70lTX388Ky31RjoiM0tX8Gvs0PFgV7l2lLpQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com; spf=pass smtp.mailfrom=resnics.com; arc=none smtp.client-ip=220.197.32.96 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=resnics.com Received: from localhost.localdomain (unknown [115.220.204.6]) by smtp.qiye.163.com (Hmail) with ESMTP id 4c65c5ab3; Thu, 3 Sep 2026 16:44:52 +0800 (GMT+08:00) From: Ruizhe Zhou To: Tariq Toukan , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ruizhe Zhou , linux-rdma@vger.kernel.org Subject: [PATCH net-next 08/14] net/mlx4: Remove obsolete 32-bit DMA mask fallback Date: Thu, 3 Sep 2026 16:43:33 +0800 Message-Id: <20260903084339.870562-9-zhouruizhe@resnics.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20260903084339.870562-1-zhouruizhe@resnics.com> References: <20260903084339.870562-1-zhouruizhe@resnics.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-HM-Tid: 0aa066713e8e03ackunm85c9d55b5cc44 X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWRgWCB1ZQUpXWS1ZQUlXWQ8JGhUIEh9ZQVkaSBhLVkxNSxkZTk9KGhkZGlYVFA kWGhdVEwETFhoSFyQUDg9ZV1kYEgtZQVlKSk5VSUlLVUlLT1VNWVdZFhoPEhUdFFlBWU9LSFVKS0 lPT09IVUpLS1VKQktLWQY+ Content-Type: text/plain; charset="utf-8" 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-capabili= ties 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 Reviewed-by: Tariq Toukan --- 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/ethern= et/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, =20 err =3D 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 =3D 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; } =20 /* Allow large DMA segments, up to the firmware limit of 1 GB */ --=20 2.27.0 From nobody Sat Sep 26 07:57:58 2026 Received: from mail-m49245.qiye.163.com (mail-m49245.qiye.163.com [45.254.49.245]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F40A0468C04; Thu, 3 Sep 2026 09:00:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.254.49.245 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788426027; cv=none; b=EvcLZWe6blIqTklHjNYHTnkf6NfCylRXYBpn8PoyfMULvOyx6vBt0l0kwKWFVLLeElbwHnQZ18jdXhkD9NttdQGPEZm/TiXVxrHq0U8GJZq6m4vaXLP6IHMWHpw29HURAZJ4asuO+8H7kFWveX/0xH1+W+KJ+a81mDn8HYjgAN0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788426027; c=relaxed/simple; bh=k2s24Epr8d2og4QKDEVuBNYGvZenuKZ2ntwRcgkp3nc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ATPhnZmrBY5ZpRU+woxOmOZa/nurFHuuwaTsRgtaPhx4bioxuWfXhUdmtllK6+piediNuEQ/+4C2Ogs/BzB/J+J/jXdXiZylMme8/4QjVRz37+ltU1bPSX/MK3wX+IyYWOpvDm9D5WeybJ66VdtYvPAkwOox49F4GJQ68wTKlN0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com; spf=pass smtp.mailfrom=resnics.com; arc=none smtp.client-ip=45.254.49.245 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=resnics.com Received: from localhost.localdomain (unknown [115.220.204.6]) by smtp.qiye.163.com (Hmail) with ESMTP id 4c65c5abb; Thu, 3 Sep 2026 16:44:53 +0800 (GMT+08:00) From: Ruizhe Zhou To: Saeed Mahameed , Leon Romanovsky , Tariq Toukan , Mark Bloch , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ruizhe Zhou , linux-rdma@vger.kernel.org Subject: [PATCH net-next 09/14] net/mlx5: Remove obsolete 32-bit DMA mask fallback Date: Thu, 3 Sep 2026 16:43:34 +0800 Message-Id: <20260903084339.870562-10-zhouruizhe@resnics.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20260903084339.870562-1-zhouruizhe@resnics.com> References: <20260903084339.870562-1-zhouruizhe@resnics.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-HM-Tid: 0aa06671431d03ackunm85c9d55b5cc50 X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWRgWCB1ZQUpXWS1ZQUlXWQ8JGhUIEh9ZQVkaQ0wZVkJJSEoaSkxOTx5LSFYVFA kWGhdVEwETFhoSFyQUDg9ZV1kYEgtZQVlKSk5VSUlLVUlLT1VNWVdZFhoPEhUdFFlBWU9LSFVKS0 lPT09IVUpLS1VKQktLWQY+ Content-Type: text/plain; charset="utf-8" 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-capabili= ties 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 Reviewed-by: Tariq Toukan --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/e= thernet/mellanox/mlx5/core/main.c index 5f28d906c35b..3a3b0ec4aad1 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -184,12 +184,8 @@ static int set_dma_caps(struct pci_dev *pdev) =20 err =3D 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 =3D 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"); - return err; - } + dev_err(&pdev->dev, "Can't set PCI DMA mask, aborting\n"); + return err; } =20 dma_set_max_seg_size(&pdev->dev, 2u * 1024 * 1024 * 1024); --=20 2.27.0 From nobody Sat Sep 26 07:57:58 2026 Received: from mail-m12773.qiye.163.com (mail-m12773.qiye.163.com [115.236.127.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1CFD63B8BA1; Thu, 3 Sep 2026 08:45:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.236.127.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788425109; cv=none; b=CaEeXE1n9r98M7ysCQz3CysErwPY00xPQeFM36B450BTPyQGSo6NlVdVe3zwQmHtA7904wJLg+Gu8NiSdzzU/RXp5GaOpdf7FDignRbX6e/vPCP0FVgPHd4AvyXABUiJqdMLpZKzcX8XXO4DqH8sBzGuL2lqI+ZsQRqsCv1V8ME= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788425109; c=relaxed/simple; bh=UCYdr2Y/rBqwcbA6YV9eJ1aj61aKPnsVFXZbqV5ilnU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Re0Ncp9DrETtoxrarM/55luJV6UwdhT2U1XL4fKHY65c3XwvBdxU6/3crnzWePuk8DQa1qZzFr8C8NWpXSno0Q4Pc69Jxu3VEWpvNd8xF1UbQ54NRTrGGw4pSbaV3NGoYAkD2tqaa/MBTYfcNyQ8PoAdPzvJiZ5mPvdxy2qmcfU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com; spf=pass smtp.mailfrom=resnics.com; arc=none smtp.client-ip=115.236.127.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=resnics.com Received: from localhost.localdomain (unknown [115.220.204.6]) by smtp.qiye.163.com (Hmail) with ESMTP id 4c65c5ac7; Thu, 3 Sep 2026 16:44:55 +0800 (GMT+08:00) From: Ruizhe Zhou To: Ido Schimmel , Petr Machata , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ruizhe Zhou Subject: [PATCH net-next 10/14] mlxsw: pci: Remove obsolete 32-bit DMA mask fallback Date: Thu, 3 Sep 2026 16:43:35 +0800 Message-Id: <20260903084339.870562-11-zhouruizhe@resnics.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20260903084339.870562-1-zhouruizhe@resnics.com> References: <20260903084339.870562-1-zhouruizhe@resnics.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-HM-Tid: 0aa0667147ee03ackunm85c9d55b5cc5d X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWRgWCB1ZQUpXWS1ZQUlXWQ8JGhUIEh9ZQVkZTRgaVk1OQ0oZTE9JS0xJHVYVFA kWGhdVEwETFhoSFyQUDg9ZV1kYEgtZQVlKSk5VSUlLVUlLT1VNWVdZFhoPEhUdFFlBWU9LSFVKS0 lPT09IVUpLS1VKQktLWQY+ Content-Type: text/plain; charset="utf-8" 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-capabili= ties Remove the obsolete fallback while retaining the error check so that a genuine DMA setup failure is still reported and aborts initialization. Update the error message to identify the combined streaming and coherent DMA mask operation. Signed-off-by: Ruizhe Zhou Reviewed-by: Petr Machata --- drivers/net/ethernet/mellanox/mlxsw/pci.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/pci.c b/drivers/net/ethern= et/mellanox/mlxsw/pci.c index bfe3268dfdc1..dceb69945d26 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/pci.c +++ b/drivers/net/ethernet/mellanox/mlxsw/pci.c @@ -2429,11 +2429,8 @@ static int mlxsw_pci_probe(struct pci_dev *pdev, con= st struct pci_device_id *id) =20 err =3D dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); if (err) { - err =3D dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); - if (err) { - dev_err(&pdev->dev, "dma_set_mask failed\n"); - goto err_pci_set_dma_mask; - } + dev_err(&pdev->dev, "dma_set_mask_and_coherent failed\n"); + goto err_pci_set_dma_mask; } =20 if (pci_resource_len(pdev, 0) < MLXSW_PCI_BAR0_SIZE) { --=20 2.27.0 From nobody Sat Sep 26 07:57:58 2026 Received: from mail-m1973175.qiye.163.com (mail-m1973175.qiye.163.com [220.197.31.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E9CF463B74; Thu, 3 Sep 2026 08:45:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=220.197.31.75 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788425105; cv=none; b=bt8UN70+jUJkAY7v6VBjbcvkfci2YhO7tRj7P2yltEZFuQxzYCZc/Oj5rget3JPMTRTfIZ6Jw1y9usi3kjRn9hnEMCfNyKwQ2tkLqbFJMuNEq4LhaXY8JH47ReVFs8x0bAWhwWnUbU+a14zIqdYVtr32zwe3ENsq2FWjt7fmiic= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788425105; c=relaxed/simple; bh=3EAUHti9+2oPFLc2dvtf/qK6I2WSVDtJTrsblkpGdeI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=iOOi1fkUn6v+ZGP1suGOlpgv6IXzOTVe1fZEjFofel6LBn4XZengUmM8mPszzzvsoKcMjeFDZIC+NsExKRAk9cvSyF9HMbH/9640Ti2d+QOynu2BYeO8+O7DWwxn5/3Yy6eTBxSLZOHg/n2o/BL5wlKbClQbo8QnzNoDaT/O5yM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com; spf=pass smtp.mailfrom=resnics.com; arc=none smtp.client-ip=220.197.31.75 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=resnics.com Received: from localhost.localdomain (unknown [115.220.204.6]) by smtp.qiye.163.com (Hmail) with ESMTP id 4c65c5ad1; Thu, 3 Sep 2026 16:44:56 +0800 (GMT+08:00) From: Ruizhe Zhou To: Alexander Duyck , Jakub Kicinski , Andrew Lunn , "David S. Miller" , Eric Dumazet , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ruizhe Zhou , kernel-team@meta.com Subject: [PATCH net-next 11/14] eth: fbnic: Remove obsolete 32-bit DMA mask fallback Date: Thu, 3 Sep 2026 16:43:36 +0800 Message-Id: <20260903084339.870562-12-zhouruizhe@resnics.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20260903084339.870562-1-zhouruizhe@resnics.com> References: <20260903084339.870562-1-zhouruizhe@resnics.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-HM-Tid: 0aa066714c5f03ackunm85c9d55b5cc67 X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWRgWCB1ZQUpXWS1ZQUlXWQ8JGhUIEh9ZQVlCH09LVhgYHU1NGUIdQklDQ1YVFA kWGhdVEwETFhoSFyQUDg9ZV1kYEgtZQVlKSk5VSUlLVUlLT1VNWVdZFhoPEhUdFFlBWU9LSFVKS0 lPT09IVUpLS1VKQktLWQY+ Content-Type: text/plain; charset="utf-8" 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-capabili= ties 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 --- drivers/net/ethernet/meta/fbnic/fbnic_pci.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_pci.c b/drivers/net/ethe= rnet/meta/fbnic/fbnic_pci.c index 8b9bc9e8ea56..47d5dfbf3368 100644 --- a/drivers/net/ethernet/meta/fbnic/fbnic_pci.c +++ b/drivers/net/ethernet/meta/fbnic/fbnic_pci.c @@ -276,8 +276,6 @@ static int fbnic_probe(struct pci_dev *pdev, const stru= ct pci_device_id *ent) } =20 err =3D dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(46)); - if (err) - err =3D dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); if (err) { dev_err(&pdev->dev, "DMA configuration failed: %d\n", err); return err; --=20 2.27.0 From nobody Sat Sep 26 07:57:58 2026 Received: from mail-m19731106.qiye.163.com (mail-m19731106.qiye.163.com [220.197.31.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 104813ACA5F; Thu, 3 Sep 2026 09:20:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=220.197.31.106 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788427240; cv=none; b=KppYwB1wCO5ponXP1NlMVPxKbhaR5I1E8snyNp88h54XN0yPBk9892YrgGLXOrCwdAZTZL85VWAp6UuyniL5PduTp0SB4alEU83O/KoIGo+9+9n+UpQ/uIomyWxE73+6EjhdQRYYK4LhlslP0ZBEIVQx7ip6hssNhXlY8jGi2Ps= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788427240; c=relaxed/simple; bh=HoNH1jRYFnI1B9zCnvzHLZ0k/Ft3vXDRpyTeee90klg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Ehws6/fM7PmbbsKKZJPAihFACniYMNEPoXm30RiajCZOFDMmHguAzID9Fr0DiGg/mtulm/MN63Vc7deDIZI8Vnke3oi4Dg4wCahs3e7PMHLkSScGhup7izbLDEyDiNKI3zVj2AmBbP3waUCJyNa/IedM3U8Puc9woKGfUhm4DDo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com; spf=pass smtp.mailfrom=resnics.com; arc=none smtp.client-ip=220.197.31.106 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=resnics.com Received: from localhost.localdomain (unknown [115.220.204.6]) by smtp.qiye.163.com (Hmail) with ESMTP id 4c65c5adc; Thu, 3 Sep 2026 16:44:57 +0800 (GMT+08:00) From: Ruizhe Zhou To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ruizhe Zhou Subject: [PATCH net-next 12/14] net: pch_gbe: Remove obsolete 32-bit DMA mask fallback Date: Thu, 3 Sep 2026 16:43:37 +0800 Message-Id: <20260903084339.870562-13-zhouruizhe@resnics.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20260903084339.870562-1-zhouruizhe@resnics.com> References: <20260903084339.870562-1-zhouruizhe@resnics.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-HM-Tid: 0aa0667150e503ackunm85c9d55b5cc73 X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWRgWCB1ZQUpXWS1ZQUlXWQ8JGhUIEh9ZQVkaGhhCVhgZSUweSk5DGktKS1YVFA kWGhdVEwETFhoSFyQUDg9ZV1kYEgtZQVlKSk5VSUlLVUlLT1VNWVdZFhoPEhUdFFlBWU9LSFVKS0 lPT09IVUpLS1VKQktLWQY+ Content-Type: text/plain; charset="utf-8" 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-capabili= ties 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 --- drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers= /net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c index 88c5c52e0e38..ba3d10f9aec6 100644 --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c @@ -2504,12 +2504,10 @@ static int pch_gbe_probe(struct pci_dev *pdev, if (ret) return ret; =20 - if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64))) { - ret =3D dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); - if (ret) { - dev_err(&pdev->dev, "ERR: No usable DMA configuration, aborting\n"); - return ret; - } + ret =3D dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)); + if (ret) { + dev_err(&pdev->dev, "ERR: No usable DMA configuration, aborting\n"); + return ret; } =20 ret =3D pcim_iomap_regions(pdev, 1 << PCH_GBE_PCI_BAR, pci_name(pdev)); --=20 2.27.0 From nobody Sat Sep 26 07:57:58 2026 Received: from mail-m121161.qiye.163.com (mail-m121161.qiye.163.com [115.236.121.161]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE468463B91; Thu, 3 Sep 2026 08:45:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.236.121.161 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788425105; cv=none; b=jSBq/RPrTaI+8vjSmxe9SszjfkYpv1mlgmgOxqrQQhhtuM3EavEXo/XjF7kjEcZXHap5DjztGotoY3WoOQ87QYTeNQ5OQ9/XEoQwGMLiZ/OOemspdoV85JZzgb+LJquG0xR8uEyERa5jg+u8U+VMt/rSf4XHF1YyvOOU3nNTfY8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788425105; c=relaxed/simple; bh=f0F5ZFqdWiVI7YLlgXJkSNCjoFIv22dtQ14ta0bGKhA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=TiMIV3o7uPBySdK53BP4IBXJO/a/F8Hxm6m6ryJZfm2fwuFEVKt5qAIlLFuVL1BMcDodfkJYEq5xoJ+uHrxlVnjbxxM7qifoket8V31QO5oLNMPjsQhOTj6XMgARNjawxMfSZNOy1jYBFdwTZ+zVY+3AE7UEFTZ3SMecjuLm+48= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com; spf=pass smtp.mailfrom=resnics.com; arc=none smtp.client-ip=115.236.121.161 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=resnics.com Received: from localhost.localdomain (unknown [115.220.204.6]) by smtp.qiye.163.com (Hmail) with ESMTP id 4c65c5aeb; Thu, 3 Sep 2026 16:44:58 +0800 (GMT+08:00) From: Ruizhe Zhou To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ruizhe Zhou , Yoshihiro Shimoda , linux-renesas-soc@vger.kernel.org Subject: [PATCH net-next 13/14] net: renesas: rswitch: Remove obsolete 32-bit DMA mask fallback Date: Thu, 3 Sep 2026 16:43:38 +0800 Message-Id: <20260903084339.870562-14-zhouruizhe@resnics.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20260903084339.870562-1-zhouruizhe@resnics.com> References: <20260903084339.870562-1-zhouruizhe@resnics.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-HM-Tid: 0aa06671551603ackunm85c9d55b5cc87 X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWRgWCB1ZQUpXWS1ZQUlXWQ8JGhUIEh9ZQVlDSUofVkpIHkxIQkNCGElOTVYVFA kWGhdVEwETFhoSFyQUDg9ZV1kYEgtZQVlKSk5VSUlLVUlLT1VNWVdZFhoPEhUdFFlBWU9LSFVKS0 lPT09IVUpLS1VKQktLWQY+ Content-Type: text/plain; charset="utf-8" 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-capabili= ties Remove the obsolete fallback while retaining the error check so that a genuine DMA setup failure still aborts initialization. Signed-off-by: Ruizhe Zhou --- 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/ethe= rnet/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_devi= ce *pdev) return -ENOMEM; =20 ret =3D dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(40)); - if (ret < 0) { - ret =3D dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); - if (ret < 0) - return ret; - } + if (ret) + return ret; =20 priv->gwca.index =3D AGENT_INDEX_GWCA; priv->gwca.num_queues =3D min(RSWITCH_NUM_PORTS * NUM_QUEUES_PER_NDEV, --=20 2.27.0 From nobody Sat Sep 26 07:57:58 2026 Received: from mail-m49226.qiye.163.com (mail-m49226.qiye.163.com [45.254.49.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3B39746982C; Thu, 3 Sep 2026 09:00:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.254.49.226 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788426028; cv=none; b=IUrHK5BVP9OW8XbGfnAHy6N5OebBRRIvFMUBW7foBDoaXCxNcu/SBiBkfAfombkPKe9p++5bIPNTTI1/26g4V5veZA6t1aCPi5/+h9f+/aujdfxmLQt12YDlW50xouMxxXtomGzm/xUhbh8N5SCXvxs/RkoQK2VghdY25nKql60= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788426028; c=relaxed/simple; bh=76/uEg7CCgtsRv05Q8ttbQver7Gydb2GL1UuImeu6r0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=f8PYCImmfLj7MwPSxvXZvQEiCSTdzJHs12H46Nc3aVNzZAvOBaRl6EVOZe6rHlT5KvdZ3kQgDUiZ83tn8DJgvQFI+Q5Te8g7toTLTfE4UggNoKCiUv38KParCLCm/47uNpxSf7raxXhf4UEJUNKVBXkPLBhvlIW6Dri3IqiqwEE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com; spf=pass smtp.mailfrom=resnics.com; arc=none smtp.client-ip=45.254.49.226 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=resnics.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=resnics.com Received: from localhost.localdomain (unknown [115.220.204.6]) by smtp.qiye.163.com (Hmail) with ESMTP id 4c65c5af6; Thu, 3 Sep 2026 16:44:59 +0800 (GMT+08:00) From: Ruizhe Zhou To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Ruizhe Zhou Subject: [PATCH net-next 14/14] net: niu: Remove obsolete 32-bit DMA mask fallback Date: Thu, 3 Sep 2026 16:43:39 +0800 Message-Id: <20260903084339.870562-15-zhouruizhe@resnics.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20260903084339.870562-1-zhouruizhe@resnics.com> References: <20260903084339.870562-1-zhouruizhe@resnics.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-HM-Tid: 0aa06671596103ackunm85c9d55b5cc96 X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWRgWCB1ZQUpXWS1ZQUlXWQ8JGhUIEh9ZQVkZTR1KVk0fTRpKTExKHUgaSFYVFA kWGhdVEwETFhoSFyQUDg9ZV1kYEgtZQVlKSk5VSUlLVUlLT1VNWVdZFhoPEhUdFFlBWU9LSFVKS0 lPT09IVUpLS1VKQktLWQY+ Content-Type: text/plain; charset="utf-8" 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-capabili= ties Remove the obsolete fallback while retaining the error check so that a genuine DMA setup failure is still reported and aborts initialization. A successful setup now necessarily uses the 44-bit mask, so advertise NETIF_F_HIGHDMA directly after checking the result. Signed-off-by: Ruizhe Zhou --- drivers/net/ethernet/sun/niu.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/sun/niu.c b/drivers/net/ethernet/sun/niu.c index 54dd7281191d..c74a97fe5464 100644 --- a/drivers/net/ethernet/sun/niu.c +++ b/drivers/net/ethernet/sun/niu.c @@ -9835,15 +9835,11 @@ static int niu_pci_init_one(struct pci_dev *pdev, PCI_EXP_DEVCTL_RELAX_EN); =20 err =3D dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(44)); - if (!err) - dev->features |=3D NETIF_F_HIGHDMA; if (err) { - err =3D dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); - if (err) { - dev_err(&pdev->dev, "No usable DMA configuration, aborting\n"); - goto err_out_release_parent; - } + dev_err(&pdev->dev, "No usable DMA configuration, aborting\n"); + goto err_out_release_parent; } + dev->features |=3D NETIF_F_HIGHDMA; =20 niu_set_basic_features(dev); =20 --=20 2.27.0