summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc/ef10.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2013-09-05 22:46:10 +0100
committerBen Hutchings <bhutchings@solarflare.com>2013-09-11 15:29:51 +0100
commit869070c5300d1b6f0f72f5444e69fe65e34c6bde (patch)
tree28ad327f129165655721f698351bb138097aef59 /drivers/net/ethernet/sfc/ef10.c
parent8b59f017e4c3f6d30427440014aba8ac25ccb867 (diff)
sfc: Reset derived rx_bad_bytes statistic when EF10 MC is rebooted
If the MC reboots then the stats it reports to us will have been reset. We need to reset ours to get efx_update_diff_stat() working properly. (This is a re-run of commit 876be083b669 'sfc: Reset driver's MAC stats after MC reboot seen'.) Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/ef10.c')
-rw-r--r--drivers/net/ethernet/sfc/ef10.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/ef10.c b/drivers/net/ethernet/sfc/ef10.c
index 357a6e5229c7..80a6eea49e36 100644
--- a/drivers/net/ethernet/sfc/ef10.c
+++ b/drivers/net/ethernet/sfc/ef10.c
@@ -708,6 +708,11 @@ static int efx_ef10_mcdi_poll_reboot(struct efx_nic *efx)
nic_data->must_restore_filters = true;
nic_data->rx_rss_context = EFX_EF10_RSS_CONTEXT_INVALID;
+ /* MAC statistics have been cleared on the NIC; clear the local
+ * statistic that we update with efx_update_diff_stat().
+ */
+ nic_data->stats[EF10_STAT_rx_bad_bytes] = 0;
+
return -EIO;
}