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 v3 net-next 5/6] net: phy: realtek: add rtl822x_c45_get_features() to set supported ports
Date: Tue, 2 Apr 2024 07:58:47 +0200 [thread overview]
Message-ID: <20240402055848.177580-6-ericwouds@gmail.com> (raw)
In-Reply-To: <20240402055848.177580-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 | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
index af5e77fd6576..b483aa3800e2 100644
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -844,6 +844,16 @@ static int rtl822xb_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;
@@ -1273,6 +1283,7 @@ static struct phy_driver realtek_drvs[] = {
.name = "RTL8221B-VB-CG 2.5Gbps PHY (C45)",
.config_init = rtl822xb_config_init,
.get_rate_matching = rtl822xb_get_rate_matching,
+ .get_features = rtl822x_c45_get_features,
.config_aneg = rtl822x_c45_config_aneg,
.read_status = rtl822xb_c45_read_status,
.suspend = genphy_c45_pma_suspend,
@@ -1294,6 +1305,7 @@ static struct phy_driver realtek_drvs[] = {
.name = "RTL8221B-VN-CG 2.5Gbps PHY (C45)",
.config_init = rtl822xb_config_init,
.get_rate_matching = rtl822xb_get_rate_matching,
+ .get_features = rtl822x_c45_get_features,
.config_aneg = rtl822x_c45_config_aneg,
.read_status = rtl822xb_c45_read_status,
.suspend = genphy_c45_pma_suspend,
--
2.42.1
next prev parent reply other threads:[~2024-04-02 5:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-02 5:58 [PATCH v3 net-next 0/6] rtl8226b/8221b add C45 instances and SerDes switching Eric Woudstra
2024-04-02 5:58 ` [PATCH v3 net-next 1/6] net: phy: realtek: configure SerDes mode for rtl822xb PHYs Eric Woudstra
2024-04-02 19:23 ` Russell King (Oracle)
2024-04-02 5:58 ` [PATCH v3 net-next 2/6] net: phy: realtek: add get_rate_matching() " Eric Woudstra
2024-04-02 19:24 ` Russell King (Oracle)
2024-04-02 5:58 ` [PATCH v3 net-next 3/6] net: phy: realtek: Add driver instances for rtl8221b via Clause 45 Eric Woudstra
2024-04-02 19:26 ` Russell King (Oracle)
2024-04-02 5:58 ` [PATCH v3 net-next 4/6] net: phy: realtek: Change rtlgen_get_speed() to rtlgen_decode_speed() Eric Woudstra
2024-04-02 19:27 ` Russell King (Oracle)
2024-04-02 5:58 ` Eric Woudstra [this message]
2024-04-02 15:41 ` [PATCH v3 net-next 5/6] net: phy: realtek: add rtl822x_c45_get_features() to set supported ports Daniel Golle
2024-04-02 18:31 ` Eric Woudstra
2024-04-02 5:58 ` [PATCH v3 net-next 6/6] net: sfp: add quirk for another multigig RollBall transceiver Eric Woudstra
2024-04-02 19:28 ` Russell King (Oracle)
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=20240402055848.177580-6-ericwouds@gmail.com \
--to=ericwouds@gmail$(echo .)com \
--cc=andrew@lunn$(echo .)ch \
--cc=daniel@makrotopia$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=frank-w@public-files$(echo .)de \
--cc=hkallweit1@gmail$(echo .)com \
--cc=kabel@kernel$(echo .)org \
--cc=kuba@kernel$(echo .)org \
--cc=linux@armlinux$(echo .)org.uk \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox