]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: hns3: fix port duplex configure error in IMP reset
authorJie Wang <wangjie125@huawei.com>
Thu, 7 Mar 2024 01:01:14 +0000 (09:01 +0800)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:39 +0000 (18:19 -0400)
commit9017a4f374379a9486c0e26af67a92e3a37593df
treef151617f79d35e96bee437844b9209038c028abb
parentf0b5225a7dfc1bf53c98215db8c2f0b4efd3f108
net: hns3: fix port duplex configure error in IMP reset

[ Upstream commit 11d80f79dd9f871a52feba4bf24b5ac39f448eb7 ]

Currently, the mac port is fixed to configured as full dplex mode in
hclge_mac_init() when driver initialization or reset restore. Users may
change the mode to half duplex with ethtool,  so it may cause the user
configuration dropped after reset.

To fix it, don't change the duplex mode when resetting.

Fixes: 2d03eacc0b7e ("net: hns3: Only update mac configuation when necessary")
Signed-off-by: Jie Wang <wangjie125@huawei.com>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c