Thread (18 messages) read the whole thread 18 messages, 2 authors, 3d ago

Re: [PATCH net-next v7 4/7] r8169: add support for RTL8116af

From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-07-23 01:13:17
Also in: lkml

quoted hunk ↗ jump to hunk
 static void rtl8169_init_phy(struct rtl8169_private *tp)
 {
+	phy_init_hw(tp->phydev);
+	phy_resume(tp->phydev);
 	r8169_hw_phy_config(tp, tp->phydev, tp->mac_version);
 
 	if (tp->mac_version <= RTL_GIGA_MAC_VER_06) {
@@ -2562,7 +2607,7 @@ static void rtl8169_init_phy(struct rtl8169_private *tp)
 	    tp->pci_dev->subsystem_device == 0xe000)
 		phy_write_paged(tp->phydev, 0x0001, 0x10, 0xf01b);
 
-	if (tp->sfp_mode)
+	if (tp->sfp_mode == RTL_SFP_8127_ATF)
 		rtl_sfp_init(tp);
This could be diff getting me confused....

You unconditionally call phy_init_hw() and phy_resume(). And then if
this device should have an SFP you do something else. How can a device
with an SFP also have a PHY?

	Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help