Skip to content

Commit 72579e1

Browse files
vladimirolteandavem330
authored andcommitted
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: 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]>
1 parent a1211bf commit 72579e1

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

net/dsa/slave.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1770,11 +1770,9 @@ int dsa_slave_create(struct dsa_port *port)
17701770
rtnl_lock();
17711771
ret = dsa_slave_change_mtu(slave_dev, ETH_DATA_LEN);
17721772
rtnl_unlock();
1773-
if (ret && ret != -EOPNOTSUPP) {
1774-
dev_err(ds->dev, "error %d setting MTU on port %d\n",
1775-
ret, port->index);
1776-
goto out_free;
1777-
}
1773+
if (ret)
1774+
dev_warn(ds->dev, "nonfatal error %d setting MTU on port %d\n",
1775+
ret, port->index);
17781776

17791777
netif_carrier_off(slave_dev);
17801778

0 commit comments

Comments
 (0)