From patchwork Mon Mar 11 09:55:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Gantois X-Patchwork-Id: 13588493 X-Patchwork-Delegate: kuba@kernel.org Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) (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 C01931B5B7; Mon, 11 Mar 2024 09:55:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.196 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710150928; cv=none; b=iF9P+zmzwiJZBTcZbPbVorGoDSTkNJqfxDUYmhvVjVt/XaDRWqjRgdtve5q4DWw/NIs6Byw4Lf1BntfhXsx/RJp6g3zoVHb7NRr7yWFc4HZZKiyzWDbcF0Ub+HESiEuGJoORYZOQ1MWvfq39YBUSMOjgfQoicyehsSOMtRKQ5ro= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710150928; c=relaxed/simple; bh=VdWyuDwbJfZTZM7J9WqmMa4A452auqSMw8z91r6hLZY=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=canf8M6YareXfntjrxGj9Jbw+N8oNNkPgmIvidfhbfn5ahBD2Fq3vujtXxakuBnw1HlOJaslmG2Wci9KLK56apf132fpkm07n8NQorDd8oqmB8FsX1OcUu3jQnm9W89IgXfSefLEQ/pdYlMgq/foiLnfc3rIox3mBiyrbv2Jk+U= 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=MnOL9tJc; arc=none smtp.client-ip=217.70.183.196 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="MnOL9tJc" Received: by mail.gandi.net (Postfix) with ESMTPSA id B5DD9E001F; Mon, 11 Mar 2024 09:55:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1710150919; 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=8Hre9/21LZl4mrXvR33ftuCbpilsmjMQ6zHliMO3IS8=; b=MnOL9tJc+tSEQbs5tyBZvUYpKbrdxVmHPKvBoCcJXdRGak8Oh2MA2xD+KAvJn1QKU0O7VF rk3IBvgZ9moGcvM7WEvnt/P7+luGqY73sl28Ym46/xGv30eyjyo/IdsD8WQZ9Kq8MuKdn0 PM+NRLD3Pcrt3sleQbyZG1Xb1IDN4AFJIDvIAG2s3zy9mV3qTUOC5WRbIK+THVpkw58v/X YWzScwW/oT2fGiRp/7NRFDN/gHFxgmzsINiv6DinmWrMb4epYjSnevuiVFkVCqJyem8iG/ 1HcxDaURXXAIjdlXmMNGP1IN2KDhaRv1pTS7J5rSrB37k07z4RNcJuQMWEFnrQ== From: Romain Gantois Date: Mon, 11 Mar 2024 10:55:46 +0100 Subject: [PATCH net-next v6 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: <20240311-rxc_bugfix-v6-3-adf5133829a2@bootlin.com> References: <20240311-rxc_bugfix-v6-0-adf5133829a2@bootlin.com> In-Reply-To: <20240311-rxc_bugfix-v6-0-adf5133829a2@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.13.0 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 Reviewed-by: Andrew Lunn --- 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 24cd80490d19..d78c625d33eb 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3960,8 +3960,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,