From patchwork Mon Feb 12 16:42:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Gantois X-Patchwork-Id: 13553637 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 3D1F03D577; Mon, 12 Feb 2024 16:41:48 +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=1707756111; cv=none; b=mtFooNrhxMlIdQCXOnSh8XMS+OhSP7hrK0F4/hfUbvSXwa1qP7PpSIOJSvyYCCk9EIOA5nbHBPR3LRXGP8SaYAXuh9r5xKZUKmW0p7vBOOoTf7lFxyDYyhTimctERI2QpJXvd1YPI7D4JStUCa5Ef7TQnS3LpCouBBBfE2Pznr4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707756111; c=relaxed/simple; bh=KmB0u78D9JxCrE475PB1jJuFvDENMVZ3MM1k8g1OCt4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ssQbLyIv38RIGvuy1vJa+yA9/F1rZCAl8EG5ypkPkPbZM8c64WCOguZzLtTrfcFBbl7nOcjERXsc2j+eCGm6cEi9fW3bVkIVvsteyxlV7ck0I/Vr2C8zQAe8q7tnmHL4EYGpSq1sUzWVetInh0/KsGv1eE+76+qCR0A8xfFskgc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=aNqE32Mk; arc=none smtp.client-ip=217.70.183.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="aNqE32Mk" Received: by mail.gandi.net (Postfix) with ESMTPSA id 67D7E40009; Mon, 12 Feb 2024 16:41:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1707756107; 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=YRGNGZcqgoCOXv3VnpuOzxbccKn6jF8lp/JWdRUtrtM=; b=aNqE32MkTwMOGeDNs/Gq7I9Fc05Gi33DL90w52it9WeAPuBjjrAm0cgNNdTw2Tu6wb/vZm TaXb6FJqT8QqVJFY8B1eCtmWw9jJ0mbMj6l1dVzq+mI5qLDtDuiim+rG132skk5GXYn5Yn piZsHX7DwM5AtsxZ4I7SbiQp8Q/WT702Wv9eZx5fLmqZXvhSdveyb3H18uX8U9M0ojZZYk vfpHZ0LbFKHf1HvTFaanOPPOJF+oZhNVzNozMolXgNX90e5Sbjg+Jlg1Pf/fNSt9rjjGS1 9PRCGu/jfxQsiHKxfTM63NTSCwELAmrtZtIlbrDRpYQmbSnxbOjgqmkcO+ialw== From: Romain Gantois Date: Mon, 12 Feb 2024 17:42:10 +0100 Subject: [PATCH net-next v3 3/7] net: stmmac: don't rely on lynx_pcs presence to check for a PHY Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240212-rxc_bugfix-v3-3-e9f2eb6b3b05@bootlin.com> References: <20240212-rxc_bugfix-v3-0-e9f2eb6b3b05@bootlin.com> In-Reply-To: <20240212-rxc_bugfix-v3-0-e9f2eb6b3b05@bootlin.com> To: Russell King , Andrew Lunn , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexandre Torgue , Jose Abreu , Maxime Coquelin , =?utf-8?b?Q2zDqW1lbnQgTMOp?= =?utf-8?b?Z2Vy?= Cc: Maxime Chevallier , Miquel Raynal , Thomas Petazzoni , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, Romain Gantois X-Mailer: b4 0.12.4 X-GND-Sasl: romain.gantois@bootlin.com X-Patchwork-Delegate: kuba@kernel.org From: Maxime Chevallier When initializing attached PHYs, there are some cases where we don't expect any PHY to be connected. The logic uses conditions based on various local PCS configuration, but also calls-in phylink_expects_phy() via stmmac_init_phy(), which is enough to ensure we don't try to initialize a PHY when using a Lynx PCS, as long as we have the phy_interface set to a 802.3z mode and are using inband negociation. Drop the lynx check, making the stmmac generic code more pcs_lynx-agnostic. Signed-off-by: Maxime Chevallier [rgantois: commit log] Signed-off-by: Romain Gantois --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 9159d93ceb03..47cd8666af43 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3959,8 +3959,7 @@ static int __stmmac_open(struct net_device *dev, if (priv->hw->pcs != STMMAC_PCS_TBI && priv->hw->pcs != STMMAC_PCS_RTBI && (!priv->hw->xpcs || - xpcs_get_an_mode(priv->hw->xpcs, mode) != DW_AN_C73) && - !priv->hw->lynx_pcs) { + xpcs_get_an_mode(priv->hw->xpcs, mode) != DW_AN_C73)) { ret = stmmac_init_phy(dev); if (ret) { netdev_err(priv->dev,