From: Jim Baxter Date: Mon, 1 Jul 2013 13:57:54 +0000 (+0100) Subject: net: fec: Fix RMON registers on imx6 X-Git-Tag: v3.11-rc1~64^2~38 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b9eef55c2ab33053ae236b5d383965f9ee6a0094;p=profile%2Fivi%2Fkernel-x86-ivi.git net: fec: Fix RMON registers on imx6 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index aff8a5cd17c..b6768821757 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -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 */