net: dsa: don't fail to probe if we couldn't set the MTU
Subsystems (3)
Vladimir Oltean
maintainerPATCH v2 1/1 net: dsa: don't fail to probe if we couldn't set the MTU
From: Vladimir Oltean <[email protected]>
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.
--- net/dsa/slave.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
net/dsa/slave.c +3 -5
@@ -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);
Signature · 1 line
2.17.1
Quoted 11 lines · Vladimir Oltean
From: Vladimir Oltean <[email protected]>
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 <[email protected]>Signed-off-by Vladimir Oltean <[email protected]>
Signature · 1 line
Florian
From: Vladimir Oltean <[email protected]>
Date: Tue, 21 Apr 2020 20:18:53 +0300
Quoted 11 lines
From: Vladimir Oltean <[email protected]>
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 <[email protected]>Signed-off-by Vladimir Oltean <[email protected]>
Applied, thanks Vlad.