From: Vladimir Oltean <olteanv@gmail.com>
To: andrew@lunn.ch, f.fainelli@gmail.com, vivien.didelot@gmail.com,
davem@davemloft.net, o.rempel@pengutronix.de
Cc: netdev@vger.kernel.org
Subject: [PATCH net 2/2] net: dsa: don't fail to probe if we couldn't set the MTU
Date: Tue, 21 Apr 2020 15:31:10 +0300 [thread overview]
Message-ID: <20200421123110.13733-3-olteanv@gmail.com> (raw)
In-Reply-To: <20200421123110.13733-1-olteanv@gmail.com>
From: Vladimir Oltean <vladimir.oltean@nxp.com>
There is no reason to fail the probing of the switch if the MTU couldn't
be configured correctly (either the switch port itself, or the host
port) for whatever reason. MTU-sized traffic probably won't work, sure,
but we can still probably limp on and support some form of communication
anyway, which the users would probably appreciate more.
Fixes: bfcb813203e6 ("net: dsa: configure the MTU for switch ports")
Reported-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
net/dsa/slave.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 3776a6f6d312..34071d9bab3f 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -1773,11 +1773,9 @@ int dsa_slave_create(struct dsa_port *port)
rtnl_lock();
ret = dsa_slave_change_mtu(slave_dev, mtu);
rtnl_unlock();
- if (ret && ret != -EOPNOTSUPP) {
+ if (ret)
dev_err(ds->dev, "error %d setting MTU on port %d\n",
ret, port->index);
- goto out_free;
- }
netif_carrier_off(slave_dev);
--
2.17.1
prev parent reply other threads:[~2020-04-21 12:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-21 12:31 [PATCH net 0/2] MTU fixes for DSA Vladimir Oltean
2020-04-21 12:31 ` [PATCH net 1/2] net: dsa: be compatible with DSA masters with max_mtu of 1500 or less Vladimir Oltean
2020-04-21 13:33 ` Andrew Lunn
2020-04-21 13:42 ` Vladimir Oltean
2020-04-21 14:06 ` Andrew Lunn
2020-04-21 14:24 ` Vladimir Oltean
2020-04-21 14:50 ` Andrew Lunn
2020-04-21 12:31 ` 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=20200421123110.13733-3-olteanv@gmail.com \
--to=olteanv@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=vivien.didelot@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).