From: Ahmad Fatoum <ahmad@a3f.at>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 1/3] net: designware: eqos: properly stop DMA on halt
Date: Fri, 15 Nov 2019 08:32:37 +0100 [thread overview]
Message-ID: <20191115073239.21013-2-ahmad@a3f.at> (raw)
In-Reply-To: <20191115073239.21013-1-ahmad@a3f.at>
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
Specifying ->halt only means that it's called along with eth_unregister.
If we want to halt the DMA, we will have to call it ourselves in the
remove callback. Do this.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
---
drivers/net/designware_eqos.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/designware_eqos.c b/drivers/net/designware_eqos.c
index a49239e0573e..52a5ec272e7f 100644
--- a/drivers/net/designware_eqos.c
+++ b/drivers/net/designware_eqos.c
@@ -869,6 +869,8 @@ void eqos_remove(struct device_d *dev)
{
struct eqos *eqos = dev->priv;
+ eth_unregister(&eqos->netdev);
+
mdiobus_unregister(&eqos->miibus);
dma_free(phys_to_virt(eqos->rx_descs[0].des0));
--
2.20.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2019-11-15 7:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-11 9:56 [PATCH 0/1] net: designware: eqos: " Ahmad Fatoum
2019-11-11 9:56 ` [PATCH 1/1] " Ahmad Fatoum
2019-11-12 12:00 ` Sascha Hauer
2019-11-15 7:32 ` [PATCH v2 0/3] " Ahmad Fatoum
2019-11-15 7:32 ` Ahmad Fatoum [this message]
2019-11-15 7:32 ` [PATCH 2/3] net: designware: eqos: enable clocks before mdio_register Ahmad Fatoum
2019-11-15 7:32 ` [PATCH 3/3] net: designware: eqos: fix NULL pointer use in dev_printf Ahmad Fatoum
2019-11-15 13:41 ` [PATCH v2 0/3] net: designware: eqos: stop DMA on halt Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191115073239.21013-2-ahmad@a3f.at \
--to=ahmad@a3f.at \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox