]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: hns3: add wait until mac link down
authorJie Wang <wangjie125@huawei.com>
Mon, 7 Aug 2023 11:34:51 +0000 (19:34 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Aug 2023 16:32:27 +0000 (18:32 +0200)
commit008b9c6167bd4d4a1735394dd162f0d3ddbdf0b0
treec51b741f4f7ddfa6c7f89fcf84a23cf3260d1b41
parent6a5e230a8a172d4c843d96ce6f9977b63ef4acfb
net: hns3: add wait until mac link down

commit 6265e242f7b95f2c1195b42ec912b84ad161470e upstream.

In some configure flow of hns3 driver, for example, change mtu, it will
disable MAC through firmware before configuration. But firmware disables
MAC asynchronously. The rx traffic may be not stopped in this case.

So fixes it by waiting until mac link is down.

Fixes: a9775bb64aa7 ("net: hns3: fix set and get link ksettings issue")
Signed-off-by: Jie Wang <wangjie125@huawei.com>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Link: https://lore.kernel.org/r/20230807113452.474224-4-shaojijie@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c