From: Eric Woudstra <ericwouds@gmail.com>
To: "Andrew Lunn" <andrew@lunn.ch>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
"Russell King" <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Marek Behún" <kabel@kernel.org>,
"Frank Wunderlich" <frank-w@public-files.de>,
"Daniel Golle" <daniel@makrotopia.org>
Cc: netdev@vger.kernel.org, Eric Woudstra <ericwouds@gmail.com>
Subject: [PATCH v2 net-next 5/7] net: phy: realtek: add rtl822x_c45_get_features() to set supported ports
Date: Sun, 3 Mar 2024 11:28:46 +0100 [thread overview]
Message-ID: <20240303102848.164108-6-ericwouds@gmail.com> (raw)
In-Reply-To: <20240303102848.164108-1-ericwouds@gmail.com>
Sets ETHTOOL_LINK_MODE_TP_BIT and ETHTOOL_LINK_MODE_MII_BIT in
phydev->supported.
Signed-off-by: Eric Woudstra <ericwouds@gmail.com>
---
drivers/net/phy/realtek.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
index 6449d8e0842c..3dc27a4f2c88 100644
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -836,6 +836,16 @@ static int rtl822x_read_status(struct phy_device *phydev)
return 0;
}
+static int rtl822x_c45_get_features(struct phy_device *phydev)
+{
+ linkmode_set_bit(ETHTOOL_LINK_MODE_TP_BIT,
+ phydev->supported);
+ linkmode_set_bit(ETHTOOL_LINK_MODE_MII_BIT,
+ phydev->supported);
+
+ return genphy_c45_pma_read_abilities(phydev);
+}
+
static int rtl822x_c45_config_aneg(struct phy_device *phydev)
{
bool changed = false;
@@ -1267,6 +1277,7 @@ static struct phy_driver realtek_drvs[] = {
.name = "RTL8221B-VB-CG 2.5Gbps PHY (C45)",
.config_init = rtl822x_config_init,
.get_rate_matching = rtl822x_get_rate_matching,
+ .get_features = rtl822x_c45_get_features,
.config_aneg = rtl822x_c45_config_aneg,
.read_status = rtl822x_c45_read_status,
.suspend = genphy_c45_pma_suspend,
@@ -1288,6 +1299,7 @@ static struct phy_driver realtek_drvs[] = {
.name = "RTL8221B-VN-CG 2.5Gbps PHY (C45)",
.config_init = rtl822x_config_init,
.get_rate_matching = rtl822x_get_rate_matching,
+ .get_features = rtl822x_c45_get_features,
.config_aneg = rtl822x_c45_config_aneg,
.read_status = rtl822x_c45_read_status,
.suspend = genphy_c45_pma_suspend,
@@ -1309,6 +1321,7 @@ static struct phy_driver realtek_drvs[] = {
.name = "RTL8251B 5Gbps PHY (C45)",
.config_init = rtl822x_config_init,
.get_rate_matching = rtl822x_get_rate_matching,
+ .get_features = rtl822x_c45_get_features,
.config_aneg = rtl822x_c45_config_aneg,
.read_status = rtl822x_c45_read_status,
.suspend = genphy_c45_pma_suspend,
--
2.42.1
next prev parent reply other threads:[~2024-03-03 10:29 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-03 10:28 [PATCH v2 net-next 0/7] rtl8221b/8251b add C45 instances and SerDes switching Eric Woudstra
2024-03-03 10:28 ` [PATCH v2 net-next 1/7] net: phy: realtek: configure SerDes mode for rtl822x/8251b PHYs Eric Woudstra
2024-03-03 13:29 ` Daniel Golle
2024-03-03 14:33 ` Eric Woudstra
2024-03-03 20:42 ` Heiner Kallweit
2024-03-03 21:08 ` Daniel Golle
2024-03-03 21:14 ` Heiner Kallweit
2024-03-04 0:04 ` Russell King (Oracle)
2024-03-05 8:44 ` Eric Woudstra
2024-03-03 10:28 ` [PATCH v2 net-next 2/7] net: phy: realtek: add get_rate_matching() " Eric Woudstra
2024-03-03 10:28 ` [PATCH v2 net-next 3/7] net: phy: realtek: Add driver instances for rtl8221b/8251b via Clause 45 Eric Woudstra
2024-03-03 10:28 ` [PATCH v2 net-next 4/7] net: phy: realtek: Change rtlgen_get_speed() to rtlgen_decode_speed() Eric Woudstra
2024-03-03 10:28 ` Eric Woudstra [this message]
2024-03-03 10:28 ` [PATCH v2 net-next 6/7] net: sfp: Fixup for OEM SFP-2.5G-T module Eric Woudstra
2024-03-03 10:28 ` [PATCH v2 net-next 7/7] net: sfp: add quirk for another multigig RollBall transceiver Eric Woudstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240303102848.164108-6-ericwouds@gmail.com \
--to=ericwouds@gmail.com \
--cc=andrew@lunn.ch \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=frank-w@public-files.de \
--cc=hkallweit1@gmail.com \
--cc=kabel@kernel.org \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.