Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3539957pxb; Mon, 1 Mar 2021 12:45:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJwPXHMv46CT1aWkgxUV3GUkfggFvnqHrwrsQTJLo5GoTALDQSClr9E1tP42nczjO2Arp9rv X-Received: by 2002:a17:906:304a:: with SMTP id d10mr17471690ejd.507.1614631512730; Mon, 01 Mar 2021 12:45:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614631512; cv=none; d=google.com; s=arc-20160816; b=MoQkTMMb73BLEUBSqUxfhGfjVYhYb70D4TSt9UujvIwZxCrxUKMJIMYwjI02aut7am GT8KTVPzVfpr6cNJkd+2j0ELKPCRAX48DZjiZM2ma/83L7JA3IDoF7S5BKz2Pr/CPDih gmcxMCMsTmZT++ph5IR4SfjeW2WKKzAwLDCHhAJEORAeS9bQ3lV71bWk0ifZOm6kwb+g boPVLbsK3YAQr5YMyrZkBFt3KaCHgunNfDl8A30mtHxhmbZwsoBPvKD06vtc95bJDVNF 6cX52bLs1ftlhK/c5pKip+hcdD+nfFmx0sy9btk58I0MpQQH2oKdcKxIaCR/z3+2+e4e nUkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Xqj9tSck3NXakVcNBiFRYucPOTYaDq2TgvgRBBMIWhM=; b=BCa9b8Znoo83eNP10ZHu0Cl58DbIC+nz5JCo8Eetv3S5051qMxkPwpOeVUncjBfQmV WfMBzAoTrxYwxN+Xhbb/YMnNLUcSjTepJEkmBxIkNqDcPaHn9DBWi+sRZ6a42BCbNYLr 7m3oO8XNZhqni2xQNQrm0VQnFym7wZjOeH7EgZcHcZORY+KI1yOuVSx/S8Msk00y8AdC JhAHDtWGfNXTULhvtAuudS/c3g53ysu7pM4Lle+iujlMadhLxe2pa5+d/1BrNK4ZxPs1 8Brd+drKuTv1LAkeLcIp3p0yxCMZILMYZICxm6hMORoq/CyH0hRlCAEs/0f0x9MkCvf7 GWRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ht2xxUBf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ho34si11796690ejc.343.2021.03.01.12.44.49; Mon, 01 Mar 2021 12:45:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Ht2xxUBf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243368AbhCAUlV (ORCPT + 99 others); Mon, 1 Mar 2021 15:41:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:35316 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237551AbhCARIX (ORCPT ); Mon, 1 Mar 2021 12:08:23 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1BCAA64F8B; Mon, 1 Mar 2021 16:41:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1614616889; bh=wGtf7uSH0lB1ZKccT1oMWhaigWooiN5IOIZcq6NlqRQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ht2xxUBfoYnesM7jqCZhYD28A0/ymEJlVMaPHI+2I4D/IJQWbGCfX9pseNX0aSJo6 Rufct7gqaX3evpMNhfaDvsMd2aIXrgSzjGli13w/pU2ZbWKg3W3E003F4T61ZZWdHB WNNhkEOWs+DDQsJMNwOebmkX/0YkLwsIUJpboOqM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yishai Hadas , Leon Romanovsky , Jason Gunthorpe , Sasha Levin Subject: [PATCH 4.19 123/247] RDMA/mlx5: Use the correct obj_id upon DEVX TIR creation Date: Mon, 1 Mar 2021 17:12:23 +0100 Message-Id: <20210301161037.692173928@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210301161031.684018251@linuxfoundation.org> References: <20210301161031.684018251@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yishai Hadas [ Upstream commit 8798e4ad0abe0ba1221928a46561981c510be0c6 ] Use the correct obj_id upon DEVX TIR creation by strictly taking the tirn 24 bits and not the general obj_id which is 32 bits. Fixes: 7efce3691d33 ("IB/mlx5: Add obj create and destroy functionality") Link: https://lore.kernel.org/r/20201230130121.180350-2-leon@kernel.org Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/mlx5/devx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/mlx5/devx.c b/drivers/infiniband/hw/mlx5/devx.c index 4c90a007e09db..c89aec834972e 100644 --- a/drivers/infiniband/hw/mlx5/devx.c +++ b/drivers/infiniband/hw/mlx5/devx.c @@ -572,7 +572,9 @@ static void devx_obj_build_destroy_cmd(void *in, void *out, void *din, MLX5_SET(general_obj_in_cmd_hdr, din, opcode, MLX5_CMD_OP_DESTROY_RQT); break; case MLX5_CMD_OP_CREATE_TIR: - MLX5_SET(general_obj_in_cmd_hdr, din, opcode, MLX5_CMD_OP_DESTROY_TIR); + *obj_id = MLX5_GET(create_tir_out, out, tirn); + MLX5_SET(destroy_tir_in, din, opcode, MLX5_CMD_OP_DESTROY_TIR); + MLX5_SET(destroy_tir_in, din, tirn, *obj_id); break; case MLX5_CMD_OP_CREATE_TIS: MLX5_SET(general_obj_in_cmd_hdr, din, opcode, MLX5_CMD_OP_DESTROY_TIS); -- 2.27.0