net: hns3: fix setting incorrect phy link ksettings for firmware in resetting process
authorGuangbin Huang <huangguangbin2@huawei.com>
Mon, 14 Nov 2022 08:20:48 +0000 (16:20 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Nov 2022 08:24:40 +0000 (09:24 +0100)
commit3d90a668c4bc64e5c889b1a3dc15e714708fdfc3
treee51c7a01dd52e290ee813d28f5e5c323613f4765
parent3f7b2ef8fe924e299bc339811ea3f1b9935c040f
net: hns3: fix setting incorrect phy link ksettings for firmware in resetting process

[ Upstream commit 510d7b6ae842e59ee00d57e5f07ac15131b6d899 ]

Currently, if driver is in phy-imp(phy controlled by imp firmware) mode, as
driver did not update phy link ksettings after initialization process or
not update advertising when getting phy link ksettings from firmware, it
may set incorrect phy link ksettings for firmware in resetting process.
So fix it.

Fixes: f5f2b3e4dcc0 ("net: hns3: add support for imp-controlled PHYs")
Fixes: c5ef83cbb1e9 ("net: hns3: fix for phy_addr error in hclge_mac_mdio_config")
Fixes: 2312e050f42b ("net: hns3: Fix for deadlock problem occurring when unregistering ae_algo")
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: Hao Lan <lanhao@huawei.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c