bnx2x: VF clean statistics
authorYuval Mintz <[email protected]>
Mon, 25 Aug 2014 14:48:31 +0000 (17:48 +0300)
committerDavid S. Miller <[email protected]>
Tue, 26 Aug 2014 00:30:22 +0000 (17:30 -0700)
During statistics initialization of a VF we need to clean its statistics.

Signed-off-by: Yuval Mintz <[email protected]>
Signed-off-by: Ariel Elior <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c

index e1c819396d1ab9871e074dbd4bcec3018d72e519..d1608297c773746237a8faf3697277afcbe45918 100644 (file)
@@ -1629,6 +1629,11 @@ void bnx2x_stats_init(struct bnx2x *bp)
        int /*abs*/port = BP_PORT(bp);
        int mb_idx = BP_FW_MB_IDX(bp);
 
+       if (IS_VF(bp)) {
+               bnx2x_memset_stats(bp);
+               return;
+       }
+
        bp->stats_pending = 0;
        bp->executer_idx = 0;
        bp->stats_counter = 0;