iavf: Fix missing check for running netdev
Subsystems (2)
PATCH 7/8 iavf: Fix missing check for running netdev
From: SlawomirX Laba <[email protected]>
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.
--- drivers/net/ethernet/intel/iavf/iavf_main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/net/ethernet/intel/iavf/iavf_main.c +5 -2
@@ -3905,8 +3905,11 @@ static int iavf_change_mtu(struct net_device *netdev, int new_mtu)iavf_notify_client_l2_params (&adapter->vsi); adapter->flags |=IAVF_FLAG_SERVICE_CLIENT_REQUESTED ; } - adapter->flags |=IAVF_FLAG_RESET_NEEDED ; -queue_work (iavf_wq, &adapter->reset_task); + +if (netif_running (netdev)) { + adapter->flags |=IAVF_FLAG_RESET_NEEDED ; +queue_work (iavf_wq, &adapter->reset_task); + }return 0 ; }
Signature · 1 line
2.27.0
Jankowski
PATCH 7/8 iavf: Fix missing check for running netdev
drivers/net/ethernet/intel/iavf/iavf_main.c static int iavf_change_mtu(struct net_device
Quoted 35 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Mateusz Palczewski
Sent: Wednesday, February 23, 2022 1:39 PM
To: intel-wired-lan at lists.osuosl.org
Cc: Laba, SlawomirX <[email protected]>; Burra, Phani R <[email protected]>; Palczewski, Mateusz <[email protected]>
Subject: [Intel-wired-lan] [PATCH net v1 7/8] iavf: Fix missing check for running netdevFrom: SlawomirX Laba <[email protected]>
The driver was queueing
reset_taskregardless of the netdev state.Do not queue the reset task in
iavf_change_mtuif netdev is not running.Fixes fdd4044ffdc8 ("iavf: Remove timer for work triggering, use delayingwork instead")
Signed-off-by Slawomir Laba <[email protected]>Signed-off-by Phani Burra <[email protected]>Signed-off-by Jacob Keller <[email protected]>Signed-off-by Mateusz Palczewski <[email protected]>--- drivers/net/ethernet/intel/iavf/iavf_main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)drivers/net/ethernet/intel/iavf/iavf_main.c +0
-0@@ -3905,8 +3905,11 @@ static int iavf_change_mtu(struct net_device