From nobody Sat Sep 19 14:40:20 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hnBx14VNbz6srWT for ; Sat, 19 Sep 2026 14:40:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hnBx11yvLz4Wg9 for ; Sat, 19 Sep 2026 14:40:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789828821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HXcG/Uq5D27/QZyYgd3/lzWD51TkDI9i3RTGaVMhzp0=; b=Vb0xGxO6aVeHtsbVzMCIz9S9JmTvCpRuMMUgOVl2RrIA9fvFX09eOULuzyl7S6d7v/PY14 xItYH8H9w2seONgNzKZlDrwojGMRR2BCZcN3pSorgeX4FGG8+T6kYK0wi9LZHUIgcXG3no zeMT++jAjCYI80C7w/hAyqPlj8djmxtG4ad6qzcH32An76ZRg4BCrUE7NSPI9qQO3hHNW0 ft0hihYWZ/qkFq9neLS2kxcoyHkpOTCx4L4Dhbzgs6nwAw+OJIBsRf7aNP5Mhitb1keLE8 s0U921IyLhqBA5I6SYpDp33p8FEKvd3DXZhvVzGkH/h9/CMZPGr9xc5jd/mH/g== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1789828821; b=egKOVNWCQE+ad80d9Ps9uNV4NLPUjeIi3hGGqnRGD0pXi9oZPFUhIpZXXF+YuMgQvdGBq4 V761YMNz6y+Y+WYs/Hxwv97kH4aJqMr/CiSnAQ/paWV8gpIKywGks+5eQw18+nvSCYr/Ef F+ZgMO0wQuEtU3r8whEt0ZSiBapiQmpEQYhf4XYvPkA+OmS3Jeb9QOZlwpmlmpNNM04Sf+ ZNw01HwjUVRflL8QWIy5rfBtybKF/V8IMBt+0DV6S9XvUvJeIleGNDNrmPZOU1Gh86SZoI /KRwwuA8enmvlPDK1U4JCvml3TA7Ms3pxqYeCjOsmZ5ZJwoxC99Jre8cNyWn5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1789828821; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HXcG/Uq5D27/QZyYgd3/lzWD51TkDI9i3RTGaVMhzp0=; b=SR9hjtcw4vtAvOeJDRFudB/sNxW3uYhHgU5pHAweRR6t1sBntIGPmTpaNuz/NkICVU2Ezb pcLC5hTmEL31/wVtaVAKZGpn9EcEc0pQ6/qXeFdNucXC5vCQr34Y70TenCIqKqjL+hxk9s Ds4jETfo0ISQOUBstdtEin5K8yyNI1DwF608A5IPShKf+ELmU5WjxX28p5bmJUFuVxLWpB iQbNVZBrshNMXLz15q4InoneI8fanhLpJV9urrdBg3U3LNK3wkRZ3MFlMEkCSSN1IgstPO ul24bZq6znsKOGlu0H5PfRoQSVudyvL4aQ+3KpvHsRGN2fKwdQ4ulujRwCnLJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hnBx03RZ1z16t2 for ; Sat, 19 Sep 2026 14:40:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 188aa by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 19 Sep 2026 14:40:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Bjoern A. Zeeb Subject: git: e03abec93cf8 - stable/15 - mlx4: convert to timer_setup() Linux KPI List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: e03abec93cf811c359e82291a41e0dbb49e1ebf1 Auto-Submitted: auto-generated Date: Sat, 19 Sep 2026 14:40:20 +0000 Message-Id: <6aae9ed4.188aa.72ef06d7@gitrepo.freebsd.org> The branch stable/15 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=e03abec93cf811c359e82291a41e0dbb49e1ebf1 commit e03abec93cf811c359e82291a41e0dbb49e1ebf1 Author: Bjoern A. Zeeb AuthorDate: 2026-09-14 22:51:09 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-09-19 09:34:09 +0000 mlx4: convert to timer_setup() Linux KPI The Linux driver switched away from using this timer in e22979d96a55d. Locally adjust the code to use timer_setup/from_timer in order to get us out of Linux version 4.15 (and earlier) KPIs. Also, right away, apply 41cb08555c416 from_timer -> timer_container_of. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D59680 (cherry picked from commit 871c09c9b47eb0ef0f17a5a1fc2299dba7693516) --- sys/dev/mlx4/mlx4_en/en.h | 2 +- sys/dev/mlx4/mlx4_en/mlx4_en_cq.c | 4 +--- sys/dev/mlx4/mlx4_en/mlx4_en_tx.c | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/dev/mlx4/mlx4_en/en.h b/sys/dev/mlx4/mlx4_en/en.h index 838894f7b02f..dbe29f1d24ec 100644 --- a/sys/dev/mlx4/mlx4_en/en.h +++ b/sys/dev/mlx4/mlx4_en/en.h @@ -836,7 +836,7 @@ void mlx4_en_deactivate_rx_ring(struct mlx4_en_priv *priv, int mlx4_en_process_rx_cq(if_t dev, struct mlx4_en_cq *cq, int budget); -void mlx4_en_poll_tx_cq(unsigned long data); +void mlx4_en_poll_tx_cq(struct timer_list *t); void mlx4_en_fill_qp_context(struct mlx4_en_priv *priv, int size, int stride, int is_tx, int rss, int qpn, int cqn, int user_prio, struct mlx4_qp_context *context); diff --git a/sys/dev/mlx4/mlx4_en/mlx4_en_cq.c b/sys/dev/mlx4/mlx4_en/mlx4_en_cq.c index 1b198778bfdd..00a506d08663 100644 --- a/sys/dev/mlx4/mlx4_en/mlx4_en_cq.c +++ b/sys/dev/mlx4/mlx4_en/mlx4_en_cq.c @@ -164,9 +164,7 @@ int mlx4_en_activate_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq, cq->mcq.event = mlx4_en_cq_event; if (cq->is_tx) { - init_timer(&cq->timer); - cq->timer.function = mlx4_en_poll_tx_cq; - cq->timer.data = (unsigned long) cq; + timer_setup(&cq->timer, mlx4_en_poll_tx_cq, 0); } diff --git a/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c b/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c index d45ccacd7499..afb31cbb7104 100644 --- a/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c +++ b/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c @@ -433,9 +433,9 @@ void mlx4_en_tx_irq(struct mlx4_cq *mcq) spin_unlock(&ring->comp_lock); } -void mlx4_en_poll_tx_cq(unsigned long data) +void mlx4_en_poll_tx_cq(struct timer_list *t) { - struct mlx4_en_cq *cq = (struct mlx4_en_cq *) data; + struct mlx4_en_cq *cq = timer_container_of(cq, t, timer); struct mlx4_en_priv *priv = mlx4_netdev_priv(cq->dev); struct mlx4_en_tx_ring *ring = priv->tx_ring[cq->ring]; u32 inflight;