Skip to content

Commit d2c0f45

Browse files
SlawomirLabaanguy11
authored andcommitted
iavf: Fix missing check for running netdev
The driver was queueing reset_task regardless of the netdev state. Do not queue the reset task in iavf_change_mtu if netdev is not running. Fixes: fdd4044 ("iavf: Remove timer for work triggering, use delaying work instead") Signed-off-by: Slawomir Laba <slawomirx.laba@intel.com> Signed-off-by: Phani Burra <phani.r.burra@intel.com> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Mateusz Palczewski <mateusz.palczewski@intel.com> Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
1 parent e85ff9c commit d2c0f45

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

drivers/net/ethernet/intel/iavf/iavf_main.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3905,8 +3905,11 @@ static int iavf_change_mtu(struct net_device *netdev, int new_mtu)
39053905
iavf_notify_client_l2_params(&adapter->vsi);
39063906
adapter->flags |= IAVF_FLAG_SERVICE_CLIENT_REQUESTED;
39073907
}
3908-
adapter->flags |= IAVF_FLAG_RESET_NEEDED;
3909-
queue_work(iavf_wq, &adapter->reset_task);
3908+
3909+
if (netif_running(netdev)) {
3910+
adapter->flags |= IAVF_FLAG_RESET_NEEDED;
3911+
queue_work(iavf_wq, &adapter->reset_task);
3912+
}
39103913

39113914
return 0;
39123915
}

0 commit comments

Comments
 (0)