Patch "net: stmmac: fix pm runtime issue in stmmac_dvr_remove()" has been added to the 5.18-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

    net: stmmac: fix pm runtime issue in stmmac_dvr_remove()

to the 5.18-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:
     net-stmmac-fix-pm-runtime-issue-in-stmmac_dvr_remove.patch
and it can be found in the queue-5.18 subdirectory.

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



commit 4f1abbea33fd205881539360d1255db99ea3ce5b
Author: Biao Huang <biao.huang@xxxxxxxxxxxx>
Date:   Thu Jul 14 14:00:13 2022 +0800

    net: stmmac: fix pm runtime issue in stmmac_dvr_remove()
    
    [ Upstream commit 0d9a15913b871e03fdd3b3d90a2e665fb22f9bcf ]
    
    If netif is running when stmmac_dvr_remove is invoked,
    the unregister_netdev will call ndo_stop(stmmac_release) and
    vlan_kill_rx_filter(stmmac_vlan_rx_kill_vid).
    
    Currently, stmmac_dvr_remove() will disable pm runtime before
    unregister_netdev. When stmmac_vlan_rx_kill_vid is invoked,
    pm_runtime_resume_and_get in it returns EACCESS error number,
    and reports:
    
            dwmac-mediatek 11021000.ethernet eth0: stmmac_dvr_remove: removing driver
            dwmac-mediatek 11021000.ethernet eth0: FPE workqueue stop
            dwmac-mediatek 11021000.ethernet eth0: failed to kill vid 0081/0
    
    Move the pm_runtime_disable to the end of stmmac_dvr_remove
    to fix this issue.
    
    Fixes: 6449520391dfc ("net: stmmac: properly handle with runtime pm in stmmac_dvr_remove()")
    Signed-off-by: Biao Huang <biao.huang@xxxxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 2525a80353b7..d43c9ba0b270 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -7220,8 +7220,6 @@ int stmmac_dvr_remove(struct device *dev)
 	netdev_info(priv->dev, "%s: removing driver", __func__);
 
 	pm_runtime_get_sync(dev);
-	pm_runtime_disable(dev);
-	pm_runtime_put_noidle(dev);
 
 	stmmac_stop_all_dma(priv);
 	stmmac_mac_set(priv, priv->ioaddr, false);
@@ -7248,6 +7246,9 @@ int stmmac_dvr_remove(struct device *dev)
 	mutex_destroy(&priv->lock);
 	bitmap_free(priv->af_xdp_zc_qps);
 
+	pm_runtime_disable(dev);
+	pm_runtime_put_noidle(dev);
+
 	return 0;
 }
 EXPORT_SYMBOL_GPL(stmmac_dvr_remove);



[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