netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: fec: Refactor MAC reset to function
@ 2025-01-21 10:38 Csókás, Bence
  2025-01-21 14:10 ` Michal Swiatkowski
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: Csókás, Bence @ 2025-01-21 10:38 UTC (permalink / raw)
  To: Jakub Kicinski, Laurent Badel, imx, netdev, linux-kernel
  Cc: Csókás, Bence, Wei Fang, Shenwei Wang, Clark Wang,
	Andrew Lunn, David S. Miller, Eric Dumazet, Paolo Abeni

The core is reset both in `fec_restart()`
(called on link-up) and `fec_stop()`
(going to sleep, driver remove etc.).
These two functions had their separate
implementations, which was at first only
a register write and a `udelay()` (and
the accompanying block comment).
However, since then we got soft-reset
(MAC disable) and Wake-on-LAN support,
which meant that these implementations
diverged, often causing bugs. For instance,
as of now, `fec_stop()` does not check for
`FEC_QUIRK_NO_HARD_RESET`. To eliminate
this bug-source, refactor implementation
to a common function.

Fixes: c730ab423bfa ("net: fec: Fix temporary RMII clock reset on link up")
Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu>
---

Notes:
    Recommended options for this patch:
    `--color-moved --color-moved-ws=allow-indentation-change`

 drivers/net/ethernet/freescale/fec_main.c | 50 +++++++++++------------
 1 file changed, 23 insertions(+), 27 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 68725506a095..850ef3de74ec 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1064,6 +1064,27 @@ static void fec_enet_enable_ring(struct net_device *ndev)
 	}
 }
 
+/* Whack a reset.  We should wait for this.
+ * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
+ * instead of reset MAC itself.
+ */
+static void fec_ctrl_reset(struct fec_enet_private *fep, bool wol)
+{
+	if (!wol || !(fep->wol_flag & FEC_WOL_FLAG_SLEEP_ON)) {
+		if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES ||
+		    ((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) {
+			writel(0, fep->hwp + FEC_ECNTRL);
+		} else {
+			writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL);
+			udelay(10);
+		}
+	} else {
+		val = readl(fep->hwp + FEC_ECNTRL);
+		val |= (FEC_ECR_MAGICEN | FEC_ECR_SLEEP);
+		writel(val, fep->hwp + FEC_ECNTRL);
+	}
+}
+
 /*
  * This function is called to start or restart the FEC during a link
  * change, transmit timeout, or to reconfigure the FEC.  The network
@@ -1080,17 +1101,7 @@ fec_restart(struct net_device *ndev)
 	if (fep->bufdesc_ex)
 		fec_ptp_save_state(fep);
 
-	/* Whack a reset.  We should wait for this.
-	 * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
-	 * instead of reset MAC itself.
-	 */
-	if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES ||
-	    ((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) {
-		writel(0, fep->hwp + FEC_ECNTRL);
-	} else {
-		writel(1, fep->hwp + FEC_ECNTRL);
-		udelay(10);
-	}
+	fec_ctrl_reset(fep, false);
 
 	/*
 	 * enet-mac reset will reset mac address registers too,
@@ -1344,22 +1355,7 @@ fec_stop(struct net_device *ndev)
 	if (fep->bufdesc_ex)
 		fec_ptp_save_state(fep);
 
-	/* Whack a reset.  We should wait for this.
-	 * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
-	 * instead of reset MAC itself.
-	 */
-	if (!(fep->wol_flag & FEC_WOL_FLAG_SLEEP_ON)) {
-		if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES) {
-			writel(0, fep->hwp + FEC_ECNTRL);
-		} else {
-			writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL);
-			udelay(10);
-		}
-	} else {
-		val = readl(fep->hwp + FEC_ECNTRL);
-		val |= (FEC_ECR_MAGICEN | FEC_ECR_SLEEP);
-		writel(val, fep->hwp + FEC_ECNTRL);
-	}
+	fec_ctrl_reset(fep, true);
 	writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED);
 	writel(FEC_DEFAULT_IMASK, fep->hwp + FEC_IMASK);
 
-- 
2.48.1



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

* Re: [PATCH] net: fec: Refactor MAC reset to function
  2025-01-21 10:38 [PATCH] net: fec: Refactor MAC reset to function Csókás, Bence
@ 2025-01-21 14:10 ` Michal Swiatkowski
  2025-01-21 14:36 ` Ahmad Fatoum
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 19+ messages in thread
From: Michal Swiatkowski @ 2025-01-21 14:10 UTC (permalink / raw)
  To: Csókás, Bence
  Cc: Jakub Kicinski, Laurent Badel, imx, netdev, linux-kernel,
	Wei Fang, Shenwei Wang, Clark Wang, Andrew Lunn, David S. Miller,
	Eric Dumazet, Paolo Abeni

On Tue, Jan 21, 2025 at 11:38:58AM +0100, Csókás, Bence wrote:
> The core is reset both in `fec_restart()`
> (called on link-up) and `fec_stop()`
> (going to sleep, driver remove etc.).
> These two functions had their separate
> implementations, which was at first only
> a register write and a `udelay()` (and
> the accompanying block comment).
> However, since then we got soft-reset
> (MAC disable) and Wake-on-LAN support,
> which meant that these implementations
> diverged, often causing bugs. For instance,
> as of now, `fec_stop()` does not check for
> `FEC_QUIRK_NO_HARD_RESET`. To eliminate
> this bug-source, refactor implementation
> to a common function.
> 
> Fixes: c730ab423bfa ("net: fec: Fix temporary RMII clock reset on link up")
> Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu>
> ---
> 
> Notes:
>     Recommended options for this patch:
>     `--color-moved --color-moved-ws=allow-indentation-change`
> 
>  drivers/net/ethernet/freescale/fec_main.c | 50 +++++++++++------------
>  1 file changed, 23 insertions(+), 27 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
> index 68725506a095..850ef3de74ec 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -1064,6 +1064,27 @@ static void fec_enet_enable_ring(struct net_device *ndev)
>  	}
>  }
>  
> +/* Whack a reset.  We should wait for this.
> + * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
> + * instead of reset MAC itself.
> + */
> +static void fec_ctrl_reset(struct fec_enet_private *fep, bool wol)
> +{
> +	if (!wol || !(fep->wol_flag & FEC_WOL_FLAG_SLEEP_ON)) {
> +		if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES ||
> +		    ((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) {
> +			writel(0, fep->hwp + FEC_ECNTRL);
> +		} else {
> +			writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL);
> +			udelay(10);
> +		}
> +	} else {
> +		val = readl(fep->hwp + FEC_ECNTRL);
> +		val |= (FEC_ECR_MAGICEN | FEC_ECR_SLEEP);
> +		writel(val, fep->hwp + FEC_ECNTRL);
> +	}
> +}
> +
>  /*
>   * This function is called to start or restart the FEC during a link
>   * change, transmit timeout, or to reconfigure the FEC.  The network
> @@ -1080,17 +1101,7 @@ fec_restart(struct net_device *ndev)
>  	if (fep->bufdesc_ex)
>  		fec_ptp_save_state(fep);
>  
> -	/* Whack a reset.  We should wait for this.
> -	 * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
> -	 * instead of reset MAC itself.
> -	 */
> -	if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES ||
> -	    ((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) {
> -		writel(0, fep->hwp + FEC_ECNTRL);
> -	} else {
> -		writel(1, fep->hwp + FEC_ECNTRL);
Nit, in case of a need for v2 you can mark in commit message that
FEC_ECR_RESET == 1, so define can be use instead of 1.

> -		udelay(10);
> -	}
> +	fec_ctrl_reset(fep, false);
>  
>  	/*
>  	 * enet-mac reset will reset mac address registers too,
> @@ -1344,22 +1355,7 @@ fec_stop(struct net_device *ndev)
>  	if (fep->bufdesc_ex)
>  		fec_ptp_save_state(fep);
>  
> -	/* Whack a reset.  We should wait for this.
> -	 * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
> -	 * instead of reset MAC itself.
> -	 */
> -	if (!(fep->wol_flag & FEC_WOL_FLAG_SLEEP_ON)) {
> -		if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES) {
> -			writel(0, fep->hwp + FEC_ECNTRL);
> -		} else {
> -			writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL);
> -			udelay(10);
> -		}
> -	} else {
> -		val = readl(fep->hwp + FEC_ECNTRL);
> -		val |= (FEC_ECR_MAGICEN | FEC_ECR_SLEEP);
> -		writel(val, fep->hwp + FEC_ECNTRL);
> -	}
> +	fec_ctrl_reset(fep, true);
>  	writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED);
>  	writel(FEC_DEFAULT_IMASK, fep->hwp + FEC_IMASK);
>  

Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>

> -- 
> 2.48.1

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

* Re: [PATCH] net: fec: Refactor MAC reset to function
  2025-01-21 10:38 [PATCH] net: fec: Refactor MAC reset to function Csókás, Bence
  2025-01-21 14:10 ` Michal Swiatkowski
