OSDN Git Service

net: gianfar: Clear CAR registers
authorEsben Haabendal <esben@geanix.com>
Thu, 17 Jun 2021 09:49:20 +0000 (11:49 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Jun 2021 18:39:47 +0000 (11:39 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/gianfar.c

index a0277fe..ebd1065 100644 (file)
@@ -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 */