netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] fec: Workaround for ERR007885 on fec_enet_txq_submit_skb()
@ 2025-04-28 11:10 mattiasbarthel
  2025-04-28 11:24 ` Wei Fang
  2025-04-29 14:58 ` Simon Horman
  0 siblings, 2 replies; 8+ messages in thread
From: mattiasbarthel @ 2025-04-28 11:10 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni, wei.fang, netdev
  Cc: linux-kernel, Mattias Barthel

From: Mattias Barthel <mattias.barthel@atlascopco.com>

Activate workaround also in fec_enet_txq_submit_skb() for when TSO is not enbabled.

Errata: ERR007885
Symptoms: NETDEV WATCHDOG: eth0 (fec): transmit queue 0 timed out

reference commit 37d6017b84f7 ("net: fec: Workaround for imx6sx enet tx hang when enable three queues"),

Signed-off-by: Mattias Barthel <mattias.barthel@atlascopco.com>
---
 drivers/net/ethernet/freescale/fec_main.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index a86cfebedaa8..17e9bddb9ddd 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -714,7 +714,12 @@ static int fec_enet_txq_submit_skb(struct fec_enet_priv_tx_q *txq,
 	txq->bd.cur = bdp;
 
 	/* Trigger transmission start */
-	writel(0, txq->bd.reg_desc_active);
+	if (!(fep->quirks & FEC_QUIRK_ERR007885) ||
+	    !readl(txq->bd.reg_desc_active) ||
+	    !readl(txq->bd.reg_desc_active) ||
+	    !readl(txq->bd.reg_desc_active) ||
+	    !readl(txq->bd.reg_desc_active))
+		writel(0, txq->bd.reg_desc_active);
 
 	return 0;
 }
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* RE: [PATCH net] fec: Workaround for ERR007885 on fec_enet_txq_submit_skb()
  2025-04-28 11:10 [PATCH net] fec: Workaround for ERR007885 on fec_enet_txq_submit_skb() mattiasbarthel
@ 2025-04-28 11:24 ` Wei Fang
  2025-04-28 11:26   ` Wei Fang
  2025-04-29 14:58 ` Simon Horman
  1 sibling, 1 reply; 8+ messages in thread
From: Wei Fang @ 2025-04-28 11:24 UTC (permalink / raw)
  To: mattiasbarthel@gmail.com
  Cc: linux-kernel@vger.kernel.org, Mattias Barthel,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, netdev@vger.kernel.org

> From: Mattias Barthel <mattias.barthel@atlascopco.com>
> 
> Activate workaround also in fec_enet_txq_submit_skb() for when TSO is not
> enbabled.

Each line of the commit message should not exceed 75 characters

> 
> Errata: ERR007885
> Symptoms: NETDEV WATCHDOG: eth0 (fec): transmit queue 0 timed out
> 
> reference commit 37d6017b84f7 ("net: fec: Workaround for imx6sx enet tx hang
> when enable three queues"),
> 

Please add a Fixes tag before Signed-off-by tag, I think the Fixes tag
should be:

Fixes: 53bb20d1faba ("net: fec: add variable reg_desc_active to speed things up ")

> Signed-off-by: Mattias Barthel <mattias.barthel@atlascopco.com>
> ---
>  drivers/net/ethernet/freescale/fec_main.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c
> b/drivers/net/ethernet/freescale/fec_main.c
> index a86cfebedaa8..17e9bddb9ddd 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -714,7 +714,12 @@ static int fec_enet_txq_submit_skb(struct
> fec_enet_priv_tx_q *txq,
>         txq->bd.cur = bdp;
> 
>         /* Trigger transmission start */
> -       writel(0, txq->bd.reg_desc_active);
> +       if (!(fep->quirks & FEC_QUIRK_ERR007885) ||
> +           !readl(txq->bd.reg_desc_active) ||
> +           !readl(txq->bd.reg_desc_active) ||
> +           !readl(txq->bd.reg_desc_active) ||
> +           !readl(txq->bd.reg_desc_active))
> +               writel(0, txq->bd.reg_desc_active);
> 
>         return 0;
>  }
> --
> 2.43.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH net] fec: Workaround for ERR007885 on fec_enet_txq_submit_skb()
  2025-04-28 11:24 ` Wei Fang