@ 2025-01-21 14:36 ` Ahmad Fatoum
  2025-01-21 15:19 ` Simon Horman
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 19+ messages in thread
From: Ahmad Fatoum @ 2025-01-21 14:36 UTC (permalink / raw)
  To: Csókás, Bence, Jakub Kicinski, Laurent Badel, imx,
	netdev, linux-kernel
  Cc: Wei Fang, Shenwei Wang, Clark Wang, Andrew Lunn, David S. Miller,
	Eric Dumazet, Paolo Abeni

Hi,

On 21.01.25 11:38, Csókás, Bence wrote:
> The core is reset both in `fec_restart()`
> (called on link-up) and `fec_stop()`
> (going to sleep, driver remove etc.).
> These two functions had their separate
> implementations, which was at first only
> a register write and a `udelay()` (and
> the accompanying block comment).
> However, since then we got soft-reset
> (MAC disable) and Wake-on-LAN support,
> which meant that these implementations
> diverged, often causing bugs. For instance,
> as of now, `fec_stop()` does not check for
> `FEC_QUIRK_NO_HARD_RESET`. To eliminate
> this bug-source, refactor implementation
> to a common function.

please make the lines a bit longer for v2. 43 characters is much too limited.

Thanks,
Ahmad

> 
> Fixes: c730ab423bfa ("net: fec: Fix temporary RMII clock reset on link up")
> Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu>
> ---
> 
> Notes:
>     Recommended options for this patch:
>     `--color-moved --color-moved-ws=allow-indentation-change`
> 
>  drivers/net/ethernet/freescale/fec_main.c | 50 +++++++++++------------
>  1 file changed, 23 insertions(+), 27 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
> index 68725506a095..850ef3de74ec 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -1064,6 +1064,27 @@ static void fec_enet_enable_ring(struct net_device *ndev)
>  	}
>  }
>  
> +/* Whack a reset.  We should wait for this.
> + * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
> + * instead of reset MAC itself.
> + */
> +static void fec_ctrl_reset(struct fec_enet_private *fep, bool wol)
> +{
> +	if (!wol || !(fep->wol_flag & FEC_WOL_FLAG_SLEEP_ON)) {
> +		if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES ||
> +		    ((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) {
> +			writel(0, fep->hwp + FEC_ECNTRL);
> +		} else {
> +			writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL);
> +			udelay(10);
> +		}
> +	} else {
> +		val = readl(fep->hwp + FEC_ECNTRL);
> +		val |= (FEC_ECR_MAGICEN | FEC_ECR_SLEEP);
> +		writel(val, fep->hwp + FEC_ECNTRL);
> +	}
> +}
> +
>  /*
>   * This function is called to start or restart the FEC during a link
>   * change, transmit timeout, or to reconfigure the FEC.  The network
> @@ -1080,17 +1101,7 @@ fec_restart(struct net_device *ndev)
>  	if (fep->bufdesc_ex)
>  		fec_ptp_save_state(fep);
>  
> -	/* Whack a reset.  We should wait for this.
> -	 * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
> -	 * instead of reset MAC itself.
> -	 */
> -	if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES ||
> -	    ((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) {
> -		writel(0, fep->hwp + FEC_ECNTRL);
> -	} else {
> -		writel(1, fep->hwp + FEC_ECNTRL);
> -		udelay(10);
> -	}
> +	fec_ctrl_reset(fep, false);
>  
>  	/*
>  	 * enet-mac reset will reset mac address registers too,
> @@ -1344,22 +1355,7 @@ fec_stop(struct net_device *ndev)
>  	if (fep->bufdesc_ex)
>  		fec_ptp_save_state(fep);
>  
> -	/* Whack a reset.  We should wait for this.
> -	 * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
> -	 * instead of reset MAC itself.
> -	 */
> -	if (!(fep->wol_flag & FEC_WOL_FLAG_SLEEP_ON)) {
> -		if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES) {
> -			writel(0, fep->hwp + FEC_ECNTRL);
> -		} else {
> -			writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL);
> -			udelay(10);
> -		}
> -	} else {
> -		val = readl(fep->hwp + FEC_ECNTRL);
> -		val |= (FEC_ECR_MAGICEN | FEC_ECR_SLEEP);
> -		writel(val, fep->hwp + FEC_ECNTRL);
> -	}
> +	fec_ctrl_reset(fep, true);
>  	writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED);
>  	writel(FEC_DEFAULT_IMASK, fep->hwp + FEC_IMASK);
>  


-- 
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 |

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

* Re: [PATCH] net: fec: Refactor MAC reset to function
  2025-01-21 10:38 [PATCH] net: fec: Refactor MAC reset to function Csókás, Bence
  2025-01-21 14:10 ` Michal Swiatkowski
  2025-01-21 14:36 ` Ahmad Fatoum
@ 2025-01-21 15:19 ` Simon Horman
  2025-01-21 15:51   ` Csókás Bence
  2025-01-21 16:09 ` [EXTERNAL] " Badel, Laurent
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 19+ messages in thread
From: Simon Horman @ 2025-01-21 15:19 UTC (permalink / raw)
  To: Csókás, Bence
  Cc: Jakub Kicinski, Laurent Badel, imx, netdev, linux-kernel,
	Wei Fang, Shenwei Wang, Clark Wang, Andrew Lunn, David S. Miller,
	Eric Dumazet, Paolo Abeni

On Tue, Jan 21, 2025 at 11:38:58AM +0100, Csókás, Bence wrote:
> The core is reset both in `fec_restart()`
> (called on link-up) and `fec_stop()`
> (going to sleep, driver remove etc.).
> These two functions had their separate
> implementations, which was at first only
> a register write and a `udelay()` (and
> the accompanying block comment).
> However, since then we got soft-reset
> (MAC disable) and Wake-on-LAN support,
> which meant that these implementations
> diverged, often causing bugs. For instance,
> as of now, `fec_stop()` does not check for
> `FEC_QUIRK_NO_HARD_RESET`. To eliminate
> this bug-source, refactor implementation
> to a common function.
> 
> Fixes: c730ab423bfa ("net: fec: Fix temporary RMII clock reset on link up")
> Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu>
> ---
> 
> Notes:
>     Recommended options for this patch:
>     `--color-moved --color-moved-ws=allow-indentation-change`
> 
>  drivers/net/ethernet/freescale/fec_main.c | 50 +++++++++++------------
>  1 file changed, 23 insertions(+), 27 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
> index 68725506a095..850ef3de74ec 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -1064,6 +1064,27 @@ static void fec_enet_enable_ring(struct net_device *ndev)
>  	}
>  }
>  
> +/* Whack a reset.  We should wait for this.
> + * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
> + * instead of reset MAC itself.
> + */
> +static void fec_ctrl_reset(struct fec_enet_private *fep, bool wol)
> +{
> +	if (!wol || !(fep->wol_flag & FEC_WOL_FLAG_SLEEP_ON)) {
> +		if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES ||
> +		    ((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) {
> +			writel(0, fep->hwp + FEC_ECNTRL);
> +		} else {
> +			writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL);
> +			udelay(10);
> +		}
> +	} else {
> +		val = readl(fep->hwp + FEC_ECNTRL);
> +		val |= (FEC_ECR_MAGICEN | FEC_ECR_SLEEP);
> +		writel(val, fep->hwp + FEC_ECNTRL);

Hi Bence,

It seems that this does not compile because val is not declared in this scope.

> +	}
> +}
> +
>  /*
>   * This function is called to start or restart the FEC during a link
>   * change, transmit timeout, or to reconfigure the FEC.  The network

Please observe the rule regarding not posting updated patches within 24h
when preparing v2.

-- 
pw-bot: changes-requested

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

* Re: [PATCH] net: fec: Refactor MAC reset to function
  2025-01-21 15:19 ` Simon Horman
