]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
net: hns3: Fix for information of phydev lost problem when down/up
authorFuyun Liang <liangfuyun1@huawei.com>
Tue, 14 Aug 2018 16:13:14 +0000 (17:13 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 14 Aug 2018 16:54:23 +0000 (09:54 -0700)
commitb01b7cf19bf4a677d5dd4e63b12d86a021db751d
tree75712ddad34f78dd404de4626d7cd103379b4b7d
parent6c39d5278e62956238a681e4cfc69fae5507fc57
net: hns3: Fix for information of phydev lost problem when down/up

Function call of phy_connect_direct will reinitialize phydev. Some
information like advertising will be lost. Phy_connect_direct only
needs to be called once. And driver can run well. This patch adds
some functions to ensure that phy_connect_direct is called only once
to solve the information of phydev lost problem occurring when we stop
the net and open it again.

Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support
Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mdio.h