Thread (13 messages) 13 messages, 3 authors, 2026-06-11

Re: [PATCH net-next v2 3/3] net: phy: dp83869: Support 1000Base-X SFP

From: Romain Gantois <romain.gantois@bootlin.com>
Date: 2025-11-13 09:27:45
Also in: lkml

Hello Andrew,

On Tuesday, 11 November 2025 02:08:05 CET Andrew Lunn wrote:
...
quoted
+	ret = dp83869_configure_mode(phydev, dp83869);
+	if (ret)
+		return ret;
+
+	/* Reconfigure advertisement */
+	if (mutex_trylock(&phydev->lock)) {
+		ret = dp83869_config_aneg(phydev);
+		mutex_unlock(&phydev->lock);
Why is it safe to call dp83869_configure_mode() without the lock, but
dp83869_config_aneg() does need the lock? And what are the
consequences of not being able to get the lock and so aneg is not
configured?
Yeah the idea here is that if the LP changes, then the autoneg should be 
restarted afterwards. But doing it in the module_insert() callback of the PHY 
driver is quite complex as far as locking goes...

Maxime's phy_port series will make quite a bit of SFP code generic and will 
conflict with my series, so maybe it's better that I wait for Maxime's series 
to be merged before sending v3. Then I can try tackling this in a generic 
manner.

Thanks,

-- 
Romain Gantois, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Attachments

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