Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp4563658pja; Thu, 21 Nov 2019 21:57:04 -0800 (PST) X-Google-Smtp-Source: APXvYqw1Q1zzObRUBQCaM+ylCfsj6g+B7qotQW8POm7t0VUtR1KFuB6xJRWqem/5gYzseC/buB+B X-Received: by 2002:a17:906:4dda:: with SMTP id f26mr19769942ejw.89.1574402224099; Thu, 21 Nov 2019 21:57:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574402224; cv=none; d=google.com; s=arc-20160816; b=nWEJzGNch319e8R0BkYWGpKVq6gy9p5jEDFGabtThXO3dI6w8UC3W5521a9o9fMwSU P7ZJikR/o6LMg2vc7o0ihAwYG8x1WpV8/EfeMrwkUJOKRwf7il3HU1v2cyiGAhOWWEX+ K7VTbOExTraS20ZNL/GwXwzLY2+iEQs3EhOm41iM3VDIRow5ivRkO+b4hv4IzbGRdSCR q84jaeHBlh1a832Yt0Z7xKnIi4GdgtoyOaBl5q7wKJujqCpBx1SzTNx5HYtheOaPi8Hm J4WkSWXBuyHf8UBoJiA3wbvSdPgGH6uqSNFSFXzO+eXZlszNyvliYzOid8bPH4BmT3Kz KEGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=YPJi3qk4T2u16HEG9F/+14E6ydQfTDxtdFItxlawoqc=; b=n3sOuvGSUiF0Ggb2waI4aY1NFJlmJrY3oGdbvCm2RGk5qooGRZv9+tPGV0qSFPB9Ra WY0rnw7Js6o9dmACchpN3CTR9WB1DQHjGas1XTPMCdi5rGukVGY/zEYKxOIEBzsLQxR7 td5P9SAmF6oC6S701Er2He+i+M8Fj8EGDRoc7SaQTVh95Jcl/2dnsPXzaF2XX/G+MHS8 6ydNrNZZDxr8HkS1tQeDiYRET7o4cavZ65Qx8a8k1yWeIcRrX2i9WP+zHwjoHTWDihP+ aO/sNnL+PPGbdIYSBBzunoB/maeZLrexLTs9lC/1GupCXhzlTgWiotXq2VTA4GxLt+oR NEjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OOuvu0je; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t14si3468676ejj.363.2019.11.21.21.56.40; Thu, 21 Nov 2019 21:57:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OOuvu0je; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728852AbfKVFxX (ORCPT + 99 others); Fri, 22 Nov 2019 00:53:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:59318 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728818AbfKVFxQ (ORCPT ); Fri, 22 Nov 2019 00:53:16 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DDEB220855; Fri, 22 Nov 2019 05:53:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574401995; bh=vcbbtx5fa7hoC405k+4mun5v2mhS5aagt5+8weXXYMo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OOuvu0jeE5lq6VwHMnnXCG0SY51Z6Z1Vnytt53aFqSgPqIAlqw0r+P0JxMllVK1JV xkPlQzUeIOzeTadFao+YElWk7gVGZcAUKcQ9gdO3d3F9WvSITb0R/gxVQjuv1zrn51 K8nD5pSaFeN344uXdgxl3foLpruruAGB43PbMw1w= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Yixian Liu , Jason Gunthorpe , Sasha Levin , linux-rdma@vger.kernel.org Subject: [PATCH AUTOSEL 4.19 213/219] RDMA/hns: Fix the state of rereg mr Date: Fri, 22 Nov 2019 00:49:04 -0500 Message-Id: <20191122054911.1750-205-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191122054911.1750-1-sashal@kernel.org> References: <20191122054911.1750-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yixian Liu [ Upstream commit ab22bf05216a6bb4812448f3a8609489047cf311 ] The state of mr after reregister operation should be set to valid state. Otherwise, it will keep the same as the state before reregistered. Signed-off-by: Yixian Liu Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c index 587db5cf3be15..9ab3ab3c4219f 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -1773,6 +1773,9 @@ static int hns_roce_v2_rereg_write_mtpt(struct hns_roce_dev *hr_dev, struct hns_roce_v2_mpt_entry *mpt_entry = mb_buf; int ret = 0; + roce_set_field(mpt_entry->byte_4_pd_hop_st, V2_MPT_BYTE_4_MPT_ST_M, + V2_MPT_BYTE_4_MPT_ST_S, V2_MPT_ST_VALID); + if (flags & IB_MR_REREG_PD) { roce_set_field(mpt_entry->byte_4_pd_hop_st, V2_MPT_BYTE_4_PD_M, V2_MPT_BYTE_4_PD_S, pdn); -- 2.20.1