Skip to content

Commit 9ccc6e0

Browse files
Robert-Ionut Alexadavem330
authored andcommitted
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: 7194792 ("dpaa2-eth: add MAC/PHY support through phylink") Signed-off-by: Robert-Ionut Alexa <[email protected]> Signed-off-by: Ioana Ciornei <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 58e61e4 commit 9ccc6e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4523,12 +4523,12 @@ static int dpaa2_eth_remove(struct fsl_mc_device *ls_dev)
45234523
#ifdef CONFIG_DEBUG_FS
45244524
dpaa2_dbg_remove(priv);
45254525
#endif
4526+
4527+
unregister_netdev(net_dev);
45264528
rtnl_lock();
45274529
dpaa2_eth_disconnect_mac(priv);
45284530
rtnl_unlock();
45294531

4530-
unregister_netdev(net_dev);
4531-
45324532
dpaa2_eth_dl_port_del(priv);
45334533
dpaa2_eth_dl_traps_unregister(priv);
45344534
dpaa2_eth_dl_free(priv);

0 commit comments

Comments
 (0)