mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-20 19:43:58 +08:00
net: hns3: synchronize speed and duplex from phy when phy link up
Driver calls phy_connect_direct and registers hclge_mac_adjust_link to synchronize mac speed and duplex from phy. It is better to synchronize mac speed and duplex from phy when phy link up. Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8362089d78
commit
0ad5ea5dbd
@ -179,6 +179,10 @@ static void hclge_mac_adjust_link(struct net_device *netdev)
|
||||
int duplex, speed;
|
||||
int ret;
|
||||
|
||||
/* When phy link down, do nothing */
|
||||
if (netdev->phydev->link == 0)
|
||||
return;
|
||||
|
||||
speed = netdev->phydev->speed;
|
||||
duplex = netdev->phydev->duplex;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user