net: fec: Clear and enable MIB counters on imx51
authorAndrew Lunn <andrew@lunn.ch>
Wed, 7 Jun 2017 01:57:09 +0000 (03:57 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Jun 2017 14:06:52 +0000 (10:06 -0400)
commit2b30842b23b9e6796c7bd5f0916fd2ebf6b7d633
treef994f2eca18a366530da02797c29ffd7693a9db3
parent216fe8f021e33c36e3b27c49c9f1951f6b037d7f
net: fec: Clear and enable MIB counters on imx51

Both the IMX51 and IMX53 datasheet indicates that the MIB counters
should be cleared during setup. Otherwise random numbers are returned
via ethtool -S.  Add a quirk and a function to do this.

Tested on an IMX51.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec.h
drivers/net/ethernet/freescale/fec_main.c