From patchwork Fri Feb 10 20:21:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cristian Ciocaltea X-Patchwork-Id: 13136445 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4CD1EC636D4 for ; Fri, 10 Feb 2023 21:00:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=LLzmjEGMHk+Nto4uvnhQOQYdGCDo0gxnNCL/v+6hgSY=; b=gc8jhsiZOJPX8p OP2+dkJapjwnuxDE6rXc3Y1g7N+oKkYum+lWlhd2ROqG2eToDozpNy8/JQFwtsnjjO2+mr1EVmh13 botlXEWJx5/CnzmW6F/H8eblUubVr+l3vVv+O4is24RWP1wcSZA9JEuLAvjWmcsuHPgDLce1U0Wci j5gTCNmR95E5Z0r+ZjNc5D39Iturtkd7sAN+sCnuGMfTnJ/1k+B73+dpUXvm2me5Z9dzeY1sFs+88 9FZHeQNBnPaveTk91VU9ZCxopUi9cYrWKWu9pjnRSAJ+dtZnQwdjbKaGNerrlYDTrGHdPO6KkK5nO AxgnGnRJpM56Fw+fb/UQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQaTq-007WUE-Qn; Fri, 10 Feb 2023 20:58:51 +0000 Received: from madras.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e5ab]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pQZtr-007MPE-Hf for linux-arm-kernel@lists.infradead.org; Fri, 10 Feb 2023 20:21:41 +0000 Received: from localhost (unknown [86.120.32.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madras.collabora.co.uk (Postfix) with ESMTPSA id 3CBC566020FD; Fri, 10 Feb 2023 20:21:33 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1676060493; bh=QMD6SyDBSnSkcWGWoE4/TS/EXFaXWOSsbB22Xw00BtU=; h=From:To:Cc:Subject:Date:From; b=E4Yjr/XdixH6Dt2xDzjvwVlTaV+Gj6wJyp7bvLWi/a4G3d56EJ3rYoLiWC1DhAwaX xLjFmYqUvI6JPm3wKSc298H8u9iryJIGXcKHMjjn7L+zSfGNsE5p0SWl06DPRxzVDp 5FRCxDplro4MG8ScpWdvAshJ48P8oi1JpuY/0XhExnokzgQYdire83Y0tt2lODmKvp WI/Wtri/KdPd2V0JnAHmDh46mT49C5XoAJiyqORbGwPIlt/novcbIkLsYtAJt1KZMO 5BRmZEI3gVn+kgixQo5TNhk4R77+XqVUrGnx4wso9u9frRcjzPzOjyYvNC555XYnaB DiKIdJ7Hade+w== From: Cristian Ciocaltea To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Sonic Zhang Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@collabora.com Subject: [PATCH 1/1] net: stmmac: Restrict warning on disabling DMA store and fwd mode Date: Fri, 10 Feb 2023 22:21:26 +0200 Message-Id: <20230210202126.877548-1-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230210_122139_959223_D3427960 X-CRM114-Status: GOOD ( 11.98 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When setting 'snps,force_thresh_dma_mode' DT property, the following warning is always emitted, regardless the status of force_sf_dma_mode: dwmac-starfive 10020000.ethernet: force_sf_dma_mode is ignored if force_thresh_dma_mode is set. Do not print the rather misleading message when DMA store and forward mode is already disabled. Fixes: e2a240c7d3bc ("driver:net:stmmac: Disable DMA store and forward mode if platform data force_thresh_dma_mode is set.") Signed-off-by: Cristian Ciocaltea --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index eb6d9cd8e93f..0046a4ee6e64 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -559,7 +559,7 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac) dma_cfg->mixed_burst = of_property_read_bool(np, "snps,mixed-burst"); plat->force_thresh_dma_mode = of_property_read_bool(np, "snps,force_thresh_dma_mode"); - if (plat->force_thresh_dma_mode) { + if (plat->force_thresh_dma_mode && plat->force_sf_dma_mode) { plat->force_sf_dma_mode = 0; dev_warn(&pdev->dev, "force_sf_dma_mode is ignored if force_thresh_dma_mode is set.\n");