diff mbox series

[net-next,06/13] net: fec: fec_restart(): make use of FEC_ECR_RESET

Message ID 20241016-fec-cleanups-v1-6-de783bd15e6a@pengutronix.de (mailing list archive)
State New
Headers show
Series net: fec: cleanups, update quirk, update IRQ naming | expand

Commit Message

Marc Kleine-Budde Oct. 16, 2024, 9:51 p.m. UTC
Replace the magic number "1" by the already existing define
FEC_ECR_RESET.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/ethernet/freescale/fec_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Wei Fang Oct. 17, 2024, 1:49 a.m. UTC | #1
> -----Original Message-----
> From: Marc Kleine-Budde <mkl@pengutronix.de>
> Sent: 2024年10月17日 5:52
> To: Wei Fang <wei.fang@nxp.com>; Shenwei Wang <shenwei.wang@nxp.com>;
> Clark Wang <xiaoning.wang@nxp.com>; David S. Miller
> <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>; Jakub
> Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Richard
> Cochran <richardcochran@gmail.com>
> Cc: imx@lists.linux.dev; netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
> kernel@pengutronix.de; Marc Kleine-Budde <mkl@pengutronix.de>
> Subject: [PATCH net-next 06/13] net: fec: fec_restart(): make use of
> FEC_ECR_RESET
> 
> Replace the magic number "1" by the already existing define
> FEC_ECR_RESET.
> 
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
>  drivers/net/ethernet/freescale/fec_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c
> b/drivers/net/ethernet/freescale/fec_main.c
> index
> 2ee7e4765ba3163fb0d158e60b534b171da26c22..d948ed9810027d5fabe521
> dc3af2cf505dacd13e 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -1089,7 +1089,7 @@ fec_restart(struct net_device *ndev)
>  	    ((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) {
>  		writel(0, fep->hwp + FEC_ECNTRL);
>  	} else {
> -		writel(1, fep->hwp + FEC_ECNTRL);
> +		writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL);
>  		udelay(10);
>  	}
> 
> 
> --
> 2.45.2
> 

Thanks.

Reviewed-by: Wei Fang <wei.fang@nxp.com>
Frank Li Oct. 17, 2024, 2:07 a.m. UTC | #2
On Wed, Oct 16, 2024 at 11:51:54PM +0200, Marc Kleine-Budde wrote:
> Replace the magic number "1" by the already existing define
> FEC_ECR_RESET.

nit: wrap at 75 char.
Reviewed-by: Frank Li <Frank.Li@nxp.com>

>
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
> ---
>  drivers/net/ethernet/freescale/fec_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
> index 2ee7e4765ba3163fb0d158e60b534b171da26c22..d948ed9810027d5fabe521dc3af2cf505dacd13e 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -1089,7 +1089,7 @@ fec_restart(struct net_device *ndev)
>  	    ((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) {
>  		writel(0, fep->hwp + FEC_ECNTRL);
>  	} else {
> -		writel(1, fep->hwp + FEC_ECNTRL);
> +		writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL);
>  		udelay(10);
>  	}
>
>
> --
> 2.45.2
>
>
Marc Kleine-Budde Oct. 17, 2024, 6:56 a.m. UTC | #3
On 16.10.2024 22:07:04, Frank Li wrote:
> On Wed, Oct 16, 2024 at 11:51:54PM +0200, Marc Kleine-Budde wrote:
> > Replace the magic number "1" by the already existing define
> > FEC_ECR_RESET.
> 
> nit: wrap at 75 char.
> Reviewed-by: Frank Li <Frank.Li@nxp.com>

Fixed,
Marc
diff mbox series

Patch

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 2ee7e4765ba3163fb0d158e60b534b171da26c22..d948ed9810027d5fabe521dc3af2cf505dacd13e 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1089,7 +1089,7 @@  fec_restart(struct net_device *ndev)
 	    ((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) {
 		writel(0, fep->hwp + FEC_ECNTRL);
 	} else {
-		writel(1, fep->hwp + FEC_ECNTRL);
+		writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL);
 		udelay(10);
 	}