Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6819545rwn; Tue, 13 Sep 2022 09:23:27 -0700 (PDT) X-Google-Smtp-Source: AA6agR6kxP+Vv4DPQJUSpvMED9vT+wsjhSh0Haf8qQfO2bFSTENdIKRUG442y/vBBGla5ugzEBw9 X-Received: by 2002:a65:6bca:0:b0:420:712f:ab98 with SMTP id e10-20020a656bca000000b00420712fab98mr28343042pgw.350.1663086207003; Tue, 13 Sep 2022 09:23:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663086206; cv=none; d=google.com; s=arc-20160816; b=psLs2rzCSBNSyKjavrNljZfwLmEDtAosgwkAV8NvbqR5bNDV7ANx5mC27rKXBr/0pC 99gDFWE5eDPpZShUNLiZzE9kWtnUGYIGAESEfCpOfy2XGEDWJ+TGAepEPP1ZEuy4Cmsc X2s92GqnZwulHV8GNOg5j0W9f63pze7M9bD6ZJ4b6F6e5tTkmuTTuIHplfcBWgUUBCLr JxJtLZ2v1ZCqkGv5O2IKn/SCGt9kCVdndAU/N8urKg2+SkGspQRBHGOT+xMAYCAz4bzq YO403uizgENFAyl90aM2Tbaf4A46SArz5YF7zl7cY5RpnqId/JwCLeV/MOAJ/hf9uYlM lhfQ== 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=qMfLl5r7ChzKVfywpMS/TEnopQIoGQ4IGePLXaFymGQ=; b=osUacWBGb/tV4fGCT7zSzAhijtpM4bwTn83/RhEFHy4iye9NGJHGeB6Ras89rXT1/J Z3ld+xE8qkQQgyurgLIBhCRUYwrc2EmRuAy0CyQkRCwQ0uYDfL/mDaeGQceW7NQmTvBi RmV9HpadLAXOq8Y55i76a35fE6XOSmpnQ31EPWI2frbWPH1RcTzYhShE6li2sT29pFnz Z+E219xDlgEqTmSifyZt1fcrV/DNusABSvrO2cgZ+PnPn4qHAGIPDJ7HaWzsTUjWGAQ3 Jc1aaPHZCpv4Ru0pErE6NBAN1d1ctx6215K0KZmG4fAiculIYX+P38QdpAI68jnHcM+H Ekiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="C9bbp/8g"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t17-20020a056a0021d100b0052f9293affcsi12445876pfj.335.2022.09.13.09.23.14; Tue, 13 Sep 2022 09:23:26 -0700 (PDT) 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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="C9bbp/8g"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234326AbiIMOhO (ORCPT + 99 others); Tue, 13 Sep 2022 10:37:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233730AbiIMOfu (ORCPT ); Tue, 13 Sep 2022 10:35:50 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02C6965650; Tue, 13 Sep 2022 07:20:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 387BB614B6; Tue, 13 Sep 2022 14:18:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 47FB4C433B5; Tue, 13 Sep 2022 14:18:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663078728; bh=+Ag2veBKk7JDxVF+yQUnmaeHMEDCpSp6zmSNW62pFGI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C9bbp/8gpbIt5VFGtGlizqz065f7Z/rOrbgUfgJ4K+5H/ryykd/VRfn6mEZy2UJ5a dALu9FBasxubKd0T1KrfNL6/5CIe98EbytS8LfRNmFk081S5yY8+qZyowkkEYxhDCp soUekZkIPBxnONvw19MiqtqoTtZCcyiNl76N2E/I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wenpeng Liang , Leon Romanovsky , Sasha Levin Subject: [PATCH 5.15 059/121] RDMA/hns: Fix wrong fixed value of qp->rq.wqe_shift Date: Tue, 13 Sep 2022 16:04:10 +0200 Message-Id: <20220913140359.888221737@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220913140357.323297659@linuxfoundation.org> References: <20220913140357.323297659@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: Wenpeng Liang [ Upstream commit 0c8b5d6268d92d141bfd64d21c870d295a84dee1 ] The value of qp->rq.wqe_shift of HIP08 is always determined by the number of sge. So delete the wrong branch. Fixes: cfc85f3e4b7f ("RDMA/hns: Add profile support for hip08 driver") Fixes: 926a01dc000d ("RDMA/hns: Add QP operations support for hip08 SoC") Link: https://lore.kernel.org/r/20220829105021.1427804-3-liangwenpeng@huawei.com Signed-off-by: Wenpeng Liang Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin --- drivers/infiniband/hw/hns/hns_roce_qp.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/infiniband/hw/hns/hns_roce_qp.c b/drivers/infiniband/hw/hns/hns_roce_qp.c index 9af4509894e68..5d50d2d1deca9 100644 --- a/drivers/infiniband/hw/hns/hns_roce_qp.c +++ b/drivers/infiniband/hw/hns/hns_roce_qp.c @@ -495,11 +495,8 @@ static int set_rq_size(struct hns_roce_dev *hr_dev, struct ib_qp_cap *cap, hr_qp->rq.max_gs = roundup_pow_of_two(max(1U, cap->max_recv_sge) + hr_qp->rq.rsv_sge); - if (hr_dev->caps.max_rq_sg <= HNS_ROCE_SGE_IN_WQE) - hr_qp->rq.wqe_shift = ilog2(hr_dev->caps.max_rq_desc_sz); - else - hr_qp->rq.wqe_shift = ilog2(hr_dev->caps.max_rq_desc_sz * - hr_qp->rq.max_gs); + hr_qp->rq.wqe_shift = ilog2(hr_dev->caps.max_rq_desc_sz * + hr_qp->rq.max_gs); hr_qp->rq.wqe_cnt = cnt; if (hr_dev->caps.flags & HNS_ROCE_CAP_FLAG_RQ_INLINE && -- 2.35.1