Skip to content

Commit 137da75

Browse files
etantilovanguy11
authored andcommitted
idpf: fix transaction timeouts on reset
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: 09d0fb5 ("idpf: deinit virtchnl transaction manager after vport and vectors") Reviewed-by: Larysa Zaremba <[email protected]> Signed-off-by: Emil Tantilov <[email protected]> Reviewed-by: Simon Horman <[email protected]> Tested-by: Krishneil Singh <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
1 parent 396f016 commit 137da75

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

drivers/net/ethernet/intel/idpf/idpf_virtchnl.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3077,12 +3077,21 @@ int idpf_vc_core_init(struct idpf_adapter *adapter)
30773077
*/
30783078
void idpf_vc_core_deinit(struct idpf_adapter *adapter)
30793079
{
3080+
bool remove_in_prog;
3081+
30803082
if (!test_bit(IDPF_VC_CORE_INIT, adapter->flags))
30813083
return;
30823084

3085+
/* Avoid transaction timeouts when called during reset */
3086+
remove_in_prog = test_bit(IDPF_REMOVE_IN_PROG, adapter->flags);
3087+
if (!remove_in_prog)
3088+
idpf_vc_xn_shutdown(adapter->vcxn_mngr);
3089+
30833090
idpf_deinit_task(adapter);
30843091
idpf_intr_rel(adapter);
3085-
idpf_vc_xn_shutdown(adapter->vcxn_mngr);
3092+
3093+
if (remove_in_prog)
3094+
idpf_vc_xn_shutdown(adapter->vcxn_mngr);
30863095

30873096
cancel_delayed_work_sync(&adapter->serv_task);
30883097
cancel_delayed_work_sync(&adapter->mbx_task);

0 commit comments

Comments
 (0)