iavf: in iavf_down, disable queues when removing the driver
authorMichal Schmidt <mschmidt@redhat.com>
Wed, 25 Oct 2023 18:32:13 +0000 (11:32 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 26 Oct 2023 00:48:31 +0000 (17:48 -0700)
commit53798666648af3aa0dd512c2380576627237a800
treec5c59dbfe51bd8e25819718293eb68584e29e902
parent5e5d8b94a4fa5fc4a4ea5c97393a29aa5bf3e4bb
iavf: in iavf_down, disable queues when removing the driver

In iavf_down, we're skipping the scheduling of certain operations if
the driver is being removed. However, the IAVF_FLAG_AQ_DISABLE_QUEUES
request must not be skipped in this case, because iavf_close waits
for the transition to the __IAVF_DOWN state, which happens in
iavf_virtchnl_completion after the queues are released.

Without this fix, "rmmod iavf" takes half a second per interface that's
up and prints the "Device resources not yet released" warning.

Fixes: c8de44b577eb ("iavf: do not process adminq tasks when __IAVF_IN_REMOVE_TASK is set")
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Tested-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://lore.kernel.org/r/20231025183213.874283-1-jacob.e.keller@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/iavf/iavf_main.c