diff --git a/drivers/net/ethernet/nvidia/nvethernet/ether_linux.c b/drivers/net/ethernet/nvidia/nvethernet/ether_linux.c index 06ff4c63..6abf05b7 100644 --- a/drivers/net/ethernet/nvidia/nvethernet/ether_linux.c +++ b/drivers/net/ethernet/nvidia/nvethernet/ether_linux.c @@ -7717,6 +7717,8 @@ static int ether_remove(struct platform_device *pdev) { struct net_device *ndev = platform_get_drvdata(pdev); struct ether_priv_data *pdata = netdev_priv(ndev); + struct device *dev = pdata->dev; + struct device_node *np = dev->of_node; #ifdef MACSEC_SUPPORT macsec_remove(pdata); @@ -7727,6 +7729,11 @@ static int ether_remove(struct platform_device *pdev) /* remove nvethernet sysfs group under /sys/devices// */ ether_sysfs_unregister(pdata); + /* De registering the fixed link */ + if (of_phy_is_fixed_link(np)) { + of_phy_deregister_fixed_link(np); + } + ether_put_clks(pdata); /* Assert MAC RST gpio */