Commit 9ccc6e0c authored by Robert-Ionut Alexa's avatar Robert-Ionut Alexa Committed by David S. Miller

dpaa2-eth: unregister the netdev before disconnecting from the PHY

The netdev should be unregistered before we are disconnecting from the
MAC/PHY so that the dev_close callback is called and the PHY and the
phylink workqueues are actually stopped before we are disconnecting and
destroying the phylink instance.

Fixes: 71947923 ("dpaa2-eth: add MAC/PHY support through phylink")
Signed-off-by: default avatarRobert-Ionut Alexa <robert-ionut.alexa@nxp.com>
Signed-off-by: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 58e61e41
...@@ -4523,12 +4523,12 @@ static int dpaa2_eth_remove(struct fsl_mc_device *ls_dev) ...@@ -4523,12 +4523,12 @@ static int dpaa2_eth_remove(struct fsl_mc_device *ls_dev)
#ifdef CONFIG_DEBUG_FS #ifdef CONFIG_DEBUG_FS
dpaa2_dbg_remove(priv); dpaa2_dbg_remove(priv);
#endif #endif
unregister_netdev(net_dev);
rtnl_lock(); rtnl_lock();
dpaa2_eth_disconnect_mac(priv); dpaa2_eth_disconnect_mac(priv);
rtnl_unlock(); rtnl_unlock();
unregister_netdev(net_dev);
dpaa2_eth_dl_port_del(priv); dpaa2_eth_dl_port_del(priv);
dpaa2_eth_dl_traps_unregister(priv); dpaa2_eth_dl_traps_unregister(priv);
dpaa2_eth_dl_free(priv); dpaa2_eth_dl_free(priv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment