From nobody Mon Feb 9 00:01:15 2026 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 BCCC73939A5 for ; Thu, 5 Feb 2026 09:23:40 +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=1770283421; cv=none; b=nho5HtvZu6hXYve6Bq/mjsyPYu91Ga/N0Gl7UzQwoUNBAU3LLLO4Ru4h2u+JPJjptEsogvV0BQeyYI+kCewlkFd5iyL32MoQ4Ipgga3DW1a0sqOzaESkISj7iMzHhNxjJtSczqvvbdxl7ffGS1IBc1sg98qyKX+zCvMUFxqtGug= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770283421; c=relaxed/simple; bh=wRzJK9Yc33onsr1SqP1pSLxAinwQo/XqZP+eAfKnhpg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GyoBFF/wxFoOajNzfK1w4/Be3NFxcVj6+IEI9Wqdq09j38McQVGJZlZ240eVVTOKTrcgI9820r1upWNrbuiQXXh/eE2nRnNw2sSmDG3ognx02QW7KuHQ9LwnTN1kZWQeXyaDJKuX0bPlKhAsAgU0azNvfTcPz6UXcw2XphFlM/M= 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=yttt/HS3; 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="yttt/HS3" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id BDDFAC243A7; Thu, 5 Feb 2026 09:23:43 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id B4592606FD; Thu, 5 Feb 2026 09:23:37 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 3A4C9119A8891; Thu, 5 Feb 2026 10:23:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1770283416; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=6yh6DzDkyKCbVY38GzuiVuOPYlrZ+spxgJkz3vkq/kI=; b=yttt/HS3XSOnCqL3CAMMf9uA911cvRX045XAfmc5nNXnZ+Wx0o2mwRhMSyRGK31Xkmyx/1 lu+gJm4Ja+ZKmw8tGyY0yFf+ihPOmiS3fAXZrZi+pc3/hRnL0wr0Voy0xTSrEQxZ2ZBE4A 1wpTVQyGuff0Znm5ukr9gcbyx7E1PV+Y+6QOLSO2LJodo7Kt1EOyEbhWlo0dHDiY02XIwX Ebe6Bc1hHDGpl73yJ6pMXV3WuZmeSNsCv/k8/nPXPiWD84XjfpkIfFUSHK1ArBG1i1ySxk ZUQGz48Lz+Et9e637N0tnK+tU8oPzcGyVnOW4la2Dzd2wq6CgQkHPMvfLqrhLQ== 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 v5 01/13] net: phy: initialize the port support based on the PHY's for OF ports Date: Thu, 5 Feb 2026 10:23:04 +0100 Message-ID: <20260205092317.755906-2-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20260205092317.755906-1-maxime.chevallier@bootlin.com> References: <20260205092317.755906-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: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" 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) =20 port->parent_type =3D PHY_PORT_PHY; port->phy =3D phydev; + + linkmode_copy(port->supported, phydev->supported); + err =3D phy_add_port(phydev, port); if (err) { phy_port_destroy(port); --=20 2.49.0