* [PATCH v2 net] net: dsa: don't fail to probe if we couldn't set the MTU
@ 2020-04-21 17:18 Vladimir Oltean
2020-04-21 17:20 ` Florian Fainelli
2020-04-23 2:23 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Vladimir Oltean @ 2020-04-21 17:18 UTC (permalink / raw)
To: andrew, f.fainelli, vivien.didelot, davem, o.rempel; +Cc: netdev
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 | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index e94eb1aac602..d1068803cd11 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -1770,11 +1770,9 @@ int dsa_slave_create(struct dsa_port *port)
rtnl_lock();
ret = dsa_slave_change_mtu(slave_dev, ETH_DATA_LEN);
rtnl_unlock();
- if (ret && ret != -EOPNOTSUPP) {
- dev_err(ds->dev, "error %d setting MTU on port %d\n",
- ret, port->index);
- goto out_free;
- }
+ if (ret)
+ dev_warn(ds->dev, "nonfatal error %d setting MTU on port %d\n",
+ ret, port->index);
netif_carrier_off(slave_dev);
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 net] net: dsa: don't fail to probe if we couldn't set the MTU
2020-04-21 17:18 [PATCH v2 net] net: dsa: don't fail to probe if we couldn't set the MTU Vladimir Oltean
@ 2020-04-21 17:20 ` Florian Fainelli
2020-04-23 2:23 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2020-04-21 17:20 UTC (permalink / raw)
To: Vladimir Oltean, andrew, vivien.didelot, davem, o.rempel; +Cc: netdev
On 4/21/2020 10:18 AM, Vladimir Oltean wrote:
> 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>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 net] net: dsa: don't fail to probe if we couldn't set the MTU
2020-04-21 17:18 [PATCH v2 net] net: dsa: don't fail to probe if we couldn't set the MTU Vladimir Oltean
2020-04-21 17:20 ` Florian Fainelli
@ 2020-04-23 2:23 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2020-04-23 2:23 UTC (permalink / raw)
To: olteanv; +Cc: andrew, f.fainelli, vivien.didelot, o.rempel, netdev
From: Vladimir Oltean <olteanv@gmail.com>
Date: Tue, 21 Apr 2020 20:18:53 +0300
> 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>
Applied, thanks Vlad.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-23 2:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-21 17:18 [PATCH v2 net] net: dsa: don't fail to probe if we couldn't set the MTU Vladimir Oltean
2020-04-21 17:20 ` Florian Fainelli
2020-04-23 2:23 ` David Miller
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).