提交 72579e14 编写于 作者: V Vladimir Oltean 提交者: David S. Miller

net: dsa: don't fail to probe if we couldn't set the MTU

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: bfcb8132 ("net: dsa: configure the MTU for switch ports")
Reported-by: NOleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 a1211bf9
...@@ -1770,11 +1770,9 @@ int dsa_slave_create(struct dsa_port *port) ...@@ -1770,11 +1770,9 @@ int dsa_slave_create(struct dsa_port *port)
rtnl_lock(); rtnl_lock();
ret = dsa_slave_change_mtu(slave_dev, ETH_DATA_LEN); ret = dsa_slave_change_mtu(slave_dev, ETH_DATA_LEN);
rtnl_unlock(); rtnl_unlock();
if (ret && ret != -EOPNOTSUPP) { if (ret)
dev_err(ds->dev, "error %d setting MTU on port %d\n", dev_warn(ds->dev, "nonfatal error %d setting MTU on port %d\n",
ret, port->index); ret, port->index);
goto out_free;
}
netif_carrier_off(slave_dev); netif_carrier_off(slave_dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册