iavf: Fix return of set the new channel count
authorMateusz Palczewski <mateusz.palczewski@intel.com>
Tue, 9 Feb 2021 11:59:38 +0000 (11:59 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Nov 2021 09:39:15 +0000 (10:39 +0100)
commit1555d83ddbb7204ef60c58aee6ca3bbef2c5e99f
treec525c7ae0939585f53b9db485b172a13c2ea7a1f
parent09decd0a102a2a85018aca9038267387e23ab65b
iavf: Fix return of set the new channel count

[ Upstream commit 4e5e6b5d9d1334d3490326b6922a2daaf56a867f ]

Fixed return correct code from set the new channel count.
Implemented by check if reset is done in appropriate time.
This solution give a extra time to pf for reset vf in case
when user want set new channel count for all vfs.
Without this patch it is possible to return misleading output
code to user and vf reset not to be correctly performed by pf.

Fixes: 5520deb15326 ("iavf: Enable support for up to 16 queues")
Signed-off-by: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
Signed-off-by: Mateusz Palczewski <mateusz.palczewski@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/iavf/iavf_ethtool.c