From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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 C86072F1FEA for ; Tue, 3 Feb 2026 17:29:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770139742; cv=none; b=W9jkYCDZ9VYAmTlPK0QqxXc2zrnqv5NMWYsN09sOMcQfLH1dpkyolpX/lF3qgeRI3s5mGRyMmZXEk3I/SCbtfSnbFG7fxGsH2h0jN4HeO0MbESmI6sYwE1co34A3XzSRDBOEpYS4QcrLlGy/tfUV/IDEFRq47gQj8i99AO5Olog= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770139742; c=relaxed/simple; bh=wRzJK9Yc33onsr1SqP1pSLxAinwQo/XqZP+eAfKnhpg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=L9MG5XJbdDLxa3S1e3rWV5u9hnCIuoHQQ1VIdApIxMtT6ChjMI0YSiiPboSK7rnnMS7f17EH9aBZ8EyFFLVftsHqB/wVqgIgdT8eCw5tTmEhexg8EAr2wYOSTXpNkPvbwo90EeG0p9mgIDstYDKeCo/e06LQUlvDm7FVGT/2UEc= 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=fhYErvC5; arc=none smtp.client-ip=185.171.202.116 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="fhYErvC5" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 91428C24385; Tue, 3 Feb 2026 17:28:58 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 4C71A60728; Tue, 3 Feb 2026 17:28:53 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 42561119A88EE; Tue, 3 Feb 2026 18:28:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1770139732; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=6yh6DzDkyKCbVY38GzuiVuOPYlrZ+spxgJkz3vkq/kI=; b=fhYErvC5sSdGikVuWpcEzDzDWhLg6o+F2I6+ZKl9KAQzFSHQELyFIv9NJBs/jGXRo2m2Y4 2uw/oIALzzCqzi0vTFiO0+f7p+u30WF8YsT7Sg7Py71fgXftUUfSlDxoD2uFiVKcCd6acN wbtkc9YO5yZil4BQzW7hj+TcGpYqhGfGQEA1Rsliexv1zKyIDtMk9oR++vXBOU/lO08uTx l5SaoIe69TYKNg4/s+crVbNBgC9xJC/J+Uy08ObVKgmiWvln6jQ0d08bcbQ9SDEmewWGO+ hnsn0DdRPWawonXeclX1uM9hkIxrc2kLOpi00WwDkSHtunHOoMSicI4J/b0WlQ== From: Maxime Chevallier To: davem@davemloft.net, Andrew Lunn , Jakub Kicinski , Eric Dumazet , Paolo Abeni , Russell King , Heiner Kallweit Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, Christophe Leroy , Herve Codina , Florian Fainelli , Vladimir Oltean , =?UTF-8?q?K=C3=B6ry=20Maincent?= , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Oleksij Rempel , =?UTF-8?q?Nicol=C3=B2=20Veronese?= , Simon Horman , mwojtas@chromium.org, Romain Gantois , Daniel Golle , Dimitri Fedrau Subject: [PATCH net-next v4 01/13] net: phy: initialize the port support based on the PHY's for OF ports Date: Tue, 3 Feb 2026 18:28:25 +0100 Message-ID: <20260203172839.548524-2-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20260203172839.548524-1-maxime.chevallier@bootlin.com> References: <20260203172839.548524-1-maxime.chevallier@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 With the phy_port infrastructure came an ethernet-connector binding, allowing to represent the MDI of a PHY in devicetree. This allows specifying the mediums and pairs of a port. Let's initialize the port's supported list based on what the PHY reports, so that we can then filter it with what the connector allows using. Signed-off-by: Maxime Chevallier --- drivers/net/phy/phy_device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 8a3eb1839a3d..9b8eaac63b90 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -3499,6 +3499,9 @@ static int of_phy_ports(struct phy_device *phydev) port->parent_type = PHY_PORT_PHY; port->phy = phydev; + + linkmode_copy(port->supported, phydev->supported); + err = phy_add_port(phydev, port); if (err) { phy_port_destroy(port); -- 2.49.0