ETH: remove release open when resume for amlogic phy. [1/1]
authorqi duan <qi.duan@amlogic.com>
Thu, 22 Aug 2019 09:45:15 +0000 (05:45 -0400)
committerqi duan <qi.duan@amlogic.com>
Wed, 28 Aug 2019 04:32:20 +0000 (00:32 -0400)
PD#SWPL-13132

Problem:
stammac release/open when resume will change the dma addr.
if stmmac_xmit and stmmac_tx_work are running at the same time
it will cause panic

Solution:
remove stmmac_release/open call in stmmac_resume for chip
g12a/g12b/tl1/tm2

Verify:
verify on TL1

Change-Id: I5abf2ccf72c39483bbd1cce7b9e24bf596f30d0f
Signed-off-by: qi duan <qi.duan@amlogic.com>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.h

index a76fbcf..f7e1a9a 100644 (file)
@@ -54,7 +54,9 @@
 #include <linux/reset.h>
 #include <linux/of_mdio.h>
 #include "dwmac1000.h"
-
+#ifdef CONFIG_AMLOGIC_ETH_PRIVE
+#include "stmmac_platform.h"
+#endif
 #ifdef CONFIG_DWMAC_MESON
 #include <phy_debug.h>
 #endif
@@ -3672,8 +3674,10 @@ int stmmac_resume(struct device *dev)
                phy_start(priv->phydev);
 
 #ifdef TX_MONITOR
-       stmmac_release(priv_monitor->dev);
-       stmmac_open(priv_monitor->dev);
+       if (!ee_reset_base) {
+               stmmac_release(priv_monitor->dev);
+               stmmac_open(priv_monitor->dev);
+       }
 #endif
        return 0;
 }
index 5b44e9b..7cd591a 100644 (file)
@@ -35,6 +35,7 @@ int stmmac_pltfr_suspend(struct device *dev);
 int stmmac_pltfr_resume(struct device *dev);
 extern unsigned int external_rx_delay;
 extern unsigned int external_tx_delay;
+extern void __iomem *ee_reset_base;
 #endif
 extern const struct dev_pm_ops stmmac_pltfr_pm_ops;