Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp630055pxb; Tue, 5 Apr 2022 16:33:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6ParM5+O6zmZ+IbSczMGBdve8Snm4GHk78MXqsbdkR+EjS0AHFKXnK8nUMGJFhZslbkAg X-Received: by 2002:a17:902:d0d2:b0:156:caaa:6c16 with SMTP id n18-20020a170902d0d200b00156caaa6c16mr5865286pln.81.1649201618810; Tue, 05 Apr 2022 16:33:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649201618; cv=none; d=google.com; s=arc-20160816; b=FFsYJynLxgzJ813YUeaVKcQievKd0BkqlGN+rUrYhel7dM12oFbPxCCr/0yHnjVBu8 2htgvJCHLYD8tbjY1L9kUgJNO++QKt1K8Tn9EnrZSis58vBng1bBl7qSU3M1unjFvH2L ZYykOcdA0XWCjmAgGhDNRaxgL6LEFHn3zdu0f93MA+svz5klG0u9EPPnxGF7qk8sU/OZ 6CNKeYRn1VBmKdNuayv2XAxi6xsKoJegeIUt+LMSmYPu4gIqgRywv7Isxlo8vmG043wv sPyPR+UGFhCSb6NdDozyAZUGDM8G6n/C285HPXv+TMgz7BP1yGcY+c0WaBPG7dICUSQX bOzQ== 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=7858Q3R/RiSx72qwWh9AVVA7/oaEtw5W7SmadJa7JUo=; b=oIjB6qp+Vi5cdUAGlnhmYgaOZp9xXbE7oTFaZAOoYdzRAP0KW9bymHKB8QCdI3JlhW Yc8dISHSscf9oGw5s/I0DMrG1O8kwSFvq6dx234pg0y1k5k6S2v+GaITSi5vXpGzEkoA XcutCJ7eWrzCfiewjWAflmBiz0duQ4PAlXawZhEibkmB0MCvmukQT9OoIxpgS6+B87gJ Hmi158gVLTGtaw3Qu18tssdPyYQSJzeY2CsdptoUGUEsTjtshSm5LEhwUy3MNwjCPxyN zA4CNBScTgVzdzBaj8AtOulIG2XxZJ+oFhd8wRqEtivPMfJq8UqD+a91bv0eN8zyJ06+ 3UyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="ihTi9/7B"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id t2-20020a170902e84200b00153bc4c8989si15410784plg.204.2022.04.05.16.33.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Apr 2022 16:33:38 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="ihTi9/7B"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CFFE1FE41F; Tue, 5 Apr 2022 16:18:03 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356265AbiDEMu0 (ORCPT + 99 others); Tue, 5 Apr 2022 08:50:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242416AbiDEJHy (ORCPT ); Tue, 5 Apr 2022 05:07:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E90A68FBF; Tue, 5 Apr 2022 01:56:46 -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 5B77A61562; Tue, 5 Apr 2022 08:56:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69E14C385A0; Tue, 5 Apr 2022 08:56:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148998; bh=1+Mngr6KGkheShOg7khTz8KoT3VtqXQ7du3xbknMR0E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ihTi9/7BWMSJh3WJ4qym9odvvx+hjYqnGCiLi55h3uCt1X8CIhtbVyGEZfi2pjJlG 0o9DBPY7hgq0kDIccDzUVHlz6lbYq21IUqPQQscPZz26QGnYmT+58OXlB6LdB07c2h PCkP6NksZzSsT+TGKgOYEVLWUvJzLgoTqVGJDNec= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mustafa Ismail , Shiraz Saleem , Jason Gunthorpe , Sasha Levin Subject: [PATCH 5.16 0558/1017] RDMA/irdma: Remove incorrect masking of PD Date: Tue, 5 Apr 2022 09:24:31 +0200 Message-Id: <20220405070410.844796945@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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: Mustafa Ismail [ Upstream commit 17850f2b0b4b806e47cc44df94186bfc2cdd490b ] The PD id is masked with 0x7fff, while PD can be 18 bits for GEN2 HW. Remove the masking as it should not be needed and can cause incorrect PD id to be used. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Link: https://lore.kernel.org/r/20220225163211.127-4-shiraz.saleem@intel.com Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin --- drivers/infiniband/hw/irdma/verbs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c index 8cd5f9261692..03d4da16604d 100644 --- a/drivers/infiniband/hw/irdma/verbs.c +++ b/drivers/infiniband/hw/irdma/verbs.c @@ -2504,7 +2504,7 @@ static int irdma_dealloc_mw(struct ib_mw *ibmw) cqp_info = &cqp_request->info; info = &cqp_info->in.u.dealloc_stag.info; memset(info, 0, sizeof(*info)); - info->pd_id = iwpd->sc_pd.pd_id & 0x00007fff; + info->pd_id = iwpd->sc_pd.pd_id; info->stag_idx = ibmw->rkey >> IRDMA_CQPSQ_STAG_IDX_S; info->mr = false; cqp_info->cqp_cmd = IRDMA_OP_DEALLOC_STAG; @@ -3016,7 +3016,7 @@ static int irdma_dereg_mr(struct ib_mr *ib_mr, struct ib_udata *udata) cqp_info = &cqp_request->info; info = &cqp_info->in.u.dealloc_stag.info; memset(info, 0, sizeof(*info)); - info->pd_id = iwpd->sc_pd.pd_id & 0x00007fff; + info->pd_id = iwpd->sc_pd.pd_id; info->stag_idx = ib_mr->rkey >> IRDMA_CQPSQ_STAG_IDX_S; info->mr = true; if (iwpbl->pbl_allocated) -- 2.34.1