Thread (17 messages) flat view 17 messages, 3 authors, 2021-06-23

Re: [PATCH net-next v4 04/10] net: sparx5: add port module support

From: "Russell King (Oracle)" <linux@armlinux.org.uk>
Date: 2021-06-21 14:33:50
Also in: linux-arm-kernel, lkml

Hi,

On Tue, Jun 15, 2021 at 10:50:28AM +0200, Steen Hegelund wrote:
+static int sparx5_port_pcs_low_set(struct sparx5 *sparx5,
+				   struct sparx5_port *port,
+				   struct sparx5_port_config *conf)
+{
+	bool sgmii = false, inband_aneg = false;
+	int err;
+
+	if (!port->conf.has_sfp) {
+		sgmii = true; /* Phy is connnected to the MAC */
+	} else {
+		if (conf->portmode == PHY_INTERFACE_MODE_SGMII ||
+		    conf->portmode == PHY_INTERFACE_MODE_QSGMII)
+			inband_aneg = true; /* Cisco-SGMII in-band-aneg */
+		else if (conf->portmode == PHY_INTERFACE_MODE_1000BASEX &&
+			 conf->autoneg)
+			inband_aneg = true; /* Clause-37 in-band-aneg */
I have to wonder why the presence of inband aneg depends on whether
there's a SFP or not... We don't do that kind of thing in other
drivers, so what is different here?

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help