From nobody Thu Nov 14 04:53:20 2024 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) (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 0520A1EB36; Wed, 17 Jan 2024 10:29:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705487365; cv=none; b=Mvhlh/YYplv/xphWb9oA7kW4oAd4GVYNuoUN2Sz37StfXWdseE7w6atxPRQxB/SG7tC4Dz6O2eydnspRXeiDj1UvXjPqArmnF0gPHp/3r7YBC0SUK26O8t4A4icOkCEOgkSkAqefKFEmv2tep/BG55rZdSSd3tE2/ckqvEFfAS0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705487365; c=relaxed/simple; bh=c6gHaV5ldeDfo5La4UxmDy1vp5DPeukzGpKRU5LazV8=; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-Id: X-Mailer:In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding:X-GND-Sasl; b=BQh8+hsGlHEmLmaYLdv9xEF7iXV1SHlVPXGBr9lUhY1puMZQ1icJnIxNnRYjJD/dYJzegjnlwu3Fqey4GbDnNgnW8jSj4DkE7WgMQRo+nlpNI+O6oEIcjjglIL6Kc3CmR8uQjzEZrWJ/A9podJhqfF/ENK2YR5SKCjafktwxrOo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arinc9.com; spf=pass smtp.mailfrom=arinc9.com; dkim=pass (2048-bit key) header.d=arinc9.com header.i=@arinc9.com header.b=HOBvp+VK; arc=none smtp.client-ip=217.70.183.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arinc9.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arinc9.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arinc9.com header.i=@arinc9.com header.b="HOBvp+VK" Received: by mail.gandi.net (Postfix) with ESMTPSA id 51CDB40004; Wed, 17 Jan 2024 10:29:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arinc9.com; s=gm1; t=1705487362; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qn/CM/13jA6bEJ08mmw/siDZC+0Aw36++ZhJWcM0VR8=; b=HOBvp+VKd3gSUyKv+efAO7NCLecB7ub7TXN8LfH/FwFSIqqQNpygHUEktYzTTuiVSiNuXj RqX//iSAbbb76hqdJgKn8L9mn8bo4fTjW1cewMp4zXtO9/Ibm9zVw9UhO2tVuTL/cknXC0 b1Z/mKflcuBAdIEiTLtuThH7Xi2mT5p/rgS75HFiqCdxGJKkFQeZBgObCB+94j0RI/gJmD nEwRrS+f/he5f4++Zev0ohyXel6PMPKtrRaF9eDZ+7HC2ZmvqQw6VBcpotSh/NalaSdAfv C1FY+Kd+Y/JWsX9RnDj6uizcoeNATgg13u8gErQxQWyrrqPxZK6/fmtyncFNkA== From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= To: Daniel Golle , Landen Chao , 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: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= , mithat.guner@xeront.com, erkin.bozoglu@xeront.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [RFC PATCH net-next 7/8] net: dsa: mt7530: put initialising PCS devices code back to original order Date: Wed, 17 Jan 2024 13:28:37 +0300 Message-Id: <20240117102838.57445-8-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240117102838.57445-1-arinc.unal@arinc9.com> References: <20240117102838.57445-1-arinc.unal@arinc9.com> 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: quoted-printable X-GND-Sasl: 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=C4=B1n=C3=A7 =C3=9CNAL --- 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 680e59732d94..e565406d3314 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -2802,17 +2802,9 @@ static int mt753x_setup(struct dsa_switch *ds) { struct mt7530_priv *priv =3D ds->priv; - int i, ret; - - /* Initialise the PCS devices */ - for (i =3D 0; i < priv->ds->num_ports; i++) { - priv->pcs[i].pcs.ops =3D priv->info->pcs_ops; - priv->pcs[i].pcs.neg_mode =3D true; - priv->pcs[i].priv =3D priv; - priv->pcs[i].port =3D i; - } + int ret =3D priv->info->sw_setup(ds); + int i; =20 - ret =3D priv->info->sw_setup(ds); if (ret) return ret; =20 @@ -2824,6 +2816,14 @@ mt753x_setup(struct dsa_switch *ds) if (ret && priv->irq) mt7530_free_irq_common(priv); =20 + /* Initialise the PCS devices */ + for (i =3D 0; i < priv->ds->num_ports; i++) { + priv->pcs[i].pcs.ops =3D priv->info->pcs_ops; + priv->pcs[i].pcs.neg_mode =3D true; + priv->pcs[i].priv =3D priv; + priv->pcs[i].port =3D i; + } + if (priv->create_sgmii) { ret =3D priv->create_sgmii(priv); if (ret && priv->irq) --=20 2.40.1