@ 2025-01-21 15:51   ` Csókás Bence
  2025-01-21 18:07     ` Jakub Kicinski
  0 siblings, 1 reply; 19+ messages in thread
From: Csókás Bence @ 2025-01-21 15:51 UTC (permalink / raw)
  To: Simon Horman
  Cc: Jakub Kicinski, Laurent Badel, imx, netdev, linux-kernel,
	Wei Fang, Shenwei Wang, Clark Wang, Andrew Lunn, David S. Miller,
	Eric Dumazet, Paolo Abeni

Hi all,

On 2025. 01. 21. 16:19, Simon Horman wrote:
> It seems that this does not compile because val is not declared in this scope.

Ohh, shoot, I forgot a `-a` in `git commit --amend`... Rookie mistake; 
will be fixed.

> Please observe the rule regarding not posting updated patches within 24h
> when preparing v2.

Of course.

On 2025. 01. 21. 15:36, Ahmad Fatoum wrote:
 > please make the lines a bit longer for v2. 43 characters is much too 
limited.

Reformatted to 80 cols.

On 2025. 01. 21. 15:10, Michal Swiatkowski wrote:
 >> -	} else {
 >> -		writel(1, fep->hwp + FEC_ECNTRL);
 > Nit, in case of a need for v2 you can mark in commit message that
 > FEC_ECR_RESET == 1, so define can be use instead of 1.

This was somehow missed from my earlier refactor in commit ff049886671c 
("net: fec: Refactor: #define magic constants"). Adding this to the msg.

Bence


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

* RE: [EXTERNAL] [PATCH] net: fec: Refactor MAC reset to function
  2025-01-21 10:38 [PATCH] net: fec: Refactor MAC reset to function Csókás, Bence
                   ` (2 preceding siblings ...)
  2025-01-21 15:19 ` Simon Horman
@ 2025-01-21 16:09 ` Badel, Laurent
  2025-01-21 20:41   ` Csókás Bence
  2025-01-21 17:28 ` Andrew Lunn
  2025-01-22  2:50 ` Wei Fang
  5 siblings, 1 reply; 19+ messages in thread
From: Badel, Laurent @ 2025-01-21 16:09 UTC (permalink / raw)
  To: Csókás, Bence, Jakub Kicinski, imx@lists.linux.dev,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
  Cc: Wei Fang, Shenwei Wang, Clark Wang, Andrew Lunn, David S. Miller,
	Eric Dumazet, Paolo Abeni

Hi Bence and thanks for the patch.

Leaving out the check for FEC_QUIRK_NO_HARD_RESET in fec_stop() was, in fact,
not unintentional. Although a hard reset in fec_restart() caused link issues
with the iMX28, I had no particular reason to believe that it would also cause
issues in fec_stop(), since at this point you're turning off the interface, and
I did not observe any particular problems either, so I did not think the same
modification was warranted there.

If you have reason to believe that this is a bug, then it should be fixed, but
currently I don't see why this is the case here. I think a refactoring 
duplicated code is a good idea, but since it also includes a modification of 
the behavior (specifically, there is a possible path where 
FEC_QUIRK_NO_HARD_RESET is set and the link is up, where fec_stop() will issue
a soft reset instead of a hard reset), I would prefer to know that this change
is indeed necessary. 

If others disagree and there's a consensus that this change is ok, I'm happy 
for the patch to get through, but I tend to err on the side of caution in such
cases.

An additional comment - this is just my personal opinion - but in
fec_ctrl_reset(), it seems to me that the function of the wol argument really
is to distinguish if we're using the fec_restart() or the fec_stop()
implementation, so I think the naming may be a bit misleading in this case.

Best regards,

Laurent

On Tue, Jan 21, 2025 at 11:38:58AM +0100, Csókás, Bence wrote:
> The core is reset both in `fec_restart()` (called on link-up) and 
> `fec_stop()` (going to sleep, driver remove etc.).
> These two functions had their separate implementations, which was at 
> first only a register write and a `udelay()` (and the accompanying 
> block comment).
> However, since then we got soft-reset
> (MAC disable) and Wake-on-LAN support, which meant that these 
> implementations diverged, often causing bugs. For instance, as of now, 
> `fec_stop()` does not check for `FEC_QUIRK_NO_HARD_RESET`. To 
> eliminate this bug-source, refactor implementation to a common 
> function.
>
> Fixes: c730ab423bfa ("net: fec: Fix temporary RMII clock reset on link 
> up")
> Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu>
> ---
>
> Notes:
>     Recommended options for this patch:
>     `--color-moved --color-moved-ws=allow-indentation-change`
>
>  drivers/net/ethernet/freescale/fec_main.c | 50 
> +++++++++++------------
>  1 file changed, 23 insertions(+), 27 deletions(-)
>
> diff --git a/drivers/net/ethernet/freescale/fec_main.c 
> b/drivers/net/ethernet/freescale/fec_main.c
> index 68725506a095..850ef3de74ec 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -1064,6 +1064,27 @@ static void fec_enet_enable_ring(struct net_device *ndev)
>       }
>  }
>
> +/* Whack a reset.  We should wait for this.
> + * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
> + * instead of reset MAC itself.
> + */
> +static void fec_ctrl_reset(struct fec_enet_private *fep, bool wol) {
> +     if (!wol || !(fep->wol_flag & FEC_WOL_FLAG_SLEEP_ON)) {
> +             if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES ||
> +                 ((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) {
> +                     writel(0, fep->hwp + FEC_ECNTRL);
> +             } else {
> +                     writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL);
> +                     udelay(10);
> +             }
> +     } else {
> +             val = readl(fep->hwp + FEC_ECNTRL);
> +             val |= (FEC_ECR_MAGICEN | FEC_ECR_SLEEP);
> +             writel(val, fep->hwp + FEC_ECNTRL);
> +     }
> +}
> +
>  /*
>   * This function is called to start or restart the FEC during a link
>   * change, transmit timeout, or to reconfigure the FEC.  The network 
> @@ -1080,17 +1101,7 @@ fec_restart(struct net_device *ndev)
>       if (fep->bufdesc_ex)
>               fec_ptp_save_state(fep);
>
> -     /* Whack a reset.  We should wait for this.
> -      * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
> -      * instead of reset MAC itself.
> -      */
> -     if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES ||
> -         ((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) {
> -             writel(0, fep->hwp + FEC_ECNTRL);
> -     } else {
> -             writel(1, fep->hwp + FEC_ECNTRL);
Nit, in case of a need for v2 you can mark in commit message that FEC_ECR_RESET == 1, so define can be use instead of 1.

> -             udelay(10);
> -     }
> +     fec_ctrl_reset(fep, false);
>
>       /*
>        * enet-mac reset will reset mac address registers too, @@ 
> -1344,22 +1355,7 @@ fec_stop(struct net_device *ndev)
>       if (fep->bufdesc_ex)
>               fec_ptp_save_state(fep);
>
> -     /* Whack a reset.  We should wait for this.
> -      * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
> -      * instead of reset MAC itself.
> -      */
> -     if (!(fep->wol_flag & FEC_WOL_FLAG_SLEEP_ON)) {
> -             if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES) {
> -                     writel(0, fep->hwp + FEC_ECNTRL);
> -             } else {
> -                     writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL);
> -                     udelay(10);
> -             }
> -     } else {
> -             val = readl(fep->hwp + FEC_ECNTRL);
> -             val |= (FEC_ECR_MAGICEN | FEC_ECR_SLEEP);
> -             writel(val, fep->hwp + FEC_ECNTRL);
> -     }
> +     fec_ctrl_reset(fep, true);
>       writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED);
>       writel(FEC_DEFAULT_IMASK, fep->hwp + FEC_IMASK);
>
> --
> 2.48.1



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

