Skip to contentSkip to conversation

r8169: remove 1000/Half from supported modes

PATCH Applied Heiner Kallweit 4 participants 5 messages May 28, 2019 – May 30, 2019

Subsystems (3)
lore
Share & tools
lore

Heiner Kallweit

author maintainer
#0 lore raw

PATCH 1/1 r8169: remove 1000/Half from supported modes

MAC on the GBit versions supports 1000/Full only, however the PHY partially claims to support 1000/Half. So let's explicitly remove this mode.

---
 drivers/net/ethernet/realtek/r8169.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/ethernet/realtek/r8169.c +4 -1
index 61e7eef5e..0239a3de2 100644
@@ -6397,7 +6397,10 @@ static int r8169_phy_connect(struct rtl8169_private *tp)
 	if (ret)
 		return ret;
 
-	if (!tp->supports_gmii)
+	if (tp->supports_gmii)
+		phy_remove_link_mode(phydev,
+				     ETHTOOL_LINK_MODE_1000baseT_Half_BIT);
+	else
 		phy_set_max_speed(phydev, SPEED_100);
 
 	phy_support_asym_pause(phydev);
Signature · 1 line
2.21.0
#2 lore raw
In reply to Heiner Kallweit
Quoted 5 lines · Heiner Kallweit

MAC on the GBit versions supports 1000/Full only, however the PHY partially claims to support 1000/Half. So let's explicitly remove this mode.

Don't you want a Fixes: tag for that?

Quoted 21 lines
---
 drivers/net/ethernet/realtek/r8169.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/ethernet/realtek/r8169.c +4 -1
index 61e7eef5e..0239a3de2 100644
@@ -6397,7 +6397,10 @@ static int r8169_phy_connect(struct rtl8169_private *tp)
 	if (ret)
 		return ret;
 
-	if (!tp->supports_gmii)
+	if (tp->supports_gmii)
+		phy_remove_link_mode(phydev,
+				     ETHTOOL_LINK_MODE_1000baseT_Half_BIT);
+	else
 		phy_set_max_speed(phydev, SPEED_100);
 
 	phy_support_asym_pause(phydev);
Signature · 1 line
Florian
author maintainer
#3 lore raw
Quoted 9 lines · Florian Fainelli
Quoted 5 lines · Heiner Kallweit

MAC on the GBit versions supports 1000/Full only, however the PHY partially claims to support 1000/Half. So let's explicitly remove this mode.

Don't you want a Fixes: tag for that?

I'm not aware of any problem caused by that. And according to what I've read 1000/Half has been specified but never really been used. So it should be sufficient to treat this as an improvement.

Quoted 23 lines
Quoted 21 lines
---
 drivers/net/ethernet/realtek/r8169.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/ethernet/realtek/r8169.c +4 -1
index 61e7eef5e..0239a3de2 100644
@@ -6397,7 +6397,10 @@ static int r8169_phy_connect(struct rtl8169_private *tp)
 	if (ret)
 		return ret;
 
-	if (!tp->supports_gmii)
+	if (tp->supports_gmii)
+		phy_remove_link_mode(phydev,
+				     ETHTOOL_LINK_MODE_1000baseT_Half_BIT);
+	else
 		phy_set_max_speed(phydev, SPEED_100);
 
 	phy_support_asym_pause(phydev);