From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
To: Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org
Subject: [PATCH net-next 06/13] net: phy: marvell: implement phy_inband_caps() method
Date: Tue, 03 Dec 2024 15:31:12 +0000 [thread overview]
Message-ID: <E1tIUro-006IUC-Rq@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <Z08kCwxdkU4n2V6x@shell.armlinux.org.uk>
Provide an implementation for phy_inband_caps() for Marvell PHYs used
on SFP modules, so that phylink knows the PHYs capabilities.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
drivers/net/phy/marvell.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index cd50cd6a7f75..3075ebc3f964 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -717,6 +717,20 @@ static int marvell_config_aneg_fiber(struct phy_device *phydev)
return genphy_check_and_restart_aneg(phydev, changed);
}
+static unsigned int m88e1111_inband_caps(struct phy_device *phydev,
+ phy_interface_t interface)
+{
+ /* In 1000base-X and SGMII modes, the inband mode can be changed
+ * through the Fibre page BMCR ANENABLE bit.
+ */
+ if (interface == PHY_INTERFACE_MODE_1000BASEX ||
+ interface == PHY_INTERFACE_MODE_SGMII)
+ return LINK_INBAND_DISABLE | LINK_INBAND_ENABLE |
+ LINK_INBAND_BYPASS;
+
+ return 0;
+}
+
static int m88e1111_config_aneg(struct phy_device *phydev)
{
int extsr = phy_read(phydev, MII_M1111_PHY_EXT_SR);
@@ -3677,6 +3691,7 @@ static struct phy_driver marvell_drivers[] = {
.name = "Marvell 88E1112",
/* PHY_GBIT_FEATURES */
.probe = marvell_probe,
+ .inband_caps = m88e1111_inband_caps,
.config_init = m88e1112_config_init,
.config_aneg = marvell_config_aneg,
.config_intr = marvell_config_intr,
@@ -3698,6 +3713,7 @@ static struct phy_driver marvell_drivers[] = {
/* PHY_GBIT_FEATURES */
.flags = PHY_POLL_CABLE_TEST,
.probe = marvell_probe,
+ .inband_caps = m88e1111_inband_caps,
.config_init = m88e1111gbe_config_init,
.config_aneg = m88e1111_config_aneg,
.read_status = marvell_read_status,
@@ -3721,6 +3737,7 @@ static struct phy_driver marvell_drivers[] = {
.name = "Marvell 88E1111 (Finisar)",
/* PHY_GBIT_FEATURES */
.probe = marvell_probe,
+ .inband_caps = m88e1111_inband_caps,
.config_init = m88e1111gbe_config_init,
.config_aneg = m88e1111_config_aneg,
.read_status = marvell_read_status,
--
2.30.2
next prev parent reply other threads:[~2024-12-03 15:31 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 15:30 [PATCH net-next 00/13] net: add negotiation of in-band capabilities Russell King (Oracle)
2024-12-03 15:30 ` [PATCH net-next 01/13] net: phylink: pass phylink and pcs into phylink_pcs_neg_mode() Russell King (Oracle)
2024-12-03 15:30 ` [PATCH net-next 02/13] net: phylink: split cur_link_an_mode into requested and active Russell King (Oracle)
2024-12-03 15:30 ` [PATCH net-next 03/13] net: phylink: add debug for phylink_major_config() Russell King (Oracle)
2024-12-03 15:31 ` [PATCH net-next 04/13] net: phy: add phy_inband_caps() Russell King (Oracle)
2024-12-03 15:31 ` [PATCH net-next 05/13] net: phy: bcm84881: implement phy_inband_caps() method Russell King (Oracle)
2024-12-03 16:45 ` Florian Fainelli
2024-12-03 15:31 ` Russell King (Oracle) [this message]
2024-12-03 15:31 ` [PATCH net-next 07/13] net: phy: add phy_config_inband() Russell King (Oracle)
2024-12-03 15:31 ` [PATCH net-next 08/13] net: phy: marvell: implement config_inband() method Russell King (Oracle)
2024-12-03 15:31 ` [PATCH net-next 09/13] net: phylink: add pcs_inband_caps() method Russell King (Oracle)
2024-12-03 15:31 ` [PATCH net-next 10/13] net: mvneta: implement " Russell King (Oracle)
2024-12-03 15:31 ` [PATCH net-next 11/13] net: mvpp2: " Russell King (Oracle)
2024-12-03 15:31 ` [PATCH net-next 12/13] net: phylink: add negotiation of in-band capabilities Russell King (Oracle)
2024-12-03 15:31 ` [PATCH net-next 13/13] net: phylink: remove phylink_phy_no_inband() Russell King (Oracle)
2024-12-05 3:30 ` [PATCH net-next 00/13] net: add negotiation of in-band capabilities 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=E1tIUro-006IUC-Rq@rmk-PC.armlinux.org.uk \
--to=rmk+kernel@armlinux.org.uk \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).