public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail•com>
To: rmk+kernel@armlinux•org.uk, f.fainelli@gmail•com,
	vivien.didelot@gmail•com, andrew@lunn•ch, davem@davemloft•net
Cc: netdev@vger•kernel.org, Vladimir Oltean <olteanv@gmail•com>
Subject: [PATCH net-next 3/3] net: dsa: sja1105: Mark in-band AN modes not supported for PHYLINK
Date: Wed, 26 Jun 2019 14:20:14 +0300	[thread overview]
Message-ID: <20190626112014.7625-4-olteanv@gmail.com> (raw)
In-Reply-To: <20190626112014.7625-1-olteanv@gmail.com>

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>
---
 drivers/net/dsa/sja1105/sja1105_main.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c
index ad4f604590c0..d82afb835fb7 100644
--- a/drivers/net/dsa/sja1105/sja1105_main.c
+++ b/drivers/net/dsa/sja1105/sja1105_main.c
@@ -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);
 }
 
-- 
2.17.1


      parent reply	other threads:[~2019-06-26 11:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-26 11:20 [PATCH net-next 0/3] Better PHYLINK compliance for SJA1105 DSA Vladimir Oltean
2019-06-26 11:20 ` [PATCH net-next 1/3] net: dsa: sja1105: Don't check state->link in phylink_mac_config Vladimir Oltean
2019-06-26 11:20 ` [PATCH net-next 2/3] net: dsa: sja1105: Check for PHY mode mismatches with what PHYLINK reports Vladimir Oltean
2019-06-27 17:37   ` Russell King - ARM Linux admin
2019-06-26 11:20 ` Vladimir Oltean [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190626112014.7625-4-olteanv@gmail.com \
    --to=olteanv@gmail$(echo .)com \
    --cc=andrew@lunn$(echo .)ch \
    --cc=davem@davemloft$(echo .)net \
    --cc=f.fainelli@gmail$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=rmk+kernel@armlinux$(echo .)org.uk \
    --cc=vivien.didelot@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox