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 <email address hidden>
Signed-off-by: Huazhong Tan <email address hidden>
Signed-off-by: David S. Miller <email address hidden>
Is this patch the fix?
commit 3a5a5f06d4d2ddb 257cb71e9c52106 f50abad8fc
Author: Peng Li <email address hidden>
Date: Wed Sep 11 10:40:34 2019 +0800
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 <email address hidden>
Signed-off-by: Huazhong Tan <email address hidden>
Signed-off-by: David S. Miller <email address hidden>