Skip to contentSkip to conversation

idpf: deinit virtchnl transaction manager after vport and vectors

PATCH In review Larysa Zaremba 2 participants 2 messages Sep 4, 2024 – Sep 24, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 idpf: deinit virtchnl transaction manager after vport and vectors

When the device is removed, idpf is supposed to make certain virtchnl requests e.g. VIRTCHNL2_OP_DEALLOC_VECTORS and VIRTCHNL2_OP_DESTROY_VPORT.

However, this does not happen due to the referenced commit introducing virtchnl transaction manager and placing its deinitialization before those messages are sent. Then the sending is impossible due to no transactions being available.

Lack of cleanup can lead to the FW becoming unresponsive from e.g. unloading-loading the driver and creating-destroying VFs afterwards.

Move transaction manager deinitialization to after other virtchnl-related cleanup is done.

Fixes 34c21fa894a1 ("idpf: implement virtchnl transaction manager")
---
 drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/idpf/idpf_virtchnl.c +1 -1
index a5f9b7a5effe..f18f490dafd8 100644
@@ -3040,9 +3040,9 @@ void idpf_vc_core_deinit(struct idpf_adapter *adapter)
 	if (!test_bit(IDPF_VC_CORE_INIT, adapter->flags))
 		return;
 
-	idpf_vc_xn_shutdown(adapter->vcxn_mngr);
 	idpf_deinit_task(adapter);
 	idpf_intr_rel(adapter);
+	idpf_vc_xn_shutdown(adapter->vcxn_mngr);
 
 	cancel_delayed_work_sync(&adapter->serv_task);
 	cancel_delayed_work_sync(&adapter->mbx_task);
Signature · 1 line
2.45.0
Tested-by on v1 1/1
#1 lore raw

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

Quoted 45 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Larysa Zaremba
Sent: Wednesday, September 4, 2024 2:54 AM
To: [email protected]; Nguyen, Anthony L <[email protected]>
Cc: Tantilov, Emil S <[email protected]>; Zaremba, Larysa <[email protected]>; Kitszel, Przemyslaw <[email protected]>; Hay, Joshua A <[email protected]>; [email protected]; Bagnucki, Igor <[email protected]>; Lobakin, Aleksander <[email protected]>; Eric Dumazet <[email protected]>; Kubiak, Michal <[email protected]>; Alan Brady <[email protected]>; [email protected]; Jakub Kicinski <[email protected]>; Paolo Abeni <[email protected]>; David S. Miller <[email protected]>
Subject: [Intel-wired-lan] [PATCH iwl-net] idpf: deinit virtchnl transaction manager after vport and vectors

When the device is removed, idpf is supposed to make certain virtchnl requests e.g. VIRTCHNL2_OP_DEALLOC_VECTORS and VIRTCHNL2_OP_DESTROY_VPORT.

However, this does not happen due to the referenced commit introducing virtchnl transaction manager and placing its deinitialization before those messages are sent. Then the sending is impossible due to no transactions being available.

Lack of cleanup can lead to the FW becoming unresponsive from e.g. unloading-loading the driver and creating-destroying VFs afterwards.

Move transaction manager deinitialization to after other virtchnl-related cleanup is done.

Fixes 34c21fa894a1 ("idpf: implement virtchnl transaction manager")
---
 drivers/net/ethernet/intel/idpf/idpf_virtchnl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/idpf/idpf_virtchnl.c +0 -0
index a5f9b7a5effe..f18f490dafd8 100644