From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8FF6AA053B; Fri, 17 Jul 2020 16:28:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8499B1BF5F; Fri, 17 Jul 2020 16:28:35 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 24C721BF44 for ; Fri, 17 Jul 2020 16:28:34 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from viacheslavo@mellanox.com) with SMTP; 17 Jul 2020 17:28:32 +0300 Received: from pegasus12.mtr.labs.mlnx (pegasus12.mtr.labs.mlnx [10.210.17.40]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 06HESW2L000798; Fri, 17 Jul 2020 17:28:32 +0300 Received: from pegasus12.mtr.labs.mlnx (localhost [127.0.0.1]) by pegasus12.mtr.labs.mlnx (8.14.7/8.14.7) with ESMTP id 06HESWJd000415; Fri, 17 Jul 2020 14:28:32 GMT Received: (from viacheslavo@localhost) by pegasus12.mtr.labs.mlnx (8.14.7/8.14.7/Submit) id 06HESWJD000414; Fri, 17 Jul 2020 14:28:32 GMT X-Authentication-Warning: pegasus12.mtr.labs.mlnx: viacheslavo set sender to viacheslavo@mellanox.com using -f From: Viacheslav Ovsiienko To: dev@dpdk.org Cc: matan@mellanox.com, rasland@mellanox.com, thomas@monjalon.net Date: Fri, 17 Jul 2020 14:28:24 +0000 Message-Id: <1594996104-372-3-git-send-email-viacheslavo@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1594996104-372-1-git-send-email-viacheslavo@mellanox.com> References: <1591771085-24959-1-git-send-email-viacheslavo@mellanox.com> <1594996104-372-1-git-send-email-viacheslavo@mellanox.com> Subject: [dpdk-dev] [PATCH 3/3] common/mlx5: fix DevX register access opcode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The dedicated MLX5_CMD_OP_ACCESS_REGISTER_USER opcode must be used to read hardware register content from unprotected mode. Fixes: 737f44a25d97 ("common/mlx5: add register access DevX routine") Signed-off-by: Viacheslav Ovsiienko --- drivers/common/mlx5/mlx5_devx_cmds.c | 3 ++- drivers/common/mlx5/mlx5_prm.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c index 0cfa4dc..9f2f706 100644 --- a/drivers/common/mlx5/mlx5_devx_cmds.c +++ b/drivers/common/mlx5/mlx5_devx_cmds.c @@ -44,7 +44,8 @@ DRV_LOG(ERR, "Not enough buffer for register read data"); return -1; } - MLX5_SET(access_register_in, in, opcode, MLX5_CMD_OP_ACCESS_REGISTER); + MLX5_SET(access_register_in, in, opcode, + MLX5_CMD_OP_ACCESS_REGISTER_USER); MLX5_SET(access_register_in, in, op_mod, MLX5_ACCESS_REGISTER_IN_OP_MOD_READ); MLX5_SET(access_register_in, in, register_id, reg_id); diff --git a/drivers/common/mlx5/mlx5_prm.h b/drivers/common/mlx5/mlx5_prm.h index ec3b600..aba0368 100644 --- a/drivers/common/mlx5/mlx5_prm.h +++ b/drivers/common/mlx5/mlx5_prm.h @@ -806,6 +806,7 @@ enum { MLX5_CMD_OP_CREATE_GENERAL_OBJECT = 0xa00, MLX5_CMD_OP_MODIFY_GENERAL_OBJECT = 0xa01, MLX5_CMD_OP_QUERY_GENERAL_OBJECT = 0xa02, + MLX5_CMD_OP_ACCESS_REGISTER_USER = 0xB0C, }; enum { -- 1.8.3.1