@ 2025-04-28 11:26   ` Wei Fang
  0 siblings, 0 replies; 8+ messages in thread
From: Wei Fang @ 2025-04-28 11:26 UTC (permalink / raw)
  To: mattiasbarthel@gmail.com
  Cc: linux-kernel@vger.kernel.org, Mattias Barthel,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, netdev@vger.kernel.org

> > From: Mattias Barthel <mattias.barthel@atlascopco.com>
> >
> > Activate workaround also in fec_enet_txq_submit_skb() for when TSO is
> > not enbabled.
> 
> Each line of the commit message should not exceed 75 characters
> 
> >
> > Errata: ERR007885
> > Symptoms: NETDEV WATCHDOG: eth0 (fec): transmit queue 0 timed out
> >
> > reference commit 37d6017b84f7 ("net: fec: Workaround for imx6sx enet
> > tx hang when enable three queues"),
> >
> 
> Please add a Fixes tag before Signed-off-by tag, I think the Fixes tag should be:
> 
> Fixes: 53bb20d1faba ("net: fec: add variable reg_desc_active to speed things up ")
                                                                  ^
Sorry, please remove this space when copying this line.

> 
> > Signed-off-by: Mattias Barthel <mattias.barthel@atlascopco.com>
> > ---
> >  drivers/net/ethernet/freescale/fec_main.c | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/ethernet/freescale/fec_main.c
> > b/drivers/net/ethernet/freescale/fec_main.c
> > index a86cfebedaa8..17e9bddb9ddd 100644
> > --- a/drivers/net/ethernet/freescale/fec_main.c
> > +++ b/drivers/net/ethernet/freescale/fec_main.c
> > @@ -714,7 +714,12 @@ static int fec_enet_txq_submit_skb(struct
> > fec_enet_priv_tx_q *txq,
> >         txq->bd.cur = bdp;
> >
> >         /* Trigger transmission start */
> > -       writel(0, txq->bd.reg_desc_active);
> > +       if (!(fep->quirks & FEC_QUIRK_ERR007885) ||
> > +           !readl(txq->bd.reg_desc_active) ||
> > +           !readl(txq->bd.reg_desc_active) ||
> > +           !readl(txq->bd.reg_desc_active) ||
> > +           !readl(txq->bd.reg_desc_active))
> > +               writel(0, txq->bd.reg_desc_active);
> >
> >         return 0;
> >  }
> > --
> > 2.43.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH net] fec: Workaround for ERR007885 on fec_enet_txq_submit_skb()
@ 2025-04-28 11:49 mattiasbarthel
  2025-04-28 13:07 ` Andrew Lunn
  0 siblings, 1 reply; 8+ messages in thread
From: mattiasbarthel @ 2025-04-28 11:49 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni, wei.fang, netdev
  Cc: linux-kernel, Mattias Barthel

From: Mattias Barthel <mattias.barthel@atlascopco.com>

Activate workaround also in fec_enet_txq_submit_skb()
when TSO is not enbabled.

Errata: ERR007885
Symptoms: NETDEV WATCHDOG: eth0 (fec): transmit queue 0 timed out

related 37d6017b84f7:
("net: fec: Workaround for imx6sx enet tx hang when enable three queues")

Fixes: 53bb20d1faba ("net: fec: add variable reg_desc_active to speed things up")
Signed-off-by: Mattias Barthel <mattias.barthel@atlascopco.com>
---
 drivers/net/ethernet/freescale/fec_main.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index a86cfebedaa8..17e9bddb9ddd 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -714,7 +714,12 @@ static int fec_enet_txq_submit_skb(struct fec_enet_priv_tx_q *txq,
 	txq->bd.cur = bdp;
 
 	/* Trigger transmission start */
-	writel(0, txq->bd.reg_desc_active);
+	if (!(fep->quirks & FEC_QUIRK_ERR007885) ||
+	    !readl(txq->bd.reg_desc_active) ||
+	    !readl(txq->bd.reg_desc_active) ||
+	    !readl(txq->bd.reg_desc_active) ||
+	    !readl(txq->bd.reg_desc_active))
+		writel(0, txq->bd.reg_desc_active);
 
 	return 0;
 }
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH net] fec: Workaround for ERR007885 on fec_enet_txq_submit_skb()
@ 2025-04-28 12:43 mattiasbarthel
  2025-04-28 13:09 ` Andrew Lunn
  0 siblings, 1 reply; 8+ messages in thread
From: mattiasbarthel @ 2025-04-28 12:43 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni, wei.fang, netdev
  Cc: linux-kernel, Mattias Barthel

From: Mattias Barthel <mattias.barthel@atlascopco.com>

Activate workaround also in fec_enet_txq_submit_skb()
when TSO is not enbabled.

Errata: ERR007885
Symptoms: NETDEV WATCHDOG: eth0 (fec): transmit queue 0 timed out

related 37d6017b84f7:
("net: fec: Workaround for imx6sx enet tx hang when enable three queues")

Fixes: 53bb20d1faba ("net: fec: add variable reg_desc_active to speed things up")
Signed-off-by: Mattias Barthel <mattias.barthel@atlascopco.com>
---
 drivers/net/ethernet/freescale/fec_main.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index a86cfebedaa8..17e9bddb9ddd 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -714,7 +714,12 @@ static int fec_enet_txq_submit_skb(struct fec_enet_priv_tx_q *txq,
 	txq->bd.cur = bdp;
 
 	/* Trigger transmission start */
-	writel(0, txq->bd.reg_desc_active);
+	if (!(fep->quirks & FEC_QUIRK_ERR007885) ||
+	    !readl(txq->bd.reg_desc_active) ||
+	    !readl(txq->bd.reg_desc_active) ||
+	    !readl(txq->bd.reg_desc_active) ||
+	    !readl(txq->bd.reg_desc_active))
+		writel(0, txq->bd.reg_desc_active);
 
 	return 0;
 }
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH net] fec: Workaround for ERR007885 on fec_enet_txq_submit_skb()
  2025-04-28 11:49 mattiasbarthel
@ 2025-04-28 13:07 ` Andrew Lunn
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Lunn @ 2025-04-28 13:07 UTC (permalink / raw)
  To: mattiasbarthel
  Cc: davem, edumazet, kuba, pabeni, wei.fang, netdev, linux-kernel,
	Mattias Barthel

