net: hns3: bugfix for hclge_mdio_write and hclge_mdio_read
authorHuazhong Tan <tanhuazhong@huawei.com>
Tue, 30 Oct 2018 13:50:49 +0000 (21:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 1 Dec 2019 08:17:12 +0000 (09:17 +0100)
commit8dbecf6c2f1737249701522e93c7952083a12826
tree1b6f88a17b69356ce65d5cd38bdfa314c873e0c2
parent12eeb72afac226d9cb4c5555ebbcfebcc57f76f9
net: hns3: bugfix for hclge_mdio_write and hclge_mdio_read

[ Upstream commit 1c12493809924deda6c0834cb2f2c5a6dc786390 ]

When there is a PHY, the driver needs to complete some operations through
MDIO during reset reinitialization, so HCLGE_STATE_CMD_DISABLE is more
suitable than HCLGE_STATE_RST_HANDLING to prevent the MDIO operation from
being sent during the hardware reset.

Fixes: b50ae26c57cb ("net: hns3: never send command queue message to IMP when reset)
Signed-off-by: Huazhong Tan <tanhuazhong@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_mdio.c