]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 14 Jan 2019 09:28:55 +0000 (09:28 +0000)
commit6a2953dd8ff851bd5c2d188cb8de2b7b32307cc9
treee0720d96014caeae1c42426fd9210870fe3c8f33
parentd748274d42e421b6d1d03047bda045bb1b265d3c
net: hns3: Fix for netdev not up problem when setting mtu

BugLink: https://bugs.launchpad.net/bugs/1810457
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>
(cherry picked from commit 93d8daf460183871a965dae339839d9e35d44309)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c