Thread (10 messages) read the whole thread 10 messages, 3 authors, 2025-11-04

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

From: Maxime Chevallier <maxime.chevallier@bootlin.com>
Date: 2025-11-04 09:15:51
Also in: lkml

Hi,

On 04/11/2025 10:10, Romain Gantois wrote:
On Tuesday, 4 November 2025 10:01:36 CET Russell King (Oracle) wrote:
quoted
On Tue, Nov 04, 2025 at 09:50:36AM +0100, Romain Gantois wrote:
quoted
+static void dp83869_module_remove(void *upstream)
+{
+	struct phy_device *phydev = upstream;
+
+	phydev_info(phydev, "SFP module removed\n");
+
+	/* Set speed and duplex to unknown to avoid downshifting warning. */
+	phydev->speed = SPEED_UNKNOWN;
+	phydev->duplex = DUPLEX_UNKNOWN;
Should this be done by core phylib code?
I guess that enough PHY drivers do this by hand that a new phylib helper could 
be warranted. Maybe something like phy_clear_aneg_results(), which would set 
speed, duplex, pause and asym_pause to default values.
Note that when phy_port eventually gets merged, we'll have a 
common .module_remove() for PHY SFP :

https://lore.kernel.org/netdev/20251013143146.364919-9-maxime.chevallier@bootlin.com/ (local)

We could definitely do that here :)

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