From patchwork Tue Jun 6 06:49:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 13268348 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 0FFE0C7EE24 for ; Tue, 6 Jun 2023 06:49:53 +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:References:In-Reply-To: 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: List-Owner; bh=FvUlRCVzFdCJFNeclWOnIzoiAP867oBjmEIY9ODYGco=; b=Ycm7EvJwjaH+e+ i2cCLADIg+wCifVr7cZiRxFxWcC6YsW1I3/aBQBq1klMZi8qL6azJcIG/FgYOlmpp06HVnjpxnBj0 p149DBsc4u/lObtmJjxCuoSzr8fSb6ETrk6PBMOBR8V3BIbhYGnWEESQPpSY8lM/JF1aOzLbw5DJc o0d4ecnY7oyeFUPh9nHMCyUvZt3S+o1TVWODcSUew8eGhu7L82AVqAxjWkJ6rIddrL/k+cD+4j71p 7VY25lVbQd8PwiMI6zUDhhtCM1V2H9hamoYLdSffTLR/w1jJLlS2lF7fA62PqPVjOEi+Ei5hOvwf+ 6Ktns/sFlaBEbje5ZkLA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q6QVX-000QmU-07; Tue, 06 Jun 2023 06:49:31 +0000 Received: from relay9-d.mail.gandi.net ([2001:4b98:dc4:8::229]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q6QVT-000QjW-0M for linux-arm-kernel@lists.infradead.org; Tue, 06 Jun 2023 06:49:28 +0000 X-GND-Sasl: maxime.chevallier@bootlin.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1686034164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QSpKd0+qWXXfpd4HFeznEI586MERIcn7KHl+UwCOPZk=; b=PVbbuuUvqDFb/L8jqOHfRTkFZNLHLORKADWKYKoj7zJEMUYoEQNaP1NhLUYL6f9Spb0VLv WQMBD8+X4tCYyRabroL5qGWQCsjsxQttdAe4TD2Y+fZjpBy9wzjOj3l77aBHU3KGFGJSzZ 2USLfk8YkBH5MU4E9IS/w35zbdHPfoOyr68tor5Ere0FykCzMbHtpAoYfSFAE/GRCY3oph Gg9EriegP56zy2TYJMxI7J1uKepVfKaEgcWWPEzxb7BFBophPHgRcTRzSXVtfovDAK8Oqi 3c8ugBu1DTqJYUsa/TXkGkkXGZsnbJ9Un3jI9klVQR4Zdz8NPQSO5zLiJPvK0Q== X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 49B8EFF80D; Tue, 6 Jun 2023 06:49:22 +0000 (UTC) From: Maxime Chevallier To: davem@davemloft.net Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, alexis.lothore@bootlin.com, thomas.petazzoni@bootlin.com, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Florian Fainelli , Heiner Kallweit , Russell King , Vladimir Oltean , Ioana Ciornei , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Maxime Coquelin , Jose Abreu , Alexandre Torgue , Giuseppe Cavallaro , Simon Horman Subject: [PATCH net-next 1/2] net: stmmac: Add PCS_LYNX as a dependency for the whole driver Date: Tue, 6 Jun 2023 08:49:13 +0200 Message-Id: <20230606064914.134945-2-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606064914.134945-1-maxime.chevallier@bootlin.com> References: <20230606064914.134945-1-maxime.chevallier@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230605_234927_451324_C14038C9 X-CRM114-Status: GOOD ( 12.19 ) 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 Although pcs_lynx is only used on dwmac_socfpga for now, the cleanup path is in the generic driver, and triggers build issues for other stmmac variants. Make sure we build pcs_lynx in all cases too, as for XPCS. Fixes: 5d1f3fe7d2d5 ("net: stmmac: dwmac-sogfpga: use the lynx pcs driver") Signed-off-by: Maxime Chevallier --- drivers/net/ethernet/stmicro/stmmac/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/Kconfig b/drivers/net/ethernet/stmicro/stmmac/Kconfig index 5583f0b055ec..fa956f2081a5 100644 --- a/drivers/net/ethernet/stmicro/stmmac/Kconfig +++ b/drivers/net/ethernet/stmicro/stmmac/Kconfig @@ -5,6 +5,7 @@ config STMMAC_ETH depends on PTP_1588_CLOCK_OPTIONAL select MII select PCS_XPCS + select PCS_LYNX select PAGE_POOL select PHYLINK select CRC32 @@ -160,7 +161,6 @@ config DWMAC_SOCFPGA select MFD_SYSCON select MDIO_REGMAP select REGMAP_MMIO - select PCS_LYNX help Support for ethernet controller on Altera SOCFPGA From patchwork Tue Jun 6 06:49:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 13268350 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 27D70C77B7A for ; Tue, 6 Jun 2023 06:49:59 +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:References:In-Reply-To: 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: List-Owner; bh=WIIrynPfDb5b3cor0SmSnnu8U4TdamoM0TleG1dcZg0=; b=JnWl/qZDKz92MJ tgP1fYnmKSOQqw4WTep3Sl5u4M1/C9f24YTr2EmqwKkxt16fFOJ1ioZ/jcpSnO8MxiJMEm1jFf84a gkADK/g2uyms0kHZ/nclvtDYOva54TyAisJLotb5MsoyCrPaUhhf3QdB4ndV8QtbqjthRyZ/N+Cyu anhXWOIFGY9BZjmYC72k3ubPoT3MV/lk+WMkNI4wXnTfoAEETObLZfZOyz65iKJu+0CH+iT/OxYgQ DsC+5oqnvZU+pC6hvHD2dW3Zk5ADosWWQ2hkmMcyjCC6jc8tbSYF8zRke+r97XXYtbbnDdQIOAkYx 35QH3WFXduSwWQURo+LA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q6QVa-000Qop-2Y; Tue, 06 Jun 2023 06:49:34 +0000 Received: from relay9-d.mail.gandi.net ([2001:4b98:dc4:8::229]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q6QVT-000Qjz-1j for linux-arm-kernel@lists.infradead.org; Tue, 06 Jun 2023 06:49:29 +0000 X-GND-Sasl: maxime.chevallier@bootlin.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1686034166; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=29QVfpTGnIH2LbR29aG7tdJmOeyg14401QHoRbTUXIY=; b=bTZ9dcCjWB/1uihE1QvQ61ZOd2pPJV/wY2fljBF2q0Y8sYL+ZpBTe8CpPZ0xPJfRkk3qS2 FBs9k1nYzfyS8Zir4Lqt+dEodxlvgoQ7stw1k29BV+ZjupS9zah5zVqcnOhAMsLJGuH4mA Ok1RoJVe3UDDh7CYGhediTWPtajUFBZ5nApzHX/ejhXjW3dPO0/Ma5aFjYU0SasofNDabS +XOrFt4ewPBTXRkCQg/dbf29VVbfUyosDdxte05+iBBHntGYtfP7Dc2OaOO6pco9TLcmZ1 Cgy94/aoo/3HluBrtF7HiB/PurBmbM6zDih0rbmmaY32op60xmCZDFuaZQKO+g== X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com X-GND-Sasl: maxime.chevallier@bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 52CE6FF80B; Tue, 6 Jun 2023 06:49:24 +0000 (UTC) From: Maxime Chevallier To: davem@davemloft.net Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, alexis.lothore@bootlin.com, thomas.petazzoni@bootlin.com, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Florian Fainelli , Heiner Kallweit , Russell King , Vladimir Oltean , Ioana Ciornei , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Maxime Coquelin , Jose Abreu , Alexandre Torgue , Giuseppe Cavallaro , Simon Horman Subject: [PATCH net-next 2/2] net: altera-tse: Initialize the regmap_config struct before using it Date: Tue, 6 Jun 2023 08:49:14 +0200 Message-Id: <20230606064914.134945-3-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606064914.134945-1-maxime.chevallier@bootlin.com> References: <20230606064914.134945-1-maxime.chevallier@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230605_234927_870425_F841CCE3 X-CRM114-Status: GOOD ( 12.15 ) 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 The regmap_config needs to be zeroed before using it. This will cause spurious errors at probe time as config->pad_bits is containing random uninitialized data. Fixes: db48abbaa18e ("net: ethernet: altera-tse: Convert to mdio-regmap and use PCS Lynx") Signed-off-by: Maxime Chevallier --- drivers/net/ethernet/altera/altera_tse_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/ethernet/altera/altera_tse_main.c index d866c0f1b503..df509abcd378 100644 --- a/drivers/net/ethernet/altera/altera_tse_main.c +++ b/drivers/net/ethernet/altera/altera_tse_main.c @@ -1255,6 +1255,7 @@ static int altera_tse_probe(struct platform_device *pdev) if (ret) goto err_free_netdev; + memset(&pcs_regmap_cfg, 0, sizeof(pcs_regmap_cfg)); /* SGMII PCS address space. The location can vary depending on how the * IP is integrated. We can have a resource dedicated to it at a specific * address space, but if it's not the case, we fallback to the mdiophy0