* Re: [PATCH] net: fec: Refactor MAC reset to function
  2025-01-21 10:38 [PATCH] net: fec: Refactor MAC reset to function Csókás, Bence
                   ` (3 preceding siblings ...)
  2025-01-21 16:09 ` [EXTERNAL] " Badel, Laurent
@ 2025-01-21 17:28 ` Andrew Lunn
  2025-01-22  2:50 ` Wei Fang
  5 siblings, 0 replies; 19+ messages in thread
From: Andrew Lunn @ 2025-01-21 17:28 UTC (permalink / raw)
  To: Csókás, Bence
  Cc: Jakub Kicinski, Laurent Badel, imx, netdev, linux-kernel,
	Wei Fang, Shenwei Wang, Clark Wang, Andrew Lunn, David S. Miller,
	Eric Dumazet, Paolo Abeni

On Tue, Jan 21, 2025 at 11:38:58AM +0100, Csókás, Bence wrote:
> The core is reset both in `fec_restart()`
> (called on link-up) and `fec_stop()`
> (going to sleep, driver remove etc.).
> These two functions had their separate
> implementations, which was at first only
> a register write and a `udelay()` (and
> the accompanying block comment).
> However, since then we got soft-reset
> (MAC disable) and Wake-on-LAN support,
> which meant that these implementations
> diverged, often causing bugs. For instance,
> as of now, `fec_stop()` does not check for
> `FEC_QUIRK_NO_HARD_RESET`. To eliminate
> this bug-source, refactor implementation
> to a common function.
> 
> Fixes: c730ab423bfa ("net: fec: Fix temporary RMII clock reset on link up")
> Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu>

The subject say "Refactor...." A refactor generally does not need a
Fixes: tag. Maybe make the subject reflect the bug you are fixing, and
reword the commit message to focus on the bug being fixed, not the
refactor.

	Andrew

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

* Re: [PATCH] net: fec: Refactor MAC reset to function
  2025-01-21 15:51   ` Csókás Bence
@ 2025-01-21 18:07     ` Jakub Kicinski
  0 siblings, 0 replies; 19+ messages in thread
From: Jakub Kicinski @ 2025-01-21 18:07 UTC (permalink / raw)
  To: Csókás Bence
  Cc: Simon Horman, Laurent Badel, imx, netdev, linux-kernel, Wei Fang,
	Shenwei Wang, Clark Wang, Andrew Lunn, David S. Miller,
	Eric Dumazet, Paolo Abeni

On Tue, 21 Jan 2025 16:51:51 +0100 Csókás Bence wrote:
> On 2025. 01. 21. 15:36, Ahmad Fatoum wrote:
>  > please make the lines a bit longer for v2. 43 characters is much too   
> limited.
> 
> Reformatted to 80 cols.

Quoting "Submitting patches":

  The body of the explanation, line wrapped at 75 columns, which will be
  copied to the permanent changelog to describe this patch.

https://docs.kernel.org/process/submitting-patches.html#the-canonical-patch-format

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

* Re: [EXTERNAL] [PATCH] net: fec: Refactor MAC reset to function
  2025-01-21 16:09 ` [EXTERNAL] " Badel, Laurent
@ 2025-01-21 20:41   ` Csókás Bence
  2025-01-22 15:22     ` Badel, Laurent
  0 siblings, 1 reply; 19+ messages in thread
From: Csókás Bence @ 2025-01-21 20:41 UTC (permalink / raw)
  To: Badel, Laurent, Jakub Kicinski, imx@lists.linux.dev,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
  Cc: Wei Fang, Shenwei Wang, Clark Wang, Andrew Lunn, David S. Miller,
	Eric Dumazet, Paolo Abeni

Hi Laurent,

On 2025. 01. 21. 17:09, Badel, Laurent wrote:
> Hi Bence and thanks for the patch.

thanks for your input.

> Leaving out the check for FEC_QUIRK_NO_HARD_RESET in fec_stop() was, in fact,
> not unintentional. Although a hard reset in fec_restart() caused link issues
> with the iMX28, I had no particular reason to believe that it would also cause
> issues in fec_stop(), since at this point you're turning off the interface, and
> I did not observe any particular problems either, so I did not think the same
> modification was warranted there.

I had a feeling it was intentional, however, `fec_stop()` is called all 
over the place - not just when removing the interface (e.g. unloading 
the driver), but also by the PM subsystem for entering suspend, 
restarting auto-negotiation, for handling Pause frames and changing 
HW-accelerated RX checksum checking...

> If you have reason to believe that this is a bug, then it should be fixed, but
> currently I don't see why this is the case here. I think a refactoring
> duplicated code is a good idea, but since it also includes a modification of
> the behavior (specifically, there is a possible path where
> FEC_QUIRK_NO_HARD_RESET is set and the link is up, where fec_stop() will issue
> a soft reset instead of a hard reset), I would prefer to know that this change
> is indeed necessary.
> 
> If others disagree and there's a consensus that this change is ok, I'm happy
> for the patch to get through, but I tend to err on the side of caution in such
> cases.

To me, the name `FEC_QUIRK_NO_HARD_RESET`, and its doc-comment seems to 
suggest that we do *not* want to hard-reset this MAC *ever*; not in the 
codepath of `fec_restart()` and not in `fec_stop()`. Did you observe 
problems on i.MX28 if you soft-reset it in stop()? I _might_ be able to 
get my hands on an i.MX287 and test, but I have no idea if it is 
working; I took it out from the junk bin.

Right now, we're chasing a different bug on the i.MX6, and this was just 
meant to reduce the amount of clutter we have to cut through.

> An additional comment - this is just my personal opinion - but in
> fec_ctrl_reset(), it seems to me that the function of the wol argument really
> is to distinguish if we're using the fec_restart() or the fec_stop()
> implementation, so I think the naming may be a bit misleading in this case.

True, but I would prefer to keep it separate, i.e. the `wol` parameter 
should really only control whether we want to enable WoL. If we decide 
to keep the old behavior of not honoring FEC_QUIRK_NO_HARD_RESET in 
stop(), I'd rather add a new parameter `allow_soft_reset`. That way, if 
ever someone needs to call `fec_ctrl_reset()`, they will be able to give 
it values they make sense at that point-of-call, instead of having to 
"fake" either restart() or stop().

Bence


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

* RE: [PATCH] net: fec: Refactor MAC reset to function
  2025-01-21 10:38 [PATCH] net: fec: Refactor MAC reset to function Csókás, Bence
                   ` (4 preceding siblings ...)
  2025-01-21 17:28 ` Andrew Lunn
@ 2025-01-22  2:50 ` Wei Fang
  5 siblings, 0 replies; 19+ messages in thread
From: Wei Fang @ 2025-01-22  2:50 UTC (permalink / raw)
  To: Csókás, Bence, Jakub Kicinski, Laurent Badel,
	imx@lists.linux.dev, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
  Cc: Shenwei Wang, Clark Wang, Andrew Lunn, David S. Miller,
	Eric Dumazet, Paolo Abeni

