mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
drivers: Update timer APIs for Linux v6.15
In Linux v6.15, the timer APIs hrtimer_init() and del_timer() have been removed. The hrtimer_setup() was added in Linux v6.13 to replace hrtimer_init() and hrtimer_init() have finally been removed. The functions del_timer()/del_timer_sync() were renamed to timer_delete()/timer_delete_sync() in Linux v6.15. Use conftest to detect these changes and update the drivers as necessary. JIRA LINQPJ14-47 Change-Id: Id3994900384aad4b91155507cda91e04898ab12c Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3336168 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: Brad Griffis <bgriffis@nvidia.com> GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com> Reviewed-by: svcacv <svcacv@nvidia.com>
This commit is contained in:
@@ -3394,7 +3394,11 @@ int ether_close(struct net_device *ndev)
|
||||
int i;
|
||||
|
||||
#ifdef ETHER_NVGRO
|
||||
#if defined(NV_TIMER_DELETE_PRESENT) /* Linux v6.15 */
|
||||
timer_delete_sync(&pdata->nvgro_timer);
|
||||
#else
|
||||
del_timer_sync(&pdata->nvgro_timer);
|
||||
#endif
|
||||
/* TODO: purge the queues */
|
||||
#endif
|
||||
|
||||
@@ -7514,10 +7518,16 @@ int ether_probe(struct platform_device *pdev)
|
||||
chan = osi_dma->dma_chans[i];
|
||||
atomic_set(&pdata->tx_napi[chan]->tx_usecs_timer_armed,
|
||||
OSI_DISABLE);
|
||||
#if defined(NV_HRTIMER_SETUP_PRESENT) /* Linux v6.13 */
|
||||
hrtimer_setup(&pdata->tx_napi[chan]->tx_usecs_timer,
|
||||
ether_tx_usecs_hrtimer, CLOCK_MONOTONIC,
|
||||
HRTIMER_MODE_REL);
|
||||
#else
|
||||
hrtimer_init(&pdata->tx_napi[chan]->tx_usecs_timer,
|
||||
CLOCK_MONOTONIC, HRTIMER_MODE_REL);
|
||||
pdata->tx_napi[chan]->tx_usecs_timer.function =
|
||||
ether_tx_usecs_hrtimer;
|
||||
#endif
|
||||
}
|
||||
|
||||
ret = register_netdev(ndev);
|
||||
|
||||
Reference in New Issue
Block a user