]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
idpf: fix transaction timeouts on reset
authorEmil Tantilov <emil.s.tantilov@intel.com>
Fri, 20 Dec 2024 02:09:32 +0000 (18:09 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Fri, 24 Jan 2025 18:03:39 +0000 (10:03 -0800)
Restore the call to idpf_vc_xn_shutdown() at the beginning of
idpf_vc_core_deinit() provided the function is not called on remove.
In the reset path the mailbox is destroyed, leading to all transactions
timing out.

Fixes: 09d0fb5cb30e ("idpf: deinit virtchnl transaction manager after vport and vectors")
Reviewed-by: Larysa Zaremba <larysa.zaremba@intel.com>
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/idpf/idpf_virtchnl.c

index d46c95f91b0d81305956373632360cb61e81fe1a..7639d520b80630422a429332ba8d1f135fbf56b3 100644 (file)
@@ -3077,12 +3077,21 @@ init_failed:
  */
 void idpf_vc_core_deinit(struct idpf_adapter *adapter)
 {
+       bool remove_in_prog;
+
        if (!test_bit(IDPF_VC_CORE_INIT, adapter->flags))
                return;
 
+       /* Avoid transaction timeouts when called during reset */
+       remove_in_prog = test_bit(IDPF_REMOVE_IN_PROG, adapter->flags);
+       if (!remove_in_prog)
+               idpf_vc_xn_shutdown(adapter->vcxn_mngr);
+
        idpf_deinit_task(adapter);
        idpf_intr_rel(adapter);
-       idpf_vc_xn_shutdown(adapter->vcxn_mngr);
+
+       if (remove_in_prog)
+               idpf_vc_xn_shutdown(adapter->vcxn_mngr);
 
        cancel_delayed_work_sync(&adapter->serv_task);
        cancel_delayed_work_sync(&adapter->mbx_task);