The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=272138c279dd1954f3fb88d9e0b2874db74597a3
commit 272138c279dd1954f3fb88d9e0b2874db74597a3 Author: Bjoern A. Zeeb <[email protected]> AuthorDate: 2026-09-14 22:39:03 +0000 Commit: Bjoern A. Zeeb <[email protected]> CommitDate: 2026-09-17 21:15:05 +0000 mlx4: apply upstream changes to convert to timer_setup() Linux KPI Apply Linux change 55c0fcc3de460 "Convert timers to use timer_setup()" to get us out of Linux version 4.15 (and earlier) KPIs. Also apply 41cb08555c416 from_timer -> timer_container_of. MFC after: 3 days Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D59679 --- sys/dev/mlx4/mlx4_core/mlx4_catas.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/dev/mlx4/mlx4_core/mlx4_catas.c b/sys/dev/mlx4/mlx4_core/mlx4_catas.c index 165b8faa2896..3856147d1b53 100644 --- a/sys/dev/mlx4/mlx4_core/mlx4_catas.c +++ b/sys/dev/mlx4/mlx4_core/mlx4_catas.c @@ -226,10 +226,10 @@ static void dump_err_buf(struct mlx4_dev *dev) i, swab32(readl(priv->catas_err.map + i))); } -static void poll_catas(unsigned long dev_ptr) +static void poll_catas(struct timer_list *t) { - struct mlx4_dev *dev = (struct mlx4_dev *) dev_ptr; - struct mlx4_priv *priv = mlx4_priv(dev); + struct mlx4_priv *priv = timer_container_of(priv, t, catas_err.timer); + struct mlx4_dev *dev = &priv->dev; u32 slave_read; if (mlx4_is_slave(dev)) { @@ -272,7 +272,7 @@ void mlx4_start_catas_poll(struct mlx4_dev *dev) phys_addr_t addr; INIT_LIST_HEAD(&priv->catas_err.list); - init_timer(&priv->catas_err.timer); + timer_setup(&priv->catas_err.timer, poll_catas, 0); priv->catas_err.map = NULL; if (!mlx4_is_slave(dev)) { @@ -288,8 +288,6 @@ void mlx4_start_catas_poll(struct mlx4_dev *dev) } } - priv->catas_err.timer.data = (unsigned long) dev; - priv->catas_err.timer.function = poll_catas; priv->catas_err.timer.expires = round_jiffies(jiffies + MLX4_CATAS_POLL_INTERVAL); add_timer(&priv->catas_err.timer);
