提交 6ff7ed80 编写于 作者: H Huazhong Tan 提交者: David S. Miller

net: hns3: prevent change MTU when resetting

When resetting, the changing of MTU is not allowed, so this patch
adds checking reset status in hns3_nic_change_mtu() to do that.
Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: NPeng Li <lipeng321@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c4e401e5
......@@ -1591,6 +1591,9 @@ static int hns3_nic_change_mtu(struct net_device *netdev, int new_mtu)
struct hnae3_handle *h = hns3_get_handle(netdev);
int ret;
if (hns3_nic_resetting(netdev))
return -EBUSY;
if (!h->ae_algo->ops->set_mtu)
return -EOPNOTSUPP;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册