From e9222d366fcaefc4bb42ade7e43927e7495752e7 Mon Sep 17 00:00:00 2001 From: Bhadram Varka Date: Fri, 8 Oct 2021 19:48:27 +0530 Subject: [PATCH] nvethernet: clear tx_usecs_timer_armed atomic variable Issue: If the interface goes down by setting tx_usecs_timer_armed to OSI_ENABLE then after interface is up Tx timer will not be fired because tx_usecs_timer_armed is set to OSI_ENABLE. Fix: Clear tx_usecs_timer_armed when interface going down. Bug 3371010 Change-Id: I130f9ae9a949dd77882d191bc4e1220f8245d4b0 Signed-off-by: Bhadram Varka Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2607837 Tested-by: mobile promotions Reviewed-by: Narayan Reddy Reviewed-by: svc_kernel_abi Reviewed-by: Srinivas Ramachandran Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit --- drivers/net/ethernet/nvidia/nvethernet/ether_linux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/nvidia/nvethernet/ether_linux.c b/drivers/net/ethernet/nvidia/nvethernet/ether_linux.c index 71f1e39f..14866d94 100644 --- a/drivers/net/ethernet/nvidia/nvethernet/ether_linux.c +++ b/drivers/net/ethernet/nvidia/nvethernet/ether_linux.c @@ -2681,6 +2681,8 @@ static int ether_close(struct net_device *ndev) if (atomic_read(&pdata->tx_napi[chan]->tx_usecs_timer_armed) == OSI_ENABLE) { hrtimer_cancel(&pdata->tx_napi[chan]->tx_usecs_timer); + atomic_set(&pdata->tx_napi[chan]->tx_usecs_timer_armed, + OSI_DISABLE); } }