net: hns3: Fix for netdev not up problem when setting mtu
authorYunsheng Lin <linyunsheng@huawei.com>
Wed, 26 Sep 2018 18:28:37 +0000 (19:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 Nov 2019 07:22:49 +0000 (08:22 +0100)
commitba02192598b897105762d30f673805e84aa9971d
tree900f101a6fb20b354438856b4bbe0f8df02c0089
parentc26aff78aa2bf3b4449cef83057276ed55a0d7f4
net: hns3: Fix for netdev not up problem when setting mtu

[ Upstream commit 93d8daf460183871a965dae339839d9e35d44309 ]

Currently hns3_nic_change_mtu will try to down the netdev before
setting mtu, and it does not up the netdev when the setting fails,
which causes netdev not up problem.

This patch fixes it by not returning when the setting fails.

Fixes: a8e8b7ff3517 ("net: hns3: Add support to change MTU in HNS3 hardware")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c