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:19:20 +0000 (08:19 +0100)
commitaf98283da9e92d672d4a5f0208f40aa55d95c20c
treeae1494157fc4aecb7b07629c8d22d7d1b2a85544
parent7a1f314e3c804a8d4eeb456fdc17095a6d26f420
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/hns3_enet.c