]> Pileus Git - ~andy/linux/commitdiff
net: fec: Fix RMON registers on imx6
authorJim Baxter <jim_baxter@mentor.com>
Mon, 1 Jul 2013 13:57:54 +0000 (14:57 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Jul 2013 19:40:52 +0000 (12:40 -0700)
commit 38ae92d "fec: Add support for reading
RMON registers" causes the imx6Q to crash.

This fixes it by only enabling the RMON registers, the
registers are already cleared by the MAC being reset.

Signed-off-by: Jim Baxter <jim_baxter@mentor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec_main.c

index aff8a5cd17c773cb370fe4a44575a198081181b7..b6768821757b4ddb15e9824e14b5d0159de24973 100644 (file)
@@ -606,11 +606,8 @@ fec_restart(struct net_device *ndev, int duplex)
                ecntl |= (1 << 4);
 
 #ifndef CONFIG_M5272
-       /* Disable, clear, and enable the MIB */
-       writel(1 << 31, fep->hwp + FEC_MIB_CTRLSTAT);
-       for (i = RMON_T_DROP; i < IEEE_R_OCTETS_OK; i++)
-               writel(0, fep->hwp + i);
-       writel(0, fep->hwp + FEC_MIB_CTRLSTAT);
+       /* Enable the MIB statistic event counters */
+       writel(0 << 31, fep->hwp + FEC_MIB_CTRLSTAT);
 #endif
 
        /* And last, enable the transmit and receive processing */