]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: dsa: sja1105: Mark in-band AN modes not supported for PHYLINK
authorVladimir Oltean <olteanv@gmail.com>
Thu, 27 Jun 2019 21:46:37 +0000 (00:46 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Jun 2019 16:31:31 +0000 (09:31 -0700)
We need a better way to signal this, perhaps in phylink_validate, but
for now just print this error message as guidance for other people
looking at this driver's code while trying to rework PHYLINK.

Cc: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/sja1105/sja1105_main.c

index b366b8e100f8735cf836b76ff407e6949d8119fb..32bf3a7cc3b6db9961ec7df11cc0e9bb127de4a8 100644 (file)
@@ -806,6 +806,11 @@ static void sja1105_mac_config(struct dsa_switch *ds, int port,
        if (sja1105_phy_mode_mismatch(priv, port, state->interface))
                return;
 
+       if (link_an_mode == MLO_AN_INBAND) {
+               dev_err(ds->dev, "In-band AN not supported!\n");
+               return;
+       }
+
        sja1105_adjust_port_config(priv, port, state->speed);
 }