mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
iavf: Fix updating statistics
[ Upstream commit9358076642] Commitbac8486116("iavf: Refactor the watchdog state machine") inverted the logic for when to update statistics. Statistics should be updated when no other commands are pending, instead they were only requested when a command was processed. iavf_request_stats() would see a pending request and not request statistics to be updated. This caused statistics to never be updated; fix the logic. Fixes:bac8486116("iavf: Refactor the watchdog state machine") Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
8d5ce7e06f
commit
67642ac2ac
@@ -1948,7 +1948,10 @@ static void iavf_watchdog_task(struct work_struct *work)
|
||||
iavf_send_api_ver(adapter);
|
||||
}
|
||||
} else {
|
||||
if (!iavf_process_aq_command(adapter) &&
|
||||
/* An error will be returned if no commands were
|
||||
* processed; use this opportunity to update stats
|
||||
*/
|
||||
if (iavf_process_aq_command(adapter) &&
|
||||
adapter->state == __IAVF_RUNNING)
|
||||
iavf_request_stats(adapter);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user