> The core is reset both in `fec_restart()`
> (called on link-up) and `fec_stop()`
> (going to sleep, driver remove etc.).
> These two functions had their separate
> implementations, which was at first only
> a register write and a `udelay()` (and
> the accompanying block comment).
> However, since then we got soft-reset
> (MAC disable) and Wake-on-LAN support,
> which meant that these implementations
> diverged, often causing bugs. For instance,
> as of now, `fec_stop()` does not check for
> `FEC_QUIRK_NO_HARD_RESET`. To eliminate
> this bug-source, refactor implementation
> to a common function.
> 
> Fixes: c730ab423bfa ("net: fec: Fix temporary RMII clock reset on link up")
> Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu>
> ---
> 
> Notes:
>     Recommended options for this patch:
>     `--color-moved --color-moved-ws=allow-indentation-change`
> 
>  drivers/net/ethernet/freescale/fec_main.c | 50 +++++++++++------------
>  1 file changed, 23 insertions(+), 27 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c
> b/drivers/net/ethernet/freescale/fec_main.c
> index 68725506a095..850ef3de74ec 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -1064,6 +1064,27 @@ static void fec_enet_enable_ring(struct net_device
> *ndev)
>  	}
>  }
> 
> +/* Whack a reset.  We should wait for this.
> + * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
> + * instead of reset MAC itself.
> + */
> +static void fec_ctrl_reset(struct fec_enet_private *fep, bool wol)

'wol' gives me the feeling that it indicates whether the WOL function
is enabled. And the else branch will be taken if 'wol' is true. But in fact,
even if 'wol' is true, it may go to the reset branch. This is a bit confusing.

How about the following changes?

static void fec_ctrl_reset(struct fec_enet_private *fep, bool wol)
{
	if (wol) {
		u32 val;

		val = readl(fep->hwp + FEC_ECNTRL);
		val |= (FEC_ECR_MAGICEN | FEC_ECR_SLEEP);
		writel(val, fep->hwp + FEC_ECNTRL);
	} else if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES ||
		((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) {
		writel(0, fep->hwp + FEC_ECNTRL);
	} else {
		writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL);
		udelay(10);
	}
}

> +{
> +	if (!wol || !(fep->wol_flag & FEC_WOL_FLAG_SLEEP_ON)) {
> +		if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES ||
> +		    ((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) {
> +			writel(0, fep->hwp + FEC_ECNTRL);
> +		} else {
> +			writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL);
> +			udelay(10);
> +		}
> +	} else {
> +		val = readl(fep->hwp + FEC_ECNTRL);
> +		val |= (FEC_ECR_MAGICEN | FEC_ECR_SLEEP);
> +		writel(val, fep->hwp + FEC_ECNTRL);
> +	}
> +}
> +
>  /*
>   * This function is called to start or restart the FEC during a link
>   * change, transmit timeout, or to reconfigure the FEC.  The network
> @@ -1080,17 +1101,7 @@ fec_restart(struct net_device *ndev)
>  	if (fep->bufdesc_ex)
>  		fec_ptp_save_state(fep);
> 
> -	/* Whack a reset.  We should wait for this.
> -	 * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
> -	 * instead of reset MAC itself.
> -	 */
> -	if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES ||
> -	    ((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) {
> -		writel(0, fep->hwp + FEC_ECNTRL);
> -	} else {
> -		writel(1, fep->hwp + FEC_ECNTRL);
> -		udelay(10);
> -	}
> +	fec_ctrl_reset(fep, false);
> 
>  	/*
>  	 * enet-mac reset will reset mac address registers too,
> @@ -1344,22 +1355,7 @@ fec_stop(struct net_device *ndev)
>  	if (fep->bufdesc_ex)
>  		fec_ptp_save_state(fep);
> 
> -	/* Whack a reset.  We should wait for this.
> -	 * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
> -	 * instead of reset MAC itself.
> -	 */
> -	if (!(fep->wol_flag & FEC_WOL_FLAG_SLEEP_ON)) {
> -		if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES) {
> -			writel(0, fep->hwp + FEC_ECNTRL);
> -		} else {
> -			writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL);
> -			udelay(10);
> -		}
> -	} else {
> -		val = readl(fep->hwp + FEC_ECNTRL);
> -		val |= (FEC_ECR_MAGICEN | FEC_ECR_SLEEP);
> -		writel(val, fep->hwp + FEC_ECNTRL);
> -	}
> +	fec_ctrl_reset(fep, true);
>  	writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED);
>  	writel(FEC_DEFAULT_IMASK, fep->hwp + FEC_IMASK);
> 
> --
> 2.48.1
> 


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

* RE: [EXTERNAL] [PATCH] net: fec: Refactor MAC reset to function
  2025-01-21 20:41   ` Csókás Bence
@ 2025-01-22 15:22     ` Badel, Laurent
  0 siblings, 0 replies; 19+ messages in thread
From: Badel, Laurent @ 2025-01-22 15:22 UTC (permalink / raw)
  To: Csókás Bence, Jakub Kicinski, imx@lists.linux.dev,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
  Cc: Wei Fang, Shenwei Wang, Clark Wang, Andrew Lunn, David S. Miller,
	Eric Dumazet, Paolo Abeni

Hi Bence, thank you for your explanations. It's clearer to me now what you
aim to achieve here. 

> To me, the name `FEC_QUIRK_NO_HARD_RESET`, and its doc-comment seems to
> suggest that we do *not* want to hard-reset this MAC *ever*; not in the
> codepath of `fec_restart()` and not in `fec_stop()`. 

Perhaps a bit misleading I have to agree. It's really only meant to avoid 
the link being dropped due to the hard reset, which I don't think is a 
concern in fec_stop().

> Did you observe
> problems on i.MX28 if you soft-reset it in stop()? I _might_ be able to
> get my hands on an i.MX287 and test, but I have no idea if it is
> working; I took it out from the junk bin.

I did not observe any problems. I just tested it today on iMX28 (which is 
the only SoC currently bearing the FEC_QUIRK_NO_HARD_RESET flag - iMX27 is 
a different family so I'm not sure if it is needed in that case) and it 
works fine, I can bring the interface down and back up, pull the cord, 
change the pause settings, all without any apparent change in behavior. 

I tested on the 5.10.233 tag which is the branch I am using. For 
completeness I am currently trying to test it on 6.13 but it will take some
time for the build to complete so I will report later in the unlikely case
I find an issue.

If there is any other relevant tests you have in mind, please let me know 
and I'll try it out if possible.

I don't think there is any significant risk in changing from hard to soft 
reset because it only applies to iMX28 and the hard reset should be asserted
on the next call to fec_restart() anyway.  Given the stated reason for the 
modification and some basic test results, my opinion is now that we can 
proceed with the modification.

Best regards,

Laurent

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

* [PATCH] net: fec: Refactor MAC reset to function
@ 2025-01-22 16:39 Csókás, Bence
  2025-01-22 19:47 ` Jacob Keller
  2025-01-23  1:24 ` Wei Fang
  0 siblings, 2 replies; 19+ messages in thread
From: Csókás, Bence @ 2025-01-22 16:39 UTC (permalink / raw)
  To: Laurent Badel, Jakub Kicinski, imx, netdev, linux-kernel
  Cc: Csókás, Bence, Ahmad Fatoum, Simon Horman,
	Michal Swiatkowski, Wei Fang, Shenwei Wang, Clark Wang,
	Andrew Lunn, David S. Miller, Eric Dumazet, Paolo Abeni

The core is reset both in `fec_restart()` (called on link-up) and
`fec_stop()` (going to sleep, driver remove etc.). These two functions
had their separate implementations, which was at first only a register
write and a `udelay()` (and the accompanying block comment). However,
since then we got soft-reset (MAC disable) and Wake-on-LAN support, which
meant that these implementations diverged, often causing bugs. For
instance, as of now, `fec_stop()` does not check for
`FEC_QUIRK_NO_HARD_RESET`, and `fec_restart()` missed the refactor in
commit ff049886671c ("net: fec: Refactor: #define magic constants")
renaming the "magic" constant `1` to `FEC_ECR_RESET`.

To eliminate this bug-source, refactor implementation to a common function.

Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Fixes: c730ab423bfa ("net: fec: Fix temporary RMII clock reset on link up")
Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu>
---

Notes:
    Recommended options for this patch:
    `--color-moved --color-moved-ws=allow-indentation-change`
    Changes in v2:
    * collect Michal's tag
    * reformat message to 75 cols
    * fix missing `u32 val`

 drivers/net/ethernet/freescale/fec_main.c | 52 +++++++++++------------
 1 file changed, 25 insertions(+), 27 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 68725506a095..520fe638ea00 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1064,6 +1064,29 @@ static void fec_enet_enable_ring(struct net_device *ndev)
 	}
 }
 
