From patchwork Wed Jan 17 10:28:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= X-Patchwork-Id: 13521592 X-Patchwork-Delegate: kuba@kernel.org 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?b?QXLEsW7DpyDDnE5BTA==?= 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?b?QXLEsW7DpyDDnE5BTA==?= , 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: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-GND-Sasl: arinc.unal@arinc9.com X-Patchwork-Delegate: kuba@kernel.org X-Patchwork-State: RFC 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 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 = 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; @@ -2824,6 +2816,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)