[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240212153717.10023-2-csokas.bence@prolan.hu>
Date: Mon, 12 Feb 2024 16:37:19 +0100
From: Csókás Bence <csokas.bence@...lan.hu>
To: <netdev@...r.kernel.org>
CC: Jakub Kicinski <kuba@...nel.org>, "David S. Miller" <davem@...emloft.net>,
Wei Fang <wei.fang@....com>, Shenwei Wang <shenwei.wang@....com>, Clark Wang
<xiaoning.wang@....com>, NXP Linux Team <linux-imx@....com>, Eric Dumazet
<edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Francesco Dolcini
<francesco.dolcini@...adex.com>, Andrew Lunn <andrew@...n.ch>, "Marc
Kleine-Budde" <mkl@...gutronix.de>, Denis Kirjanov <dkirjanov@...e.de>,
Csókás Bence <csokas.bence@...lan.hu>
Subject: [PATCH net-next v4 2/2] net: fec: Refactor: Replace FEC_ENET_FCE with FEC_RCR_FLOWCTL
FEC_ENET_FCE is the Flow Control Enable bit (bit 5) of the RCR.
This is now defined as FEC_RCR_FLOWCTL.
Signed-off-by: Csókás Bence <csokas.bence@...lan.hu>
---
Notes:
Changes in v4:
* factored out the removal of FEC_ENET_FCE
Changes in v3:
* remove `u32 ecntl` from `fec_stop()`
* found another ETHEREN in `fec_restart()`
drivers/net/ethernet/freescale/fec_main.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 52c674ecbebf..84f24a0fe278 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -85,8 +85,6 @@ static int fec_enet_xdp_tx_xmit(struct fec_enet_private *fep,
static const u16 fec_enet_vlan_pri_to_queue[8] = {0, 0, 1, 1, 1, 2, 2, 2};
-/* Pause frame feild and FIFO threshold */
-#define FEC_ENET_FCE (1 << 5)
#define FEC_ENET_RSEM_V 0x84
#define FEC_ENET_RSFL_V 16
#define FEC_ENET_RAEM_V 0x8
@@ -1196,7 +1194,7 @@ fec_restart(struct net_device *ndev)
if ((fep->pause_flag & FEC_PAUSE_FLAG_ENABLE) ||
((fep->pause_flag & FEC_PAUSE_FLAG_AUTONEG) &&
ndev->phydev && ndev->phydev->pause)) {
- rcntl |= FEC_ENET_FCE;
+ rcntl |= FEC_RCR_FLOWCTL;
/* set FIFO threshold parameter to reduce overrun */
writel(FEC_ENET_RSEM_V, fep->hwp + FEC_R_FIFO_RSEM);
@@ -1207,7 +1205,7 @@ fec_restart(struct net_device *ndev)
/* OPD */
writel(FEC_ENET_OPD_V, fep->hwp + FEC_OPD);
} else {
- rcntl &= ~FEC_ENET_FCE;
+ rcntl &= ~FEC_RCR_FLOWCTL;
}
#endif /* !defined(CONFIG_M5272) */
--
2.25.1
Powered by blists - more mailing lists