From nobody Wed Dec 06 00:28:24 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 4SlJCr4QgGz53grq; Wed, 6 Dec 2023 00:28:24 +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 4SlJCr3jQbz4NNn; Wed, 6 Dec 2023 00:28:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701822504; 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=roFt87bEtczL2T5gHGwBxhIqwGl6io6ijzBD0Ow3vMQ=; b=aa01putXEHqD2fsbhTDIgfCSRoPQNhQCw6d0HT8RlngNwQZEygJ3aYbzcdiTaaY52Jt7+d jHBU2/LdifisIq8oyMaWv2oPczedzwOE6MF9zvncSNDqktTCXPGU/sesXS3p/j9OzDc0HM vNJ0+JfLHveLvl+i/IZPbuysHuwUazvH1gzacfWCoCA7P+6/kYFrduiXb5QOboTGRaJwz+ CtyGf2wNOFy7UDo6ou8vbggI70KKvsbpJt6Iy5DWhotaa0iMHXQ46WLk2YXd/ZIqUqsYLZ CZVgpxjnPyin+5MuUpiDybEQ1H38c97cA1Oo9wa3C8k8SHhrL1a9IYfu6PfQTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701822504; a=rsa-sha256; cv=none; b=Fyjt2Yg9BDGfgQthJqxisbl1d6C7MSdT/5gCaESWmHMIbTld4+i6VbT5Dc7wBCzrLoAnqX kqVh8O7FOhQk00P6k5yWIy2u7jaFc9nRae35KYJMYLFxGj9pCPBMwNOf1qVFFCpndaSTsi k88oJhgSVC9QFiyFqi/kBISviU415Ah1Hp2Mz/FwYTvV5cq3oKRYpqTWZMsr0ua5/v+3t4 Pj3OLQ0PkOUokbixgwBbfMwVR0GgChqFqy6XYNIoAX7JqXiNB8RegnQXfMYKSsr/io7Db+ x/53z/erea4SCc1B0wywOwWOwp0rP+G8Y6ngvUUp+eLaeAY6Uyoj9xNwPO/b/A== 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=1701822504; 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=roFt87bEtczL2T5gHGwBxhIqwGl6io6ijzBD0Ow3vMQ=; b=dyWc0jEH2ObiID2KVaSm7P8Sg5MIe67ESMpTNFyz3aHjv2OIeLu1oBO875ptooGk7G16GN UkAl6ywArUOO+jvvSXkUbQvnvx6YCOCvdRQwjze4KwtU4RzwcnIEDs5x2NQTrpyhCKJTe+ mZ5JfnBdQDjaUgRbUi9F1vAFpI82SmdsmOlAtWCGY/RxFzxsi+k5wjmYpaS/IpGwyXuwT2 BQYReI8oXBPdv2ioKFNKmGC+T+nYCEh0uiA4EZEOA1UZp3p8kvxEfmgCu3qqPgYf0Ffy6e Y8iMRq5mpG+B/ajuVdrG4fk5xzVwIPc7tRF/IYIR4M+JX8ZIN/g4ke8fURophw== 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 4SlJCr2n5mzXZg; Wed, 6 Dec 2023 00:28:24 +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 3B60SO8N012796; Wed, 6 Dec 2023 00:28:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3B60SOHr012792; Wed, 6 Dec 2023 00:28:24 GMT (envelope-from git) Date: Wed, 6 Dec 2023 00:28:24 GMT Message-Id: <202312060028.3B60SOHr012792@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 0312449c67a8 - stable/14 - mlx5: Fix HCA cap 2 query 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 0312449c67a841ca73f0b54307112724ce5b9875 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0312449c67a841ca73f0b54307112724ce5b9875 commit 0312449c67a841ca73f0b54307112724ce5b9875 Author: Patrisious Haddad AuthorDate: 2023-05-11 09:48:26 +0000 Commit: Konstantin Belousov CommitDate: 2023-12-06 00:27:14 +0000 mlx5: Fix HCA cap 2 query (cherry picked from commit 0cd90ee598cef68cef72db8b912241868d1067d0) --- sys/dev/mlx5/mlx5_core/mlx5_main.c | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/sys/dev/mlx5/mlx5_core/mlx5_main.c b/sys/dev/mlx5/mlx5_core/mlx5_main.c index efaf726e19e5..f6dc1158f085 100644 --- a/sys/dev/mlx5/mlx5_core/mlx5_main.c +++ b/sys/dev/mlx5/mlx5_core/mlx5_main.c @@ -561,39 +561,15 @@ static int handle_hca_cap_atomic(struct mlx5_core_dev *dev) static int handle_hca_cap_2(struct mlx5_core_dev *dev) { - void *set_ctx; - void *set_hca_cap; - int set_sz = MLX5_ST_SZ_BYTES(set_hca_cap_in); int err; if (MLX5_CAP_GEN_MAX(dev, hca_cap_2)) { err = mlx5_core_get_caps(dev, MLX5_CAP_GENERAL_2); if (err) return err; - } else { - return 0; } - /* To be added if sw_vhca support was added */ - /*if (!MLX5_CAP_GEN_2_MAX(dev, sw_vhca_id_valid) || - !(dev->priv.sw_vhca_id > 0)) - return 0;*/ - - set_ctx = kzalloc(set_sz, GFP_KERNEL); - if (!set_ctx) - return -ENOMEM; - - MLX5_SET(set_hca_cap_in, set_ctx, op_mod, - MLX5_CAP_GENERAL_2 << 1); - set_hca_cap = MLX5_ADDR_OF(set_hca_cap_in, set_ctx, capability); - memcpy(set_hca_cap, dev->hca_caps_cur[MLX5_CAP_GENERAL_2], - MLX5_ST_SZ_BYTES(cmd_hca_cap_2)); - //MLX5_SET(cmd_hca_cap_2, set_hca_cap, sw_vhca_id_valid, 1); - - err = set_caps(dev, set_ctx, set_sz); - - kfree(set_ctx); - return err; + return 0; } static int set_hca_ctrl(struct mlx5_core_dev *dev)