Received: by 2002:a05:7412:8d1c:b0:fa:4c10:6cad with SMTP id bj28csp305985rdb; Wed, 17 Jan 2024 02:31:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IFZccyIJsZ0VOIDjzZsyLgGak3/B1lidXdDjpuO75yAydpGGHFvMae4E3764g5EHowqJczJ X-Received: by 2002:a05:622a:10:b0:429:fe7f:b6c with SMTP id x16-20020a05622a001000b00429fe7f0b6cmr3383153qtw.130.1705487490574; Wed, 17 Jan 2024 02:31:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705487490; cv=pass; d=google.com; s=arc-20160816; b=x1qX+aALTid9fuEGbZhVn67kU969ItADNsFqEdGdb9bLjS1iQTpBCxrhUaaqiXKZoP R08hpW6Uff01ID1loQklQd0r2nXDa5AP7B+Aikkh3HS7Bu6sy6cnN2NfdAs5xHeT1Bae dVBk9yW7jkT1OPfgbsJHNCZQYxGsPyzYkiwgNk3wdRahwsqciYcxXHsHq+Pga1ZqcIur 0jInwGo9p+5Zi5mG85rRwU7VdWksoQBL0/wPTh+W7rzPIW6vSUuwAEwt3Ea3DkV+65cD L1G8vUnDlR7EIUJD6ezf7ugfWO9wRMT3uUsvw1HEFgYAQ1ukNwS4u6xyp/1J+hhnW7Rx nZHg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Qn/CM/13jA6bEJ08mmw/siDZC+0Aw36++ZhJWcM0VR8=; fh=c4SWefwPnDBL/h4hfmTNJ3/EdZgKZx+7X7D6BlF0Dbw=; b=VXXuYeYzxaNc4+bORc3VChA6CQlbl6G3Lj1yIoT2imsiNcYXgYkL9KxgyM363G/6a+ IsJBBija5N2NlU69dS6g/2njR4HwxPy4UoAi7ucujJvPu6Sz0/j1gYgODTDopt0k7QXW IOF9wBxQPvrjuLEZrjOG6TMJ2VDH42kMCiT3DurW7oHvFeRvx55USv1xakX29oQl/C3V iA8p+6N+vdT6/+oS20OWLG2M7FWeZPk08vv9G4dC/N6RcwdhmlzfFS/XUBhlcqu5mY/j nTNaYV5427r2P+V7SFnbBNMyojoxASZvd6okYQ6ZV23RVmGwoAydADm6Bv8PhhWYRZC9 7pLA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=HOBvp+VK; arc=pass (i=1 spf=pass spfdomain=arinc9.com dkim=pass dkdomain=arinc9.com dmarc=pass fromdomain=arinc9.com); spf=pass (google.com: domain of linux-kernel+bounces-28842-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28842-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id m11-20020a05622a054b00b0042992d10b30si11595766qtx.643.2024.01.17.02.31.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 02:31:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28842-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@arinc9.com header.s=gm1 header.b=HOBvp+VK; arc=pass (i=1 spf=pass spfdomain=arinc9.com dkim=pass dkdomain=arinc9.com dmarc=pass fromdomain=arinc9.com); spf=pass (google.com: domain of linux-kernel+bounces-28842-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28842-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=arinc9.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 3B34D1C213B7 for ; Wed, 17 Jan 2024 10:31:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7AE9B1EB42; Wed, 17 Jan 2024 10:29:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=arinc9.com header.i=@arinc9.com header.b="HOBvp+VK" 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 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: 8bit 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ı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) -- 2.40.1