On Mon, Apr 28, 2025 at 01:49:20PM +0200, mattiasbarthel@gmail.com wrote:
> From: Mattias Barthel <mattias.barthel@atlascopco.com>
> 
> Activate workaround also in fec_enet_txq_submit_skb()
> when TSO is not enbabled.
> 
> Errata: ERR007885
> Symptoms: NETDEV WATCHDOG: eth0 (fec): transmit queue 0 timed out

This is rather brief. I had to look at the reference commit to
understand what this patch is doing. Ideally the commit message should
to sufficient on its own. Please consider cut/paste some of the commit
message from 37d6017b84f7/
> 
> Fixes: 53bb20d1faba ("net: fec: add variable reg_desc_active to speed things up")
> Signed-off-by: Mattias Barthel <mattias.barthel@atlascopco.com>

Please wait at least 24 hours between posts.

https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html

    Andrew

---
pw-bot: cr

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH net] fec: Workaround for ERR007885 on fec_enet_txq_submit_skb()
  2025-04-28 12:43 mattiasbarthel
@ 2025-04-28 13:09 ` Andrew Lunn
  0 siblings, 0 replies; 8+ messages in thread
From: Andrew Lunn @ 2025-04-28 13:09 UTC (permalink / raw)
  To: mattiasbarthel
  Cc: davem, edumazet, kuba, pabeni, wei.fang, netdev, linux-kernel,
	Mattias Barthel

On Mon, Apr 28, 2025 at 02:43:25PM +0200, mattiasbarthel@gmail.com wrote:
> From: Mattias Barthel <mattias.barthel@atlascopco.com>

This version 3? I hope you can see why there is the 24 hour rules.

Also, please put the version number in the subject.

https://docs.kernel.org/process/submitting-patches.html

    Andrew

---
pw-bot: cr
	

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH net] fec: Workaround for ERR007885 on fec_enet_txq_submit_skb()
  2025-04-28 11:10 [PATCH net] fec: Workaround for ERR007885 on fec_enet_txq_submit_skb() mattiasbarthel
  2025-04-28 11:24 ` Wei Fang
@ 2025-04-29 14:58 ` Simon Horman
  1 sibling, 0 replies; 8+ messages in thread
From: Simon Horman @ 2025-04-29 14:58 UTC (permalink / raw)
  To: mattiasbarthel
  Cc: davem, edumazet, kuba, pabeni, wei.fang, netdev, linux-kernel,
	Mattias Barthel

On Mon, Apr 28, 2025 at 01:10:18PM +0200, mattiasbarthel@gmail.com wrote:
> From: Mattias Barthel <mattias.barthel@atlascopco.com>
> 
> Activate workaround also in fec_enet_txq_submit_skb() for when TSO is not enbabled.
> 
> Errata: ERR007885
> Symptoms: NETDEV WATCHDOG: eth0 (fec): transmit queue 0 timed out
> 
> reference commit 37d6017b84f7 ("net: fec: Workaround for imx6sx enet tx hang when enable three queues"),

Hi Mattias,

The commit cited above includes an explanation of the problem
and the work around. I think this commit message could
benefit from a similar level of detail.

> 
> Signed-off-by: Mattias Barthel <mattias.barthel@atlascopco.com>

...

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-04-29 14:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-28 11:10 [PATCH net] fec: Workaround for ERR007885 on fec_enet_txq_submit_skb() mattiasbarthel
2025-04-28 11:24 ` Wei Fang
2025-04-28 11:26   ` Wei Fang
2025-04-29 14:58 ` Simon Horman
  -- strict thread matches above, loose matches on Subject: below --
2025-04-28 11:49 mattiasbarthel
2025-04-28 13:07 ` Andrew Lunn
2025-04-28 12:43 mattiasbarthel
2025-04-28 13:09 ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).