[3/6] net: gianfar: Clear CAR registers
diff mbox series

Message ID fe53d563c9b53266273f6fee148cbc34c1258d2f.1623922686.git.esben@geanix.com
State Accepted
Commit ef09487431a96029b64a7a6fc4ced46662e921e7
Headers show
Series
  • net: gianfar: 64-bit statistics and rx_missed_errors counter
Related show

Commit Message

Esben Haabendal June 17, 2021, 9:49 a.m. UTC
The CAR1 and CAR2 registers are W1C style registers, to the memset does not
actually clear them.

Signed-off-by: Esben Haabendal <esben@geanix.com>
---
 drivers/net/ethernet/freescale/gianfar.c | 3 +++
 1 file changed, 3 insertions(+)

Patch
diff mbox series

diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index a0277fe8cc60..ebd1065f39fa 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -3103,6 +3103,9 @@  static void gfar_hw_init(struct gfar_private *priv)
 		/* Mask off the CAM interrupts */
 		gfar_write(&regs->rmon.cam1, 0xffffffff);
 		gfar_write(&regs->rmon.cam2, 0xffffffff);
+		/* Clear the CAR registers (w1c style) */
+		gfar_write(&regs->rmon.car1, 0xffffffff);
+		gfar_write(&regs->rmon.car2, 0xffffffff);
 	}
 
 	/* Initialize ECNTRL */