[next,S94,09/13] i40e: Set netdev_registered when registering netdev in recovery mode

Message ID 20180802004036.89363-9-alice.michael@intel.com
State Superseded
Delegated to: Jeff Kirsher
Headers show
  • Untitled series #58958
Related show

Commit Message

Alice Michael Aug. 2, 2018, 12:40 a.m.
From: Patryk Małek <patryk.malek@intel.com>

When initializing adapter in recovery mode we've forgotten to set
netdev_registered to true causing kernel BUGs when we unload the module
after successful recovery. This patch sets this flag correctly as it was
supposed to be set.

Signed-off-by: Patryk Małek <patryk.malek@intel.com>
 drivers/net/ethernet/intel/i40e/i40e_main.c | 1 +
 1 file changed, 1 insertion(+)


diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 725b2de..ca701e0 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -13694,6 +13694,7 @@  static int i40e_init_recovery_mode(struct i40e_pf *pf, struct i40e_hw *hw)
 	err = register_netdev(vsi->netdev);
 	if (err)
 		goto err_switch_setup;
+	vsi->netdev_registered = true;
 	err = i40e_setup_misc_vector_for_recovery_mode(pf);