+/* Whack a reset.  We should wait for this.
+ * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
+ * instead of reset MAC itself.
+ */
+static void fec_ctrl_reset(struct fec_enet_private *fep, bool wol)
+{
+	u32 val;
+
+	if (!wol || !(fep->wol_flag & FEC_WOL_FLAG_SLEEP_ON)) {
+		if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES ||
+		    ((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) {
+			writel(0, fep->hwp + FEC_ECNTRL);
+		} else {
+			writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL);
+			udelay(10);
+		}
+	} else {
+		val = readl(fep->hwp + FEC_ECNTRL);
+		val |= (FEC_ECR_MAGICEN | FEC_ECR_SLEEP);
+		writel(val, fep->hwp + FEC_ECNTRL);
+	}
+}
+
 /*
  * This function is called to start or restart the FEC during a link
  * change, transmit timeout, or to reconfigure the FEC.  The network
@@ -1080,17 +1103,7 @@ fec_restart(struct net_device *ndev)
 	if (fep->bufdesc_ex)
 		fec_ptp_save_state(fep);
 
-	/* Whack a reset.  We should wait for this.
-	 * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
-	 * instead of reset MAC itself.
-	 */
-	if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES ||
-	    ((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) {
-		writel(0, fep->hwp + FEC_ECNTRL);
-	} else {
-		writel(1, fep->hwp + FEC_ECNTRL);
-		udelay(10);
-	}
+	fec_ctrl_reset(fep, false);
 
 	/*
 	 * enet-mac reset will reset mac address registers too,
@@ -1344,22 +1357,7 @@ fec_stop(struct net_device *ndev)
 	if (fep->bufdesc_ex)
 		fec_ptp_save_state(fep);
 
-	/* Whack a reset.  We should wait for this.
-	 * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
-	 * instead of reset MAC itself.
-	 */
-	if (!(fep->wol_flag & FEC_WOL_FLAG_SLEEP_ON)) {
-		if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES) {
-			writel(0, fep->hwp + FEC_ECNTRL);
-		} else {
-			writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL);
-			udelay(10);
-		}
-	} else {
-		val = readl(fep->hwp + FEC_ECNTRL);
-		val |= (FEC_ECR_MAGICEN | FEC_ECR_SLEEP);
-		writel(val, fep->hwp + FEC_ECNTRL);
-	}
+	fec_ctrl_reset(fep, true);
 	writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED);
 	writel(FEC_DEFAULT_IMASK, fep->hwp + FEC_IMASK);
 
-- 
2.48.1



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

* Re: [PATCH] net: fec: Refactor MAC reset to function
  2025-01-22 16:39 Csókás, Bence
@ 2025-01-22 19:47 ` Jacob Keller
  2025-01-23  1:24 ` Wei Fang
  1 sibling, 0 replies; 19+ messages in thread
From: Jacob Keller @ 2025-01-22 19:47 UTC (permalink / raw)
  To: Csókás, Bence, Laurent Badel, Jakub Kicinski, imx,
	netdev, linux-kernel
  Cc: Ahmad Fatoum, Simon Horman, Michal Swiatkowski, Wei Fang,
	Shenwei Wang, Clark Wang, Andrew Lunn, David S. Miller,
	Eric Dumazet, Paolo Abeni



On 1/22/2025 8:39 AM, Csókás, Bence wrote:
> The core is reset both in `fec_restart()` (called on link-up) and
> `fec_stop()` (going to sleep, driver remove etc.). These two functions
> had their separate implementations, which was at first only a register
> write and a `udelay()` (and the accompanying block comment). However,
> since then we got soft-reset (MAC disable) and Wake-on-LAN support, which
> meant that these implementations diverged, often causing bugs. For
> instance, as of now, `fec_stop()` does not check for
> `FEC_QUIRK_NO_HARD_RESET`, and `fec_restart()` missed the refactor in
> commit ff049886671c ("net: fec: Refactor: #define magic constants")
> renaming the "magic" constant `1` to `FEC_ECR_RESET`.
> 
> To eliminate this bug-source, refactor implementation to a common function.
> 
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Fixes: c730ab423bfa ("net: fec: Fix temporary RMII clock reset on link up")
> Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu>
> ---
> 

You didn't mention the tree this targets. This is a bug fix, so this
should be targeted to net.

> Notes:
>     Recommended options for this patch:
>     `--color-moved --color-moved-ws=allow-indentation-change`
>     Changes in v2:
>     * collect Michal's tag
>     * reformat message to 75 cols
>     * fix missing `u32 val`
> 
>  drivers/net/ethernet/freescale/fec_main.c | 52 +++++++++++------------
>  1 file changed, 25 insertions(+), 27 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
> index 68725506a095..520fe638ea00 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -1064,6 +1064,29 @@ static void fec_enet_enable_ring(struct net_device *ndev)
>  	}
>  }
>  
> +/* Whack a reset.  We should wait for this.
> + * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
> + * instead of reset MAC itself.
> + */
> +static void fec_ctrl_reset(struct fec_enet_private *fep, bool wol)
> +{
> +	u32 val;
> +
> +	if (!wol || !(fep->wol_flag & FEC_WOL_FLAG_SLEEP_ON)) {
> +		if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES ||
> +		    ((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) {
> +			writel(0, fep->hwp + FEC_ECNTRL);
> +		} else {
> +			writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL);
> +			udelay(10);
> +		}
> +	} else {
> +		val = readl(fep->hwp + FEC_ECNTRL);
> +		val |= (FEC_ECR_MAGICEN | FEC_ECR_SLEEP);
> +		writel(val, fep->hwp + FEC_ECNTRL);
> +	}
> +}
> +

Typically this kind of refactor to functions is kept separate from bug
fixes. However, I think in this case, the diff size is small enough it
is easy to review, so I think its worth taking as-is to net.

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>

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

* RE: [PATCH] net: fec: Refactor MAC reset to function
  2025-01-22 16:39 Csókás, Bence
  2025-01-22 19:47 ` Jacob Keller
@ 2025-01-23  1:24 ` Wei Fang
  1 sibling, 0 replies; 19+ messages in thread
From: Wei Fang @ 2025-01-23  1:24 UTC (permalink / raw)
  To: Csókás, Bence, Laurent Badel, Jakub Kicinski,
	imx@lists.linux.dev, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
  Cc: Ahmad Fatoum, Simon Horman, Michal Swiatkowski, Shenwei Wang,
	Clark Wang, Andrew Lunn, David S. Miller, Eric Dumazet,
	Paolo Abeni

> The core is reset both in `fec_restart()` (called on link-up) and
> `fec_stop()` (going to sleep, driver remove etc.). These two functions
> had their separate implementations, which was at first only a register
> write and a `udelay()` (and the accompanying block comment). However,
> since then we got soft-reset (MAC disable) and Wake-on-LAN support, which
> meant that these implementations diverged, often causing bugs. For
> instance, as of now, `fec_stop()` does not check for
> `FEC_QUIRK_NO_HARD_RESET`, and `fec_restart()` missed the refactor in
> commit ff049886671c ("net: fec: Refactor: #define magic constants")
> renaming the "magic" constant `1` to `FEC_ECR_RESET`.
> 
> To eliminate this bug-source, refactor implementation to a common function.
> 
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Fixes: c730ab423bfa ("net: fec: Fix temporary RMII clock reset on link up")
> Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu>
> ---

You seem to have missed Andrew's comment in the v1. If this patch is just
a refactor, then the Fixes tag should be removed, and the target tree should
be net-next. If not, please describe the bug in more detail in the commit
message.

