Patch "dpaa2-eth: unregister the netdev before disconnecting from the PHY" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

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

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     dpaa2-eth-unregister-the-netdev-before-disconnecting.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 28c39055bd5339d2ef76b8eb446c8cd4f26e2bfe
Author: Robert-Ionut Alexa <robert-ionut.alexa@xxxxxxx>
Date:   Wed Feb 9 17:57:43 2022 +0200

    dpaa2-eth: unregister the netdev before disconnecting from the PHY
    
    [ Upstream commit 9ccc6e0c8959a019bb40f6b18704b142c04b19a8 ]
    
    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: 719479230893 ("dpaa2-eth: add MAC/PHY support through phylink")
    Signed-off-by: Robert-Ionut Alexa <robert-ionut.alexa@xxxxxxx>
    Signed-off-by: Ioana Ciornei <ioana.ciornei@xxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
index f06d88c471d0f..f917bc9c87969 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
@@ -4405,12 +4405,12 @@ static int dpaa2_eth_remove(struct fsl_mc_device *ls_dev)
 #ifdef CONFIG_DEBUG_FS
 	dpaa2_dbg_remove(priv);
 #endif
+
+	unregister_netdev(net_dev);
 	rtnl_lock();
 	dpaa2_eth_disconnect_mac(priv);
 	rtnl_unlock();
 
-	unregister_netdev(net_dev);
-
 	dpaa2_eth_dl_port_del(priv);
 	dpaa2_eth_dl_traps_unregister(priv);
 	dpaa2_eth_dl_unregister(priv);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux