Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1026013rdb; Fri, 16 Feb 2024 03:08:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUxflWNq6VakkFB48Q/766prnDTlS0PpTTX6bzyz6eyGFkz0xdKDmyomxDePI+pmQlgC7n7MAyPAsy5/gS8wJf6XBMcvCXBawZJoYW3Lg== X-Google-Smtp-Source: AGHT+IEtKdWmhrBZ1BNokR4Gflx87EEXJfsyk8lRoHXqC/2Lj2hIHP/Yn5SDl+TPNo7xYCmTrS3e X-Received: by 2002:aa7:d7d2:0:b0:560:ebd9:9c1f with SMTP id e18-20020aa7d7d2000000b00560ebd99c1fmr3368342eds.24.1708081686470; Fri, 16 Feb 2024 03:08:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708081686; cv=pass; d=google.com; s=arc-20160816; b=bbPqsaL6IicS5WOcW2/8DOvqFp9de/sWPlFRT5Pa5SFNXVpn2Xmst4FZNTPLrnNkx1 3RQlMgiuAYouujnBY2uOuwk74AEb/sU/3cljx39c6K2kyO8J98UqxDuCHwFbk9CuUkxr bN5JXm8s4vpZ8PmTOU15ECvJgwulMVP/wPXCudgTZb6JwzoscpZXSx91+IBea0S95WfQ /nWXNjCQ+axjT7yACJ/72LL5q/y6rEqujSeRONSJJI0309+yE1SZ4VuCZVAbAa37bJAb 7yX1LpWZu2PTU+HsnG34T8K2zh3sacpKMYcNrDKxMNulN33J87IE0omxOSd1/TTDZdXS Gjog== 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=AD8BRNRIpHlSdYMxWlDaHCUKJiQmmb5XAspG9ZzBM0XXyJok13dvPtoP+Z8/Glduuq 1OyJ9OPydvXQxgsiO2faKR7bCkAhkmlOHmNb7osYQpTfDCz1CHMDA3wrBYfsYKSr81wc LVCdJX1+giwhw1goDuJTrY5aqJeCMYixMppvFgmB9eQMg25O0ooPU5rK1TRXC+e/weQ8 vOdCdFB8R2ndu3qmN5huhACX1tN9UeW0AiGC9SOoWENoirDaNyvE3kvfPZR6eS8m9NSw YlfUPB4u54xQ9Gd0u6BTqfvkKJP6hYLSRcj8HcwWgZXwyBv6YqrBjUfv7ibjGeIWHhyP jGCg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=htFUb9zT; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-68494-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68494-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id w23-20020a056402129700b00563eba76777si526520edv.475.2024.02.16.03.08.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 03:08:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68494-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=htFUb9zT; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-68494-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68494-linux.lists.archive=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 am.mirrors.kernel.org (Postfix) with ESMTPS id EC4521F21E89 for ; Fri, 16 Feb 2024 11:08:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 091325813B; Fri, 16 Feb 2024 11:05:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="htFUb9zT" 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 ABA3A58AA9; Fri, 16 Feb 2024 11:05:44 +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=1708081544; cv=none; b=oUYjxse409zEQh1SDB6BUFqnN7ENOxF+1VTjBbG9/7TT34OmkkMaByMnSEV4aV2SyBbFeas1ZpDawqwmRST8XUooSDghxOUeoTByhtKud2DCoGs7iv6BClUgipWWawti6U4IaZQpH9zLajMRihf+xkG0UEsiWjIdL5K+EQ8Vb68= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708081544; c=relaxed/simple; bh=bdj2sXbKKEcSVYU72hwdKppcUWhM0GPYmoe4dwmAPtA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=P74pscgia9ObBgayyhEegZOFkCjqCpwWuzH9Gtiz/nx7JPOVmxatYjkE7XiieuJ2RUoulrVlLZ4qM92dwxUq2dIYwsYiROXZTNWuTNLpaOF0LUiMpg6bDE9RRgT3+oW++CZ32LY2Zfz+d1sj6JaZfOIzc8xonxCa97f+mP3mDrc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=htFUb9zT; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id 4DB3CC43143; Fri, 16 Feb 2024 11:05:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708081544; bh=bdj2sXbKKEcSVYU72hwdKppcUWhM0GPYmoe4dwmAPtA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=htFUb9zThe06fB9dSe5DiN0YYbHjajfmIZ4WNIDfWuuf4Vo4aTRSGy2RmEZMuXOpr 5nBQECNucVInJo6vOqWxVNfFj0Qn7kgD25ZpZGz+EWXx+kSfztzNAMq85Lg94+LeqD iyzdnprzW79S4JyJUwvIO+DWj8piHODqJVqLp986piJwwfnf5vwm7boFd6a4AA+fbX 8XJj09Cg2c0ao2viXDbkfsr7IAYIRyAXnbBCQtcF6J6N6Vb4uJrGxRVY2yWQjwuJF+ RF1rB8TyQm4m3aHvu5prTVwx4tGYiT4EknPQjEJ7m/94/RrXzSIkCU4v5GYlneCQMH WsfvLquRWebMw== 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 38D6FC48BEB; Fri, 16 Feb 2024 11:05:44 +0000 (UTC) From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= via B4 Relay Date: Fri, 16 Feb 2024 14:05:35 +0300 Subject: [PATCH net-next v2 7/8] net: dsa: mt7530: put initialising PCS devices code back to original order Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240216-for-netnext-mt7530-improvements-3-v2-7-094cae3ff23b@arinc9.com> References: <20240216-for-netnext-mt7530-improvements-3-v2-0-094cae3ff23b@arinc9.com> In-Reply-To: <20240216-for-netnext-mt7530-improvements-3-v2-0-094cae3ff23b@arinc9.com> To: Daniel Golle , DENG Qingfang , Sean Wang , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Russell King Cc: mithat.guner@xeront.com, erkin.bozoglu@xeront.com, Bartel Eerdekens , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, =?utf-8?q?Ar=C4=B1n=C3=A7_=C3=9CNAL?= X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708081540; l=1570; i=arinc.unal@arinc9.com; s=arinc9-patatt; h=from:subject:message-id; bh=/2CkKGukm0R4V69WhBvbbIMKcr0CwYye/LAy2VcbSV0=; b=gLD9v0i9dFUejIo1sJCI8wV1V3CcfE+qQU/xr61ajW1ZUl9UhLXHegjcKIWDqlcBzpMgbxYo2 q6z5knElAAgD8Wp8h1W9/NFY9clSilRPrWQ0Eq1vVIt2Dhl+ViuMCxU X-Developer-Key: i=arinc.unal@arinc9.com; a=ed25519; pk=VmvgMWwm73yVIrlyJYvGtnXkQJy9CvbaeEqPQO9Z4kA= X-Endpoint-Received: by B4 Relay for arinc.unal@arinc9.com/arinc9-patatt with auth_id=115 X-Original-From: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= Reply-To: From: Arınç ÜNAL 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 --- 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) -- 2.40.1