summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnxt/bnxt.c
diff options
context:
space:
mode:
authorMichael Chan2017-07-24 18:34:24 +0200
committerDavid S. Miller2017-07-25 02:29:58 +0200
commitadcc331e42e639ea44ac3c746db6c7207c3f69c0 (patch)
tree754594cffdf19f9e696dfb12f5e7ca8cb0408280 /drivers/net/ethernet/broadcom/bnxt/bnxt.c
parentbnxt_en: Add bnxt_get_num_stats() to centrally get the number of ethtool stats. (diff)
downloadkernel-qcow2-linux-adcc331e42e639ea44ac3c746db6c7207c3f69c0.tar.gz
kernel-qcow2-linux-adcc331e42e639ea44ac3c746db6c7207c3f69c0.tar.xz
kernel-qcow2-linux-adcc331e42e639ea44ac3c746db6c7207c3f69c0.zip
bnxt_en: Allow the user to set ethtool stats-block-usecs to 0.
For debugging purpose, it is sometimes useful to disable periodic port statistics updates, so that the firmware logs will not be filled with statistics update messages. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnxt/bnxt.c')
-rw-r--r--drivers/net/ethernet/broadcom/bnxt/bnxt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 4acaeaf87f18..5df967037d10 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -6843,7 +6843,8 @@ static void bnxt_timer(unsigned long data)
if (atomic_read(&bp->intr_sem) != 0)
goto bnxt_restart_timer;
- if (bp->link_info.link_up && (bp->flags & BNXT_FLAG_PORT_STATS)) {
+ if (bp->link_info.link_up && (bp->flags & BNXT_FLAG_PORT_STATS) &&
+ bp->stats_coal_ticks) {
set_bit(BNXT_PERIODIC_STATS_SP_EVENT, &bp->sp_event);
schedule_work(&bp->sp_task);
}