]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: revert to old channel when setting new channel num fail
authorPeng Li <lipeng321@huawei.com>
Wed, 11 Sep 2019 02:40:34 +0000 (10:40 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Sep 2019 08:08:45 +0000 (09:08 +0100)
commit3f3442fbae8f36abd92c6a21a3b5b7e69ed0027c
tree989eaf24860e0186fdfa70e2a20d118738734866
parent6b0e3a900abfb4a41a3070548faff485050105ce
net: hns3: revert to old channel when setting new channel num fail

After setting new channel num, it needs free old ring memory and
allocate new ring memory. If there is no enough memory and allocate
new ring memory fail, the ring may initialize fail. To make sure
the network interface can work normally, driver should revert the
channel to the old configuration.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c