Skip to content

Commit

Permalink
net: dsa: don't fail to probe if we couldn't set the MTU
Browse files Browse the repository at this point in the history
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: bfcb813 ("net: dsa: configure the MTU for switch ports")
Reported-by: Oleksij Rempel <[email protected]>
Signed-off-by: Vladimir Oltean <[email protected]>
Reviewed-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
vladimiroltean authored and davem330 committed Apr 23, 2020
1 parent a1211bf commit 72579e1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions net/dsa/slave.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 72579e1

Please sign in to comment.