> 
> Notes:
>     Recommended options for this patch:
>     `--color-moved --color-moved-ws=allow-indentation-change`
>     Changes in v2:
>     * collect Michal's tag
>     * reformat message to 75 cols
>     * fix missing `u32 val`
> 
>  drivers/net/ethernet/freescale/fec_main.c | 52 +++++++++++------------
>  1 file changed, 25 insertions(+), 27 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c
> b/drivers/net/ethernet/freescale/fec_main.c
> index 68725506a095..520fe638ea00 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -1064,6 +1064,29 @@ static void fec_enet_enable_ring(struct net_device
> *ndev)
>  	}
>  }
> 
> +/* Whack a reset.  We should wait for this.
> + * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
> + * instead of reset MAC itself.
> + */
> +static void fec_ctrl_reset(struct fec_enet_private *fep, bool wol)
> +{
> +	u32 val;
> +
> +	if (!wol || !(fep->wol_flag & FEC_WOL_FLAG_SLEEP_ON)) {
> +		if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES ||
> +		    ((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) {
> +			writel(0, fep->hwp + FEC_ECNTRL);
> +		} else {
> +			writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL);
> +			udelay(10);
> +		}
> +	} else {
> +		val = readl(fep->hwp + FEC_ECNTRL);
> +		val |= (FEC_ECR_MAGICEN | FEC_ECR_SLEEP);
> +		writel(val, fep->hwp + FEC_ECNTRL);
> +	}
> +}
> +
>  /*
>   * This function is called to start or restart the FEC during a link
>   * change, transmit timeout, or to reconfigure the FEC.  The network
> @@ -1080,17 +1103,7 @@ fec_restart(struct net_device *ndev)
>  	if (fep->bufdesc_ex)
>  		fec_ptp_save_state(fep);
> 
> -	/* Whack a reset.  We should wait for this.
> -	 * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
> -	 * instead of reset MAC itself.
> -	 */
> -	if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES ||
> -	    ((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) {
> -		writel(0, fep->hwp + FEC_ECNTRL);
> -	} else {
> -		writel(1, fep->hwp + FEC_ECNTRL);
> -		udelay(10);
> -	}
> +	fec_ctrl_reset(fep, false);
> 
>  	/*
>  	 * enet-mac reset will reset mac address registers too,
> @@ -1344,22 +1357,7 @@ fec_stop(struct net_device *ndev)
>  	if (fep->bufdesc_ex)
>  		fec_ptp_save_state(fep);
> 
> -	/* Whack a reset.  We should wait for this.
> -	 * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
> -	 * instead of reset MAC itself.
> -	 */
> -	if (!(fep->wol_flag & FEC_WOL_FLAG_SLEEP_ON)) {
> -		if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES) {
> -			writel(0, fep->hwp + FEC_ECNTRL);
> -		} else {
> -			writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL);
> -			udelay(10);
> -		}
> -	} else {
> -		val = readl(fep->hwp + FEC_ECNTRL);
> -		val |= (FEC_ECR_MAGICEN | FEC_ECR_SLEEP);
> -		writel(val, fep->hwp + FEC_ECNTRL);
> -	}
> +	fec_ctrl_reset(fep, true);
>  	writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED);
>  	writel(FEC_DEFAULT_IMASK, fep->hwp + FEC_IMASK);
> 
> --
> 2.48.1
> 


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

* [PATCH] net: fec: Refactor MAC reset to function
@ 2025-02-04  9:36 Csókás, Bence
  2025-02-05 13:28 ` Simon Horman
  0 siblings, 1 reply; 19+ messages in thread
From: Csókás, Bence @ 2025-02-04  9:36 UTC (permalink / raw)
  To: Laurent Badel, Jakub Kicinski, Andrew Lunn,
	Csókás Bence, imx, netdev, linux-kernel
  Cc: Michal Swiatkowski, Jacob Keller, Wei Fang, Shenwei Wang,
	Clark Wang, Andrew Lunn, David S. Miller, Eric Dumazet,
	Paolo Abeni

The core is reset both in `fec_restart()` (called on link-up) and
`fec_stop()` (going to sleep, driver remove etc.). These two functions
had their separate implementations, which was at first only a register
write and a `udelay()` (and the accompanying block comment). However,
since then we got soft-reset (MAC disable) and Wake-on-LAN support, which
meant that these implementations diverged, often causing bugs.

For instance, as of now, `fec_stop()` does not check for
`FEC_QUIRK_NO_HARD_RESET`, meaning the MII/RMII mode is cleared on eg.
a PM power-down event; and `fec_restart()` missed the refactor renaming
the "magic" constant `1` to `FEC_ECR_RESET`.

To harmonize current implementations, and eliminate this source of
potential future bugs, refactor implementation to a common function.

Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Fixes: c730ab423bfa ("net: fec: Fix temporary RMII clock reset on link up")
Fixes: ff049886671c ("net: fec: Refactor: #define magic constants")
Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu>
---

Notes:
    Recommended options for this patch:
    `--color-moved --color-moved-ws=allow-indentation-change`
    Changes in v2:
    * collect Michal's tag
    * reformat message to 75 cols
    * fix missing `u32 val`
    Changes in v3:
    * rename parameter to `allow_wol`
    Changes in v3:
    * clarify message
    * collect Jacob's tag
    * rebased onto c2933b2befe2

 drivers/net/ethernet/freescale/fec_main.c | 52 +++++++++++------------
 1 file changed, 25 insertions(+), 27 deletions(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index f7c4ce8e9a26..a86cfebedaa8 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1093,6 +1093,29 @@ static void fec_enet_enable_ring(struct net_device *ndev)
 	}
 }
 
+/* Whack a reset.  We should wait for this.
+ * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
+ * instead of reset MAC itself.
+ */
+static void fec_ctrl_reset(struct fec_enet_private *fep, bool allow_wol)
+{
+	u32 val;
+
+	if (!allow_wol || !(fep->wol_flag & FEC_WOL_FLAG_SLEEP_ON)) {
+		if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES ||
+		    ((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) {
+			writel(0, fep->hwp + FEC_ECNTRL);
+		} else {
+			writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL);
+			udelay(10);
+		}
+	} else {
+		val = readl(fep->hwp + FEC_ECNTRL);
+		val |= (FEC_ECR_MAGICEN | FEC_ECR_SLEEP);
+		writel(val, fep->hwp + FEC_ECNTRL);
+	}
+}
+
 /*
  * This function is called to start or restart the FEC during a link
  * change, transmit timeout, or to reconfigure the FEC.  The network
@@ -1109,17 +1132,7 @@ fec_restart(struct net_device *ndev)
 	if (fep->bufdesc_ex)
 		fec_ptp_save_state(fep);
 
-	/* Whack a reset.  We should wait for this.
-	 * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
-	 * instead of reset MAC itself.
-	 */
-	if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES ||
-	    ((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) {
-		writel(0, fep->hwp + FEC_ECNTRL);
-	} else {
-		writel(1, fep->hwp + FEC_ECNTRL);
-		udelay(10);
-	}
+	fec_ctrl_reset(fep, false);
 
 	/*
 	 * enet-mac reset will reset mac address registers too,
@@ -1373,22 +1386,7 @@ fec_stop(struct net_device *ndev)
 	if (fep->bufdesc_ex)
 		fec_ptp_save_state(fep);
 
-	/* Whack a reset.  We should wait for this.
-	 * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
-	 * instead of reset MAC itself.
-	 */
-	if (!(fep->wol_flag & FEC_WOL_FLAG_SLEEP_ON)) {
-		if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES) {
-			writel(0, fep->hwp + FEC_ECNTRL);
-		} else {
-			writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL);
-			udelay(10);
-		}
-	} else {
-		val = readl(fep->hwp + FEC_ECNTRL);
-		val |= (FEC_ECR_MAGICEN | FEC_ECR_SLEEP);
-		writel(val, fep->hwp + FEC_ECNTRL);
-	}
+	fec_ctrl_reset(fep, true);
 	writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED);
 	writel(FEC_DEFAULT_IMASK, fep->hwp + FEC_IMASK);
 
-- 
2.48.1



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

* Re: [PATCH] net: fec: Refactor MAC reset to function
  2025-02-04  9:36 Csókás, Bence
@ 2025-02-05 13:28 ` Simon Horman
  2025-02-05 13:48   ` Simon Horman
  0 siblings, 1 reply; 19+ messages in thread
From: Simon Horman @ 2025-02-05 13:28 UTC (permalink / raw)
  To: Csókás, Bence
  Cc: Laurent Badel, Jakub Kicinski, Andrew Lunn, imx, netdev,
	linux-kernel, Michal Swiatkowski, Jacob Keller, Wei Fang,
	Shenwei Wang, Clark Wang, Andrew Lunn, David S. Miller,
	Eric Dumazet, Paolo Abeni

On Tue, Feb 04, 2025 at 10:36:03AM +0100, Csókás, Bence wrote:
> The core is reset both in `fec_restart()` (called on link-up) and
> `fec_stop()` (going to sleep, driver remove etc.). These two functions
> had their separate implementations, which was at first only a register
> write and a `udelay()` (and the accompanying block comment). However,
> since then we got soft-reset (MAC disable) and Wake-on-LAN support, which
> meant that these implementations diverged, often causing bugs.
> 
> For instance, as of now, `fec_stop()` does not check for
> `FEC_QUIRK_NO_HARD_RESET`, meaning the MII/RMII mode is cleared on eg.
> a PM power-down event; and `fec_restart()` missed the refactor renaming
> the "magic" constant `1` to `FEC_ECR_RESET`.
> 
> To harmonize current implementations, and eliminate this source of
> potential future bugs, refactor implementation to a common function.
> 
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> Fixes: c730ab423bfa ("net: fec: Fix temporary RMII clock reset on link up")
> Fixes: ff049886671c ("net: fec: Refactor: #define magic constants")
> Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu>

Reviewed-by: Simon Horman <horms@kernel.org>


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

* Re: [PATCH] net: fec: Refactor MAC reset to function
  2025-02-05 13:28 ` Simon Horman
