All of lore.kernel.org
 help / color / mirror / Atom feed
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 v4 net-next 5/6] net: phy: realtek: add rtl822x_c45_get_features() to set supported port
Date: Tue,  9 Apr 2024 09:30:15 +0200	[thread overview]
Message-ID: <20240409073016.367771-6-ericwouds@gmail.com> (raw)
In-Reply-To: <20240409073016.367771-1-ericwouds@gmail.com>

Sets ETHTOOL_LINK_MODE_TP_BIT in phydev->supported.

Signed-off-by: Eric Woudstra <ericwouds@gmail.com>
---
 drivers/net/phy/realtek.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
index 901c6f7b04c2..7ab41f95dae5 100644
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -843,6 +843,14 @@ 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);
+
+	return genphy_c45_pma_read_abilities(phydev);
+}
+
 static int rtl822x_c45_config_aneg(struct phy_device *phydev)
 {
 	bool changed = false;
@@ -1272,6 +1280,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,
@@ -1293,6 +1302,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


  parent reply	other threads:[~2024-04-09  7:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-09  7:30 [PATCH v4 net-next 0/6] rtl8226b/8221b add C45 instances and SerDes switching Eric Woudstra
2024-04-09  7:30 ` [PATCH v4 net-next 1/6] net: phy: realtek: configure SerDes mode for rtl822xb PHYs Eric Woudstra
2024-04-09 12:59   ` Andrew Lunn
2024-04-09  7:30 ` [PATCH v4 net-next 2/6] net: phy: realtek: add get_rate_matching() " Eric Woudstra
2024-04-09  7:30 ` [PATCH v4 net-next 3/6] net: phy: realtek: Add driver instances for rtl8221b via Clause 45 Eric Woudstra
2024-04-09  7:30 ` [PATCH v4 net-next 4/6] net: phy: realtek: Change rtlgen_get_speed() to rtlgen_decode_speed() Eric Woudstra
2024-04-09  7:30 ` Eric Woudstra [this message]
2024-04-09 12:55   ` [PATCH v4 net-next 5/6] net: phy: realtek: add rtl822x_c45_get_features() to set supported port Andrew Lunn
2024-04-09  7:30 ` [PATCH v4 net-next 6/6] net: sfp: add quirk for another multigig RollBall transceiver Eric Woudstra
2024-04-12  9:20 ` [PATCH v4 net-next 0/6] rtl8226b/8221b add C45 instances and SerDes switching patchwork-bot+netdevbpf

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=20240409073016.367771-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.