From nobody Sat Dec 23 20:58:18 2023 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 4SyGj72BjGz550v5; Sat, 23 Dec 2023 20:58:19 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SyGj71WpSz4MPy; Sat, 23 Dec 2023 20:58:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703365099; 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=M1gXcV1fGbQFDMZQTUv2V/OXzDlteHrMT6RUceAU2XQ=; b=giAethcuA7kW9CISyTsXJJwNsvtLHsnj1z56WZyHQypOGKNV5Ybg8mrzpxSAvfOByws359 6cr88SmsDTgNF158YIgMMn6FOc/waQCHYC8eoyxenj3uDmg/1tjeNF5dvzKPjkFuN1yrLt mt85VO8zPnpKvxme1ptxmGuCFuwXLDQIHJ7CXJaUWsUgJD6q1ybXyvNG6qV8fxkr5Opxwi 0iG7TNU0WGmpVMHuhkOiLbAaru8Qi4vYz6ka9NyAMG1YSIlQT/bVPK0QOVadEevMjTQ5ox IduxqdcenA1tN+VjPsyrL6go8D76gTQ4xTWP33A+NH4pihOG1BKvVRChXT8BJA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1703365099; a=rsa-sha256; cv=none; b=OxeYmu+7g8TFwEZHrlSuVUw6HTaA9SQakNGD3LuMDZjeFEUp5+I7NYS0EB1jq/mY4/1dXd 2jX22KXzxD0ZawJOnP3qxof4o+IL8SLWq4a4Tyqe8gfoIHRMAcNk5owmgoNoiSNxKdFKDX UKiy04kMZXbABtfFIl1UMAyAWtKZsC2hTG5Xwc/NDz8izSyZ4SloLDhqgc2222z7/4OwGt tOIrFD7YS3HQUhyOHBedEQ8fKTV8nXHAQcUEmH/HHlMsonikvsUKmOfd7NhvXwyEzpetrH MoK7xLx/iBKID5JES85JvHUuIhYx5yB1n4v144tS33pzLzaxfW2ZW2whuXScNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1703365099; 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=M1gXcV1fGbQFDMZQTUv2V/OXzDlteHrMT6RUceAU2XQ=; b=pD3KI7SGZF6wtqI/QlEUTXvNp05DcmLBuZEbWSldbzdHCO4HbmgsW2to0IRaedeWi3LULz DBv4GY6YehkPnNoQD8JlzK3f85XXW+Ho8VcB7RP1LiGzvxejqNgqcZ0YbZtTTGC4Iw0twe aSLmu87IyX0ZgBzJMAgRldL4js5M1YxuJspI0gLGefL0H0m4C1V9G2SBmLa4aaZ2RMiQKc UH9drnd9w6bIZXe7ijgAnKXPMZzaOkVpyijvqfpFYiMgnH1cw6Pn6lPvZ86eMm8OPO05sJ 3uPa/b+ZqA8qGAcOrtoXvTlY46chjy17wRlwI663tZhKUL2w5Lb8oTUra5kHFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SyGj70Ywdz1Dkw; Sat, 23 Dec 2023 20:58:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BNKwI7V029687; Sat, 23 Dec 2023 20:58:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BNKwIUV029684; Sat, 23 Dec 2023 20:58:18 GMT (envelope-from git) Date: Sat, 23 Dec 2023 20:58:18 GMT Message-Id: <202312232058.3BNKwIUV029684@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 553ed8e38bfd - main - mlx4(5): fix driver initialization 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 553ed8e38bfdd4832deecdec1c0b023824dcff94 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=553ed8e38bfdd4832deecdec1c0b023824dcff94 commit 553ed8e38bfdd4832deecdec1c0b023824dcff94 Author: Yuji Hagiwara AuthorDate: 2023-12-23 20:53:02 +0000 Commit: Konstantin Belousov CommitDate: 2023-12-23 20:53:02 +0000 mlx4(5): fix driver initialization After netlinkification, ether_ifattach() requires ifmedia_init() to be done before it. PR: 275897 MFC after: 1 week --- sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c b/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c index c26afc0099b5..583de1816d1b 100644 --- a/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c +++ b/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c @@ -2293,7 +2293,6 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, dev_addr[ETHER_ADDR_LEN - 1 - i] = (u8) (priv->mac >> (8 * i)); - ether_ifattach(dev, dev_addr); if_link_state_change(dev, LINK_STATE_DOWN); ifmedia_init(&priv->media, IFM_IMASK | IFM_ETH_FMASK, mlx4_en_media_change, mlx4_en_media_status); @@ -2306,6 +2305,8 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port, DEBUGNET_SET(dev, mlx4_en); + ether_ifattach(dev, dev_addr); + en_warn(priv, "Using %d TX rings\n", prof->tx_ring_num); en_warn(priv, "Using %d RX rings\n", prof->rx_ring_num);