@ 2025-02-05 13:48   ` Simon Horman
  2025-02-06 13:02     ` Csókás Bence
  0 siblings, 1 reply; 19+ messages in thread
From: Simon Horman @ 2025-02-05 13:48 UTC (permalink / raw)
  To: Csókás, Bence
  Cc: Laurent Badel, Jakub Kicinski, Andrew Lunn, imx, netdev,
	linux-kernel, Michal Swiatkowski, Jacob Keller, Wei Fang,
	Shenwei Wang, Clark Wang, Andrew Lunn, David S. Miller,
	Eric Dumazet, Paolo Abeni

On Wed, Feb 05, 2025 at 01:28:32PM +0000, Simon Horman wrote:
> On Tue, Feb 04, 2025 at 10:36:03AM +0100, Csókás, Bence wrote:
> > The core is reset both in `fec_restart()` (called on link-up) and
> > `fec_stop()` (going to sleep, driver remove etc.). These two functions
> > had their separate implementations, which was at first only a register
> > write and a `udelay()` (and the accompanying block comment). However,
> > since then we got soft-reset (MAC disable) and Wake-on-LAN support, which
> > meant that these implementations diverged, often causing bugs.
> > 
> > For instance, as of now, `fec_stop()` does not check for
> > `FEC_QUIRK_NO_HARD_RESET`, meaning the MII/RMII mode is cleared on eg.
> > a PM power-down event; and `fec_restart()` missed the refactor renaming
> > the "magic" constant `1` to `FEC_ECR_RESET`.
> > 
> > To harmonize current implementations, and eliminate this source of
> > potential future bugs, refactor implementation to a common function.
> > 
> > Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> > Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> > Fixes: c730ab423bfa ("net: fec: Fix temporary RMII clock reset on link up")
> > Fixes: ff049886671c ("net: fec: Refactor: #define magic constants")
> > Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu>
> 
> Reviewed-by: Simon Horman <horms@kernel.org>

Sorry, I think I have to take that back for now.

Unfortunately when I was looking over this I failed to notice: that there
is a newer version of this patch (v3); the following response from Jakub to
v3; and, the response from Laurent that he is referring to.

  "Laurent responded to v1 saying this was intentional. Please give more
   details on how problem you're seeing and on what platforms. Otherwise
   this is not a fix but refactoring.

  "Please don't post new versions in-reply-to, and add lore links to
   the previous version in the changelog.

  Link: https://lore.kernel.org/netdev/20250204074504.523c794c@kernel.org/


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

* Re: [PATCH] net: fec: Refactor MAC reset to function
  2025-02-05 13:48   ` Simon Horman
@ 2025-02-06 13:02     ` Csókás Bence
  2025-02-06 18:32       ` Simon Horman
  0 siblings, 1 reply; 19+ messages in thread
From: Csókás Bence @ 2025-02-06 13:02 UTC (permalink / raw)
  To: Simon Horman
  Cc: Laurent Badel, Jakub Kicinski, Andrew Lunn, imx, netdev,
	linux-kernel, Michal Swiatkowski, Jacob Keller, Wei Fang,
	Shenwei Wang, Clark Wang, Andrew Lunn, David S. Miller,
	Eric Dumazet, Paolo Abeni

Hi,
sorry for the confusion. I accidentally sent that one while editing the 
headers.

On 2025. 02. 05. 14:48, Simon Horman wrote:
>> Reviewed-by: Simon Horman <horms@kernel.org>
> 
> Sorry, I think I have to take that back for now.

Would you keep it if I retargeted to net-next without the Fixes: tags?

Bence


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

* Re: [PATCH] net: fec: Refactor MAC reset to function
  2025-02-06 13:02     ` Csókás Bence
@ 2025-02-06 18:32       ` Simon Horman
  0 siblings, 0 replies; 19+ messages in thread
From: Simon Horman @ 2025-02-06 18:32 UTC (permalink / raw)
  To: Csókás Bence
  Cc: Laurent Badel, Jakub Kicinski, Andrew Lunn, imx, netdev,
	linux-kernel, Michal Swiatkowski, Jacob Keller, Wei Fang,
	Shenwei Wang, Clark Wang, Andrew Lunn, David S. Miller,
	Eric Dumazet, Paolo Abeni

On Thu, Feb 06, 2025 at 02:02:50PM +0100, Csókás Bence wrote:
> Hi,
> sorry for the confusion. I accidentally sent that one while editing the
> headers.
> 
> On 2025. 02. 05. 14:48, Simon Horman wrote:
> > > Reviewed-by: Simon Horman <horms@kernel.org>
> > 
> > Sorry, I think I have to take that back for now.
> 
> Would you keep it if I retargeted to net-next without the Fixes: tags?

Yes, I think that would address my concerns.

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

end of thread, other threads:[~2025-02-06 18:32 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-21 10:38 [PATCH] net: fec: Refactor MAC reset to function Csókás, Bence
2025-01-21 14:10 ` Michal Swiatkowski
2025-01-21 14:36 ` Ahmad Fatoum
2025-01-21 15:19 ` Simon Horman
2025-01-21 15:51   ` Csókás Bence
2025-01-21 18:07     ` Jakub Kicinski
2025-01-21 16:09 ` [EXTERNAL] " Badel, Laurent
2025-01-21 20:41   ` Csókás Bence
2025-01-22 15:22     ` Badel, Laurent
2025-01-21 17:28 ` Andrew Lunn
2025-01-22  2:50 ` Wei Fang
  -- strict thread matches above, loose matches on Subject: below --
2025-01-22 16:39 Csókás, Bence
2025-01-22 19:47 ` Jacob Keller
2025-01-23  1:24 ` Wei Fang
2025-02-04  9:36 Csókás, Bence
2025-02-05 13:28 ` Simon Horman
2025-02-05 13:48   ` Simon Horman
2025-02-06 13:02     ` Csókás Bence
2025-02-06 18:32       ` Simon Horman

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).