Subject: Re: [PATCH RFC] net: mvneta: add ethtool statistics

From: Andrew Lunn <[email-masked]>
Date: Thu, 8 Oct 2015 17:32:57 +0200

> > This would suggest the driver is not clearing the statistics when it
> > loads. Should it?
> 
> That's an interesting question, one which I have no answer for.

So i took a look at the other Marvell drivers. mv643xx_eth.c, skge and
sky2.c all have code to clear the statistics. So for consistency, i
think nvneta should as well.

But it gets stranger. mvneta has:

static void mvneta_mib_counters_clear(struct mvneta_port *pp)
{
        int i;
        u32 dummy;

        /* Perform dummy reads from MIB counters */
        for (i = 0; i < MVNETA_MIB_LATE_COLLISION; i += 4)
                dummy = mvreg_read(pp, (MVNETA_MIB_COUNTERS_BASE + i));
}

Looks like somebody did not finish this?

      Andrew