[net-next,v3,7/9] net: dsa: mt7530: put initialising PCS devices code back to original order
Message ID | 20240301-for-netnext-mt7530-improvements-3-v3-7-449f4f166454@arinc9.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-88272-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp990540dyb; Fri, 1 Mar 2024 02:45:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXbVf3noP+JDWPy4OqhQ4HAA4ekYfoFUsGQ0EpUQi1sgTggWVkrC/ER/EByNXJlwXnhqe8U/RkoFeUvNB3yQjPLYHf7TQ== X-Google-Smtp-Source: AGHT+IGQvT7U0PzE9doAD81XEM2E6Vcyptbdk7n7sxpO1937B52Dp/ZnGKKbDrUIKKFUCGytPyQH X-Received: by 2002:a05:6a21:6d81:b0:19e:5ac2:a342 with SMTP id wl1-20020a056a216d8100b0019e5ac2a342mr1863170pzb.17.1709289915528; Fri, 01 Mar 2024 02:45:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709289915; cv=pass; d=google.com; s=arc-20160816; b=UJemSTUeEjdjb0O/U0J+pgiASwXKzrOddTiGwExbgT/oAgCVniDX1dBeu+HKzUNOD+ 8xARMmHDOBQqBM9q5LljZg6oLAYsyx0Ze/x6LpEphzrXFUpGDRo1itwWgeOD3X2+oZgO lPOUENuBnDqkMzYwhPxlbTGlq2AOUQuMMw9muULWVJCOaLnucB/Xb1PUei4qBKyynVMF DaGmkpVwOU3/x1qVMkbT3Ttk9jWjTxVCzvfNV7rdZyXJTHoqNwjIkirqizaQBaYn0eyT LQ+4dWnNeQc9CuIQaN1AjsaWDmVN0pB6K2PJaVbz7zP8JsTawDdKlr/y6xEb3osBcWJo DFJQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=reply-to:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:date:from:dkim-signature; bh=ne7hOGU2S5DStLf3lgxkOQSl3E4nSb1cKjrcJ4FWwQ0=; fh=xNlE86XmqkSplYYMvvd74gD/RbF2aUqtHPBgVCVc3H8=; b=uWRmWV/ckjQ+PgKawnEiOIOp7/fIPhOeFhQK/mG0VSNvE7tf4GhmidwnPVIx2uHJoJ 1WZ9IPmPY7FylD+kh/++gD9RwUiiuzO7K8R5JlRiKmtikgWTCSUoh+liwWupee5gN3qH euJh2nVUPUb57YypEKnuoV5YvOAyVyVUEywyoagZdDNv1BPwZ+khr3KUtHJDj1Fgmopl vIcyu3INRIkEM+jiCxZIxA/M9168EfFioh7na5OPfg4CovoNmx7AxIyoEcRtsCI0BC6q /kdp5M7gkCeNUAjx9MMXuxscle8+UWB4D5VCH4SldmcarTMdvWePSK871wBQTToQDXqG 3+pQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I8pnK0O6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-88272-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88272-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id y1-20020aa78541000000b006e53eb409c5si3231321pfn.182.2024.03.01.02.45.15 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 02:45:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88272-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I8pnK0O6; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-88272-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88272-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id B7F0BB23B61 for <ouuuleilei@gmail.com>; Fri, 1 Mar 2024 10:44:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 29EDA6EB6D; Fri, 1 Mar 2024 10:43:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="I8pnK0O6" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 532EE6BFA3; Fri, 1 Mar 2024 10:42:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709289779; cv=none; b=ek6h404bPtUXgFp+pstPd6aKR9uvKH7YOl2mFwMYZoV+jAU+0O/HM/bY9/rJhjSHITcnda+4iWScOrRIbJOTLJVcSttbusgh0z8GcIYLAcXDdBcU7g5FY6ud/dvApXoze2z65VT3RzVALMuOvtXGBpuL3KOF5l3SOBI9blSvzT4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709289779; c=relaxed/simple; bh=bdj2sXbKKEcSVYU72hwdKppcUWhM0GPYmoe4dwmAPtA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GWhv8iQ0Y4J9dDNInQC+etWULp+5SwXaWbQOCnbBrY9WhfqS4XjZpz++OXWWxE5j1XREMylb0mK+3kQd2JnwIT+9cduHoVzrF0C/JOlOldps9iyRFgATMIQM12kMv7v9qD2IuTBx2ox+98Cd/hbsiCJ4zcmHdy7suPRmPI2Mknk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=I8pnK0O6; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 19053C43142; Fri, 1 Mar 2024 10:42:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709289779; bh=bdj2sXbKKEcSVYU72hwdKppcUWhM0GPYmoe4dwmAPtA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=I8pnK0O6SunHZxJiOSjoPzu6eLrP/erBBlrYjVIt9YA+hIs1pPWabn56SSzh5DK8Q W6yfvcM+9gWMXKH3rWOIXjrgPxzbcIS4LrnPdUZu9Y+Mt1Hfjq12APfcJAKIlz4RBk akfIgkZBR/6ZW0KotndncFGPKuSCKA6YcX2km6VPMVu0CgYrA+hFxKxv0JpgvYq6Io mwybjn1zxwhkAE1xw/hbpn87cmULjWhfqtxMEaBX3cJQhJmnneYUSASgMyOFqD0gJV ig2I7GdDEuN8npR8zGWBITMZhseJlbZdtGG7RJGsAnTMqo1/M5qA3N3n47o211KcPC t+/9UCEEgT15g== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05C52C54E41; Fri, 1 Mar 2024 10:42:59 +0000 (UTC) From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= via B4 Relay <devnull+arinc.unal.arinc9.com@kernel.org> Date: Fri, 01 Mar 2024 12:43:03 +0200 Subject: [PATCH net-next v3 7/9] net: dsa: mt7530: put initialising PCS devices code back to original order Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240301-for-netnext-mt7530-improvements-3-v3-7-449f4f166454@arinc9.com> References: <20240301-for-netnext-mt7530-improvements-3-v3-0-449f4f166454@arinc9.com> In-Reply-To: <20240301-for-netnext-mt7530-improvements-3-v3-0-449f4f166454@arinc9.com> To: Daniel Golle <daniel@makrotopia.org>, DENG Qingfang <dqfext@gmail.com>, Sean Wang <sean.wang@mediatek.com>, Andrew Lunn <andrew@lunn.ch>, Florian Fainelli <f.fainelli@gmail.com>, Vladimir Oltean <olteanv@gmail.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Russell King <linux@armlinux.org.uk> Cc: mithat.guner@xeront.com, erkin.bozoglu@xeront.com, Bartel Eerdekens <bartel.eerdekens@constell8.be>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal@arinc9.com> X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709289776; l=1570; i=arinc.unal@arinc9.com; s=arinc9-Xeront; h=from:subject:message-id; bh=/2CkKGukm0R4V69WhBvbbIMKcr0CwYye/LAy2VcbSV0=; b=jhj5rpVeLTk6pp6nZ74IqJOF62xtP/gZRjxzV6gmsJ/mCB/nP34kSs028tQQ0/2WrX6tvkMGJ ykUTxIRPKOhARn1bax3sYOsUZQsHfG6i6H4204OyFLMD8QH9wvCic4L X-Developer-Key: i=arinc.unal@arinc9.com; a=ed25519; pk=z49tLn29CyiL4uwBTrqH9HO1Wu3sZIuRp4DaLZvtP9M= X-Endpoint-Received: by B4 Relay for arinc.unal@arinc9.com/arinc9-Xeront with auth_id=137 X-Original-From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal@arinc9.com> Reply-To: <arinc.unal@arinc9.com> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792320382426365100 X-GMAIL-MSGID: 1792320382426365100 |
Series |
MT7530 DSA Subdriver Improvements Act III
|
|
Commit Message
Arınç ÜNAL via B4 Relay
March 1, 2024, 10:43 a.m. UTC
From: Arınç ÜNAL <arinc.unal@arinc9.com> The commit fae463084032 ("net: dsa: mt753x: fix pcs conversion regression") fixes regression caused by cpu_port_config manually calling phylink operations. cpu_port_config was deemed useless and was removed. Therefore, put initialising PCS devices code back to its original order. Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com> --- drivers/net/dsa/mt7530.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index e353c03dd1db..5c8ad41ce8cd 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -2812,17 +2812,9 @@ static int mt753x_setup(struct dsa_switch *ds) { struct mt7530_priv *priv = ds->priv; - int i, ret; - - /* Initialise the PCS devices */ - for (i = 0; i < priv->ds->num_ports; i++) { - priv->pcs[i].pcs.ops = priv->info->pcs_ops; - priv->pcs[i].pcs.neg_mode = true; - priv->pcs[i].priv = priv; - priv->pcs[i].port = i; - } + int ret = priv->info->sw_setup(ds); + int i; - ret = priv->info->sw_setup(ds); if (ret) return ret; @@ -2834,6 +2826,14 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); + /* Initialise the PCS devices */ + for (i = 0; i < priv->ds->num_ports; i++) { + priv->pcs[i].pcs.ops = priv->info->pcs_ops; + priv->pcs[i].pcs.neg_mode = true; + priv->pcs[i].priv = priv; + priv->pcs[i].port = i; + } + if (priv->create_sgmii) { ret = priv->create_sgmii(priv); if (ret && priv->irq)