[PATCH 1/1] net: designware: eqos: stop DMA on halt

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

 



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@xxxxxx>
---
 drivers/net/designware_stm32.c    | 2 ++
 drivers/net/designware_tegra186.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/drivers/net/designware_stm32.c b/drivers/net/designware_stm32.c
index 5b087ad5a371..ed54ff2b2615 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 58484d4095dc..618ae113971d 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);
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux