summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmad Fatoum <ahmad@a3f.at>2019-11-11 10:56:07 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-11-12 13:00:18 +0100
commit4d824b3235dde8189285f4ec37ffb147a03616c4 (patch)
tree884a0b558a9e435041894d9095ee01c26ce00ab5
parent3b8b70bfd743c303349f67c892631cb04c2b3c68 (diff)
downloadbarebox-4d824b3235dde8189285f4ec37ffb147a03616c4.tar.gz
net: designware: eqos: stop DMA on halt
designware_eqos.c contains an eqos_stop implementation to stop the NIC when halting the interface. Unfortunately it wasn't used leading to memory corruption on boot, possibly due to DMA. Fix this. Signed-off-by: Ahmad Fatoum <ahmad@a3f.at> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/net/designware_stm32.c2
-rw-r--r--drivers/net/designware_tegra186.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/designware_stm32.c b/drivers/net/designware_stm32.c
index 5b087ad..ed54ff2 100644
--- a/drivers/net/designware_stm32.c
+++ b/drivers/net/designware_stm32.c
@@ -199,6 +199,8 @@ static void eqos_stop_stm32(struct eth_device *edev)
{
struct eqos_stm32 *priv = to_stm32(edev->priv);
+ eqos_stop(edev);
+
clk_bulk_disable(priv->num_clks, priv->clks);
}
diff --git a/drivers/net/designware_tegra186.c b/drivers/net/designware_tegra186.c
index 58484d4..618ae11 100644
--- a/drivers/net/designware_tegra186.c
+++ b/drivers/net/designware_tegra186.c
@@ -282,6 +282,8 @@ static void eqos_stop_tegra186(struct eth_device *edev)
{
struct eqos_tegra186 *priv = to_tegra186(edev->priv);
+ eqos_stop(edev);
+
eqos_reset_tegra186(priv, true);
clk_bulk_disable(priv->num_clks, priv->clks);