Skip to contentSkip to conversation

net: phylink: allow RGMII/RTBI in-band status

PATCH Superseded Qingfang DENG 3 participants 4 messages Aug 19, 2022 – Aug 24, 2022

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: phylink: allow RGMII/RTBI in-band status

As per RGMII specification v2.0, section 3.4.1, RGMII/RTBI has an optional in-band status feature where the PHY's link status, speed and duplex mode can be passed to the MAC.
Allow RGMII/RTBI to use in-band status.

Fixes 9525ae83959b ("phylink: add phylink infrastructure")
---
 drivers/net/phy/phylink.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/phy/phylink.c +5 -0
index 9bd69328dc4d..57186d322835 100644
@@ -632,6 +632,11 @@ static int phylink_parse_mode(struct phylink *pl, struct fwnode_handle *fwnode)
 		switch (pl->link_config.interface) {
 		case PHY_INTERFACE_MODE_SGMII:
 		case PHY_INTERFACE_MODE_QSGMII:
+		case PHY_INTERFACE_MODE_RGMII:
+		case PHY_INTERFACE_MODE_RGMII_ID:
+		case PHY_INTERFACE_MODE_RGMII_RXID:
+		case PHY_INTERFACE_MODE_RGMII_TXID:
+		case PHY_INTERFACE_MODE_RTBI:
 			phylink_set(pl->supported, 10baseT_Half);
 			phylink_set(pl->supported, 10baseT_Full);
 			phylink_set(pl->supported, 100baseT_Half);
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 7 lines · On Fri, 19 Aug 2022 17:26:06 +0800 Qingfang DENG wrote:

As per RGMII specification v2.0, section 3.4.1, RGMII/RTBI has an optional in-band status feature where the PHY's link status, speed and duplex mode can be passed to the MAC.
Allow RGMII/RTBI to use in-band status.

Fixes 9525ae83959b ("phylink: add phylink infrastructure")

Russell, PHY folks, any judgment on this one?

Qingfang is there a platform which require RGMII to be supported in upstream LTS branches? If there isn't you should re-target the patch at net-next and drop the Fixes tag. Not implementing the entire spec is not considered a bug. Please clarify this in the commit message.

Quoted 16 lines
drivers/net/phy/phylink.c +5 -0
index 9bd69328dc4d..57186d322835 100644
@@ -632,6 +632,11 @@ static int phylink_parse_mode(struct phylink *pl, struct fwnode_handle *fwnode)
 		switch (pl->link_config.interface) {
 		case PHY_INTERFACE_MODE_SGMII:
 		case PHY_INTERFACE_MODE_QSGMII:
+		case PHY_INTERFACE_MODE_RGMII:
+		case PHY_INTERFACE_MODE_RGMII_ID:
+		case PHY_INTERFACE_MODE_RGMII_RXID:
+		case PHY_INTERFACE_MODE_RGMII_TXID:
+		case PHY_INTERFACE_MODE_RTBI:
 			phylink_set(pl->supported, 10baseT_Half);
 			phylink_set(pl->supported, 10baseT_Full);
 			phylink_set(pl->supported, 100baseT_Half);
maintainer Reviewed-by
#2 lore raw
Quoted 10 lines · Jakub Kicinski
Quoted 7 lines · On Fri, 19 Aug 2022 17:26:06 +0800 Qingfang DENG wrote:

As per RGMII specification v2.0, section 3.4.1, RGMII/RTBI has an optional in-band status feature where the PHY's link status, speed and duplex mode can be passed to the MAC.
Allow RGMII/RTBI to use in-band status.

Fixes 9525ae83959b ("phylink: add phylink infrastructure")

Russell, PHY folks, any judgment on this one?

It looks fine to me, thanks for the reminder.

Quoted 5 lines

Qingfang is there a platform which require RGMII to be supported in upstream LTS branches? If there isn't you should re-target the patch at net-next and drop the Fixes tag. Not implementing the entire spec is not considered a bug. Please clarify this in the commit message.

I agree - clarification is required.

Signature · 2 lines
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
#3 lore raw
In reply to Jakub Kicinski
Quoted 5 lines · Jakub Kicinski

Qingfang is there a platform which require RGMII to be supported in upstream LTS branches? If there isn't you should re-target the patch at net-next and drop the Fixes tag. Not implementing the entire spec is not considered a bug. Please clarify this in the commit message.

I'll send a v2 to re-target net-next. Thanks.