* [PATCH] net: cpsw: don't reset twice
@ 2019-11-15 16:19 Michael Grzeschik
2019-11-18 8:16 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Michael Grzeschik @ 2019-11-15 16:19 UTC (permalink / raw)
To: barebox
The softreset was already called previously in open and other settings
have been prepared afterwards, so don't reset it a second time.
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
drivers/net/cpsw.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c
index b9a6575009..4eb2205daa 100644
--- a/drivers/net/cpsw.c
+++ b/drivers/net/cpsw.c
@@ -676,8 +676,6 @@ static void cpsw_slave_init(struct cpsw_slave *slave, struct cpsw_priv *priv)
dev_dbg(&slave->dev, "* %s\n", __func__);
- soft_reset(priv, &slave->sliver->soft_reset);
-
/* setup priority mapping */
writel(0x76543210, &slave->sliver->rx_pri_map);
writel(0x33221100, &slave->regs->tx_pri_map);
--
2.24.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] net: cpsw: don't reset twice
2019-11-15 16:19 [PATCH] net: cpsw: don't reset twice Michael Grzeschik
@ 2019-11-18 8:16 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2019-11-18 8:16 UTC (permalink / raw)
To: Michael Grzeschik; +Cc: barebox
On Fri, Nov 15, 2019 at 05:19:28PM +0100, Michael Grzeschik wrote:
> The softreset was already called previously in open and other settings
> have been prepared afterwards, so don't reset it a second time.
>
> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
> ---
> drivers/net/cpsw.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c
> index b9a6575009..4eb2205daa 100644
> --- a/drivers/net/cpsw.c
> +++ b/drivers/net/cpsw.c
> @@ -676,8 +676,6 @@ static void cpsw_slave_init(struct cpsw_slave *slave, struct cpsw_priv *priv)
>
> dev_dbg(&slave->dev, "* %s\n", __func__);
>
> - soft_reset(priv, &slave->sliver->soft_reset);
> -
What you remove here is the only place where soft_reset() is called with
&slave->sliver->soft_reset. If you have to remove that to fix something
then it's not because we reset something twice.
What looks really really fishy in this driver is that cpsw_open() is
called per slave, but nearly all things this function does affect the
whole cpsw and not the slave instance it is called with. This starts
with:
soft_reset(priv, &priv->regs->soft_reset);
It looks like this can't work when multiple slaves are enabled.
Sascha
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-18 8:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-15 16:19 [PATCH] net: cpsw: don't reset twice Michael Grzeschik
2019-11-18 8:16 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox