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 <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2607837
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
This commit is contained in:
Bhadram Varka
2021-10-08 19:48:27 +05:30
committed by Revanth Kumar Uppala
parent 4b71306a35
commit e9222d366f

View File

@@ -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);
}
}