From: Tomasz Lichwala Since the introduction of PTP support in iavf, commit 7c01dbfc8a1c ("iavf: periodically cache PHC time"), the periodic PTP clock caching task always provides a pending admin queue command, causing iavf_process_aq_command() to always return success and permanently preventing the stats fallback path from executing, which results in VF statistics remaining at zero despite traffic flowing. Fix this by making the stats request unconditional when the adapter is in the running state, rather than relying on it as a fallback when no other admin queue commands were processed. Fixes: 7c01dbfc8a1c ("iavf: periodically cache PHC time") Reviewed-by: Aleksandr Loktionov Signed-off-by: Tomasz Lichwala Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen --- drivers/net/ethernet/intel/iavf/iavf_main.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c index 29b8403a066b..c0686ad5c411 100644 --- a/drivers/net/ethernet/intel/iavf/iavf_main.c +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c @@ -2932,18 +2932,12 @@ static int iavf_watchdog_step(struct iavf_adapter *adapter) iavf_send_api_ver(adapter); } } else { - int ret = iavf_process_aq_command(adapter); - - /* An error will be returned if no commands were - * processed; use this opportunity to update stats - * if the error isn't -ENOTSUPP - */ - if (ret && ret != -EOPNOTSUPP && - adapter->state == __IAVF_RUNNING) - iavf_request_stats(adapter); + iavf_process_aq_command(adapter); } - if (adapter->state == __IAVF_RUNNING) + if (adapter->state == __IAVF_RUNNING) { + iavf_request_stats(adapter); iavf_detect_recover_hung(&adapter->vsi); + } break; case __IAVF_REMOVE: default: -- 2.47.1