From: Stefan Assmann Date: Tue, 10 Jan 2023 08:00:18 +0000 (+0100) Subject: iavf: schedule watchdog immediately when changing primary MAC X-Git-Tag: v6.1.9~61 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=122d3a0ee454ac68b75834c9282fb30da3a675b1;p=platform%2Fkernel%2Flinux-starfive.git iavf: schedule watchdog immediately when changing primary MAC [ Upstream commit e2b53ea5a7c1fb484277ad12cd075f502cf03b04 ] iavf_replace_primary_mac() utilizes queue_work() to schedule the watchdog task but that only ensures that the watchdog task is queued to run. To make sure the watchdog is executed asap use mod_delayed_work(). Without this patch it may take up to 2s until the watchdog task gets executed, which may cause long delays when setting the MAC address. Fixes: a3e839d539e0 ("iavf: Add usage of new virtchnl format to set default MAC") Signed-off-by: Stefan Assmann Reviewed-by: Michal Schmidt Tested-by: Michal Schmidt Tested-by: Rafal Romanowski Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c index efc7735..3dad834 100644 --- a/drivers/net/ethernet/intel/iavf/iavf_main.c +++ b/drivers/net/ethernet/intel/iavf/iavf_main.c @@ -1033,7 +1033,7 @@ int iavf_replace_primary_mac(struct iavf_adapter *adapter, /* schedule the watchdog task to immediately process the request */ if (f) { - queue_work(adapter->wq, &adapter->watchdog_task.work); + mod_delayed_work(adapter->wq, &adapter->watchdog_task, 0); return 0; } return -ENOMEM;