Thread (39 messages) 39 messages, 4 authors, 2025-08-22

Re: [PATCH net-next v10 11/15] net: phy: at803x: Support SFP through phy_port interface

From: Maxime Chevallier <maxime.chevallier@bootlin.com>
Date: 2025-08-04 13:56:45
Also in: linux-arm-msm, linux-devicetree, lkml, netdev

On Sat, 26 Jul 2025 23:24:36 +0200
Andrew Lunn [off-list ref] wrote:
On Tue, Jul 22, 2025 at 02:16:16PM +0200, Maxime Chevallier wrote:
quoted
Convert the at803x driver to use the generic phylib SFP handling, via a
dedicated .attach_port() callback, populating the supported interfaces.

As these devices are limited to 1000BaseX, a workaround is used to also
support, in a very limited way, copper modules. This is done by
supporting SGMII but limiting it to 1G full duplex (in which case it's
somwhat compatible with 1000BaseX).  
Missing e
quoted
+static int at8031_attach_port(struct phy_device *phydev, struct phy_port *port)
 {  
...
quoted
+	if (!port->is_mii)
+		return 0;  
That seems common to all these drivers? Can it be pulled into the
core?
If we pull that into the core, we'll need to add specialised
.attach_port() callbacks in phy_driver, such as

	.attach_mii_port() or .attach_serdes_port()
	.attach_mdi_port()

I'm perfectly OK with that though :)
quoted
-	if (iface == PHY_INTERFACE_MODE_SGMII)
-		dev_warn(&phydev->mdio.dev, "module may not function if 1000Base-X not supported\n");  
I think we need to keep this warning. I don't remember the details,
but i think this is the kernel saying the hardware is broken, this
might not work, we will give it a go, but don't blame me if it does
not work. We need to keep this disclaimer.
Sure thing, looking at it now I'm not sure why I removed that...

I'll add it back,

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