Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1915318pxb; Thu, 16 Sep 2021 20:08:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+ED2MoMXl5MoOTx+kKihjhhQayEf82u4kgbIzuTLLDa2aWh4u8+ByuvonQWtZceTNU/Vo X-Received: by 2002:a17:906:bce5:: with SMTP id op5mr9794025ejb.59.1631848086626; Thu, 16 Sep 2021 20:08:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631848086; cv=none; d=google.com; s=arc-20160816; b=p4exYAhru5ih7FTN0NrBtxSx8oTudXformbrlODnD4/BZfRpHbGJRLxuoXdxoYDarC EQtyRT0pnN8JTjIONdr9SA7WGvPR1YY5/4wOOhmjWLT5QDLqsQseU1GQlPLgE0zHt5VA 3yE9TDti5f+VHSOdqu4+vYZLICnvwp40Zgq0bgbZ0YEJc1gVF6MaYaHxmg6DADNwvMxH qQZKBFNli6DzCPP1joTXC4gCE04mlSTsNoxeF4Az/VLBgJAtaVwjIedrrcrnSAFitsXB 5TDEJxZuT03pbuAp6mV5rkCkyVBeMtRcx0mO9lkd83BD5uepuR0pF0fr8DbKO32D0o8t D2AQ== 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=XY4E09iRVgAmz8vYiE7rc81LT57E7Rzi10lx4tm+0vA=; b=Rck8fAhluOWL9d0fq7IxylTH7q8OIK5oMoeE3UjNJtMSQahxiIAt+2Q5ysF6WseseZ D9hvBzJ+M1gniSuWajreglRjniuGmi+nu3tg+jdn5zlRcoC6dlHDkkKr8/WqfFUniDUB GQf6IA0CFXFy2VdVxOm8oVfj+FpQdnUyoDO3NJ3PyG3Jv5GnNZ0tSUVqJuK6OeMuLtGs MvKemZRCKJucX+h0Ov0fRof/q8oTc/k9NHXb/AqWxd7vNtamIA62rlZDrxYGKAGx1jdd BqR7OoyJgVplUNnU3HGvGn0oIVxrpAEKfgJPsRkgIM9KmLKflkibzsmPhy/fxm5YAaFU IgkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=XGCkruLR; 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 j88si6405446edc.569.2021.09.16.20.07.42; Thu, 16 Sep 2021 20:08:06 -0700 (PDT) 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=XGCkruLR; 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 S1347531AbhIPR0W (ORCPT + 99 others); Thu, 16 Sep 2021 13:26:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:43510 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351008AbhIPRSA (ORCPT ); Thu, 16 Sep 2021 13:18:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6716A61A0A; Thu, 16 Sep 2021 16:40:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631810449; bh=iLuBPChP8CnU6bCYsrI2zTFECfXArob8xnTlED8KBIs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XGCkruLRsq7RldVpZtH9ymT4lhi95J/5TbVJdKPZtVhAR0XxMFVVoJ0jq92tx7OAf 8M3gA7W+GZiCh7WANKlHMy4YWMHBcaN1R/dCrKN6gu2u6JSH9oR2c8z0A532KWlnfR wdJlpSFXhi+ew9Fsa+79Fr5i0OyAz3audtT5mdT4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lang Cheng , Wenpeng Liang , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.14 128/432] RDMA/hns: Ownerbit mode add control field Date: Thu, 16 Sep 2021 17:57:57 +0200 Message-Id: <20210916155815.094417837@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155810.813340753@linuxfoundation.org> References: <20210916155810.813340753@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: Lang Cheng [ Upstream commit f8c549afd1e76ad78b1d044a307783c9b94ae3ab ] The ownerbit mode is for external card mode. Make it controlled by the firmware. Fixes: aba457ca890c ("RDMA/hns: Support owner mode doorbell") Link: https://lore.kernel.org/r/1629539607-33217-4-git-send-email-liangwenpeng@huawei.com Signed-off-by: Lang Cheng Signed-off-by: Wenpeng Liang 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 594d4cef31b3..0e0be5664137 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -4114,6 +4114,9 @@ static void modify_qp_reset_to_init(struct ib_qp *ibqp, if (hr_qp->en_flags & HNS_ROCE_QP_CAP_RQ_RECORD_DB) hr_reg_enable(context, QPC_RQ_RECORD_EN); + if (hr_qp->en_flags & HNS_ROCE_QP_CAP_OWNER_DB) + hr_reg_enable(context, QPC_OWNER_MODE); + hr_reg_write(context, QPC_RQ_DB_RECORD_ADDR_L, lower_32_bits(hr_qp->rdb.dma) >> 1); hr_reg_write(context, QPC_RQ_DB_RECORD_ADDR_H, -- 2.30.2