Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp11990495rwb; Sat, 26 Nov 2022 02:41:19 -0800 (PST) X-Google-Smtp-Source: AA0mqf7JD7j/zO6gcbF/GRlnU8ohGOHk0dMEf4de5NOvNwOc8+n16U+fBDWqz2qkJR7M9vSG61tt X-Received: by 2002:a17:906:70c2:b0:7ae:d58e:3a4a with SMTP id g2-20020a17090670c200b007aed58e3a4amr19690088ejk.332.1669459279377; Sat, 26 Nov 2022 02:41:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669459279; cv=none; d=google.com; s=arc-20160816; b=srs0WNGoQzBGpsEXiEc5weMD1lN9wnBXNVxn1kvMrzuo4woTvS1JW4PgpxSauD3Q/Z kxaUORFkWbv1F9Q45rw2YY//pMNmQ4U5xjx9tMvZOGNm3npQG9oYnYaWT485EGF2NIZV B3OnGh3/eYRqIOSluK2t//yFLOIOc4XCg28UYpziaLK8xTX2Dkn7guR3Eu8bdmbaEINR WVcqmPW9nFXnzqpI56CDbUSLT/0nP2xO7ZmFkCIdm/G+ivcYKmUDrZsl8zIy7Lxwfq5A /L0ed+ONXnoTVl4sUaYwxmGu4MYVqOBQPafmvlRhDslAH8YhDButFGhcjiSeISqhZ0KY YNLA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=YXxSyp3UG+iANzyE6hsHek8ef0+Q15zHCXyC+fFzaPM=; b=KIKGzOZTMQ3e/yblykV5RYJbsd5WtR+YVpODqaIAlOgnFAGT5kOdpTfg8u/x8aA+LM VpEqvXpVFvKyC84FJB3uq9MUqgwE/2keS5DR1qaVMUi2UJ1ZJHfEPrP7bEvdMqGF5MOz SmUuA3Zrfs05qpcpFoXufxPpjN2tlnKX+/8vaB6PcOYQAJj2edRQ3uTOMucSNVikuo3m EPv0xgR5ZJimWxoQtjACX47EjjAgaM/flGzNz+FGYG0s74C5GehARhNMpp/2KueSH0KH Md0QyY2phHePKV3PtYbjsOnHGjzgd4Oj+4YEDew0bNnwYEsSuvKjLdW6mQLoDttTfJXO uI4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=hisilicon.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ae12-20020a17090725cc00b00781a47397b1si5409379ejc.502.2022.11.26.02.40.58; Sat, 26 Nov 2022 02:41:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=hisilicon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229627AbiKZKab (ORCPT + 84 others); Sat, 26 Nov 2022 05:30:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229554AbiKZKaK (ORCPT ); Sat, 26 Nov 2022 05:30:10 -0500 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51EDA2871E; Sat, 26 Nov 2022 02:30:09 -0800 (PST) Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.53]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4NK7FN3KnGzJnp2; Sat, 26 Nov 2022 18:26:48 +0800 (CST) Received: from kwepemm600013.china.huawei.com (7.193.23.68) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sat, 26 Nov 2022 18:30:07 +0800 Received: from localhost.localdomain (10.67.165.2) by kwepemm600013.china.huawei.com (7.193.23.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sat, 26 Nov 2022 18:30:07 +0800 From: Haoyue Xu To: , CC: , , , Subject: [PATCH for-next 6/6] RDMA/hns: Fix XRC caps on HIP08 Date: Sat, 26 Nov 2022 18:29:11 +0800 Message-ID: <20221126102911.2921820-7-xuhaoyue1@hisilicon.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20221126102911.2921820-1-xuhaoyue1@hisilicon.com> References: <20221126102911.2921820-1-xuhaoyue1@hisilicon.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.165.2] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm600013.china.huawei.com (7.193.23.68) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,HK_RANDOM_ENVFROM, HK_RANDOM_FROM,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chengchang Tang XRC caps has been set by default. But in fact, XRC is not supported in HIP08. Fixes: 32548870d438 ("RDMA/hns: Add support for XRC on HIP09") Signed-off-by: Chengchang Tang Signed-off-by: Haoyue Xu --- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c index f32100c6f1d9..2716852f5e92 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -2051,13 +2051,14 @@ static void set_default_caps(struct hns_roce_dev *hr_dev) caps->flags |= HNS_ROCE_CAP_FLAG_ATOMIC | HNS_ROCE_CAP_FLAG_MW | HNS_ROCE_CAP_FLAG_SRQ | HNS_ROCE_CAP_FLAG_FRMR | - HNS_ROCE_CAP_FLAG_QP_FLOW_CTRL | HNS_ROCE_CAP_FLAG_XRC; + HNS_ROCE_CAP_FLAG_QP_FLOW_CTRL; caps->gid_table_len[0] = HNS_ROCE_V2_GID_INDEX_NUM; if (hr_dev->pci_dev->revision >= PCI_REVISION_ID_HIP09) { caps->flags |= HNS_ROCE_CAP_FLAG_STASH | - HNS_ROCE_CAP_FLAG_DIRECT_WQE; + HNS_ROCE_CAP_FLAG_DIRECT_WQE | + HNS_ROCE_CAP_FLAG_XRC; caps->max_sq_inline = HNS_ROCE_V3_MAX_SQ_INLINE; } else { caps->max_sq_inline = HNS_ROCE_V2_MAX_SQ_INLINE; -- 2.30.0