git: 814cd919981e - main - mlx5(4): convert to timer_setup() linuxKPI
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 19 Aug 2026 23:17:17 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=814cd919981e98120c3065906092dca2546fdd74
commit 814cd919981e98120c3065906092dca2546fdd74
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-08-19 02:13:20 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-08-19 23:16:53 +0000
mlx5(4): convert to timer_setup() linuxKPI
Reviewed by: bz
Sponsored by: NVidia networking
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D58941
---
sys/dev/mlx5/mlx5_core/mlx5_health.c | 6 +++---
sys/dev/mlx5/mlx5_ib/mlx5_ib_mr.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/sys/dev/mlx5/mlx5_core/mlx5_health.c b/sys/dev/mlx5/mlx5_core/mlx5_health.c
index bedd51eb02e4..5a33e2dc2edc 100644
--- a/sys/dev/mlx5/mlx5_core/mlx5_health.c
+++ b/sys/dev/mlx5/mlx5_core/mlx5_health.c
@@ -608,9 +608,9 @@ mlx5_trigger_health_watchdog(struct mlx5_core_dev *dev)
spin_unlock_irqrestore(&health->wq_lock, flags);
}
-static void poll_health(unsigned long data)
+static void poll_health(struct timer_list *timer)
{
- struct mlx5_core_dev *dev = (struct mlx5_core_dev *)data;
+ struct mlx5_core_dev *dev = timer_container_of(dev, timer, priv.health.timer);
struct mlx5_core_health *health = &dev->priv.health;
u32 fatal_error;
u32 count;
@@ -656,7 +656,7 @@ void mlx5_start_health_poll(struct mlx5_core_dev *dev)
health->health = &dev->iseg->health;
health->health_counter = &dev->iseg->health_counter;
- setup_timer(&health->timer, poll_health, (unsigned long)dev);
+ timer_setup(&health->timer, poll_health, 0);
mod_timer(&health->timer,
round_jiffies(jiffies + MLX5_HEALTH_POLL_INTERVAL));
diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib_mr.c b/sys/dev/mlx5/mlx5_ib/mlx5_ib_mr.c
index 50219d922f54..d28ecb4a1761 100644
--- a/sys/dev/mlx5/mlx5_ib/mlx5_ib_mr.c
+++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib_mr.c
@@ -410,9 +410,9 @@ static void clean_keys(struct mlx5_ib_dev *dev, int c)
}
}
-static void delay_time_func(unsigned long ctx)
+static void delay_time_func(struct timer_list *timer)
{
- struct mlx5_ib_dev *dev = (struct mlx5_ib_dev *)ctx;
+ struct mlx5_ib_dev *dev = timer_container_of(dev, timer, delay_timer);
dev->fill_delay = 0;
}
@@ -432,7 +432,7 @@ int mlx5_mr_cache_init(struct mlx5_ib_dev *dev)
}
mlx5_cmd_init_async_ctx(dev->mdev, &dev->async_ctx);
- setup_timer(&dev->delay_timer, delay_time_func, (unsigned long)dev);
+ timer_setup(&dev->delay_timer, delay_time_func, 0);
for (i = 0; i < MAX_MR_CACHE_ENTRIES; i++) {
INIT_LIST_HEAD(&cache->ent[i].head);
spin_lock_init(&cache->ent[i].lock);