From mboxrd@z Thu Jan 1 00:00:00 1970 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: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HM-Tid: 0aa0667150e503ackunm85c9d55b5cc73 X-HM-MType: 1 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFITzdXWRgWCB1ZQUpXWS1ZQUlXWQ8JGhUIEh9ZQVkaGhhCVhgZSUweSk5DGktKS1YVFA kWGhdVEwETFhoSFyQUDg9ZV1kYEgtZQVlKSk5VSUlLVUlLT1VNWVdZFhoPEhUdFFlBWU9LSFVKS0 lPT09IVUpLS1VKQktLWQY+ 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 --- 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; - if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64))) { - ret = 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 = 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; } ret = pcim_iomap_regions(pdev, 1 << PCH_GBE_PCI_BAR, pci_name(pdev)); -- 2.27.0