diff options
author | David S. Miller <davem@davemloft.net> | 2015-08-27 21:45:31 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-27 21:45:31 -0700 |
commit | 0d36938bb82a7775c21ce0a7429f08ba13d025b6 (patch) | |
tree | f502caf5555591ee237e14e5fa96b2c005a85036 /drivers/net/ethernet/apm | |
parent | 55f14da66954083b621debbdbf62c7fc429291e8 (diff) | |
parent | 4941b8f0c2b9d88e8a6dacebf8b7faf603b98368 (diff) | |
download | blackbird-op-linux-0d36938bb82a7775c21ce0a7429f08ba13d025b6.tar.gz blackbird-op-linux-0d36938bb82a7775c21ce0a7429f08ba13d025b6.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/net/ethernet/apm')
-rw-r--r-- | drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 3 | ||||
-rw-r--r-- | drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c index a626c4315a89..cfa37041ab71 100644 --- a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c @@ -801,6 +801,9 @@ int xgene_enet_mdio_config(struct xgene_enet_pdata *pdata) void xgene_enet_mdio_remove(struct xgene_enet_pdata *pdata) { + if (pdata->phy_dev) + phy_disconnect(pdata->phy_dev); + mdiobus_unregister(pdata->mdio_bus); mdiobus_free(pdata->mdio_bus); pdata->mdio_bus = NULL; diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c index b330cb6fa8bb..e47298faf78d 100644 --- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c @@ -1463,9 +1463,10 @@ static int xgene_enet_remove(struct platform_device *pdev) mac_ops->tx_disable(pdata); xgene_enet_napi_del(pdata); - xgene_enet_mdio_remove(pdata); - xgene_enet_delete_desc_rings(pdata); + if (pdata->phy_mode == PHY_INTERFACE_MODE_RGMII) + xgene_enet_mdio_remove(pdata); unregister_netdev(ndev); + xgene_enet_delete_desc_rings(pdata); pdata->port_ops->shutdown(pdata); free_netdev(ndev); |