From patchwork Wed Jan 29 07:18:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gal Pressman X-Patchwork-Id: 11355591 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9E955138C for ; Wed, 29 Jan 2020 07:18:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7B91D20720 for ; Wed, 29 Jan 2020 07:18:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="BndE6zRV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726068AbgA2HSc (ORCPT ); Wed, 29 Jan 2020 02:18:32 -0500 Received: from smtp-fw-9102.amazon.com ([207.171.184.29]:49642 "EHLO smtp-fw-9102.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726037AbgA2HSc (ORCPT ); Wed, 29 Jan 2020 02:18:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1580282312; x=1611818312; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=NJWm6UDJJ+sACEG0O2QWO5Nxnw7O1yGlZPc/x5HRk94=; b=BndE6zRVH7eiuktkIm9JIBOEW2wc5v9gKcOZP39f0V/9CCX0EoxVe4uC mSdkHVymJSe8lQXG+hRuk6Aq7DUrMuhPSnmb3Af77T3KuJTHyWz3zCSEg 8TEJofBXNAL5ceSEqcRlA1mpNsUcYihfQTBP4RMBGYqwioHc+wR4Y3MI2 A=; IronPort-SDR: D7OtzXQL5k2z4YCBhIC27j2exBi/BspL27//EuqSw1cZ4ciiLhu1j87fhtvggjviRYHa7yWQZK rb+pYM9iy26g== X-IronPort-AV: E=Sophos;i="5.70,376,1574121600"; d="scan'208";a="21733933" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-2b-859fe132.us-west-2.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9102.sea19.amazon.com with ESMTP; 29 Jan 2020 07:18:19 +0000 Received: from EX13MTAUEA002.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan2.pdx.amazon.com [10.170.41.162]) by email-inbound-relay-2b-859fe132.us-west-2.amazon.com (Postfix) with ESMTPS id D71C2223056; Wed, 29 Jan 2020 07:18:18 +0000 (UTC) Received: from EX13D19EUB001.ant.amazon.com (10.43.166.229) by EX13MTAUEA002.ant.amazon.com (10.43.61.77) with Microsoft SMTP Server (TLS) id 15.0.1236.3; Wed, 29 Jan 2020 07:18:18 +0000 Received: from EX13MTAUEE002.ant.amazon.com (10.43.62.24) by EX13D19EUB001.ant.amazon.com (10.43.166.229) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 29 Jan 2020 07:18:16 +0000 Received: from 8c85908914bf.ant.amazon.com (10.218.69.139) by mail-relay.amazon.com (10.43.62.224) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Wed, 29 Jan 2020 07:18:15 +0000 From: Gal Pressman To: Jason Gunthorpe , Doug Ledford CC: , Alexander Matushevsky , Gal Pressman Subject: [PATCH for-next] RDMA/efa: Mask access flags with the correct optional range Date: Wed, 29 Jan 2020 09:18:03 +0200 Message-ID: <20200129071803.40117-1-galpress@amazon.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org The uapi value IB_UVERBS_ACCESS_OPTIONAL_RANGE shouldn't be used inside the driver, use IB_ACCESS_OPTIONAL instead. Fixes: 86dd738cf20c ("RDMA/efa: Allow passing of optional access flags for MR registration") Signed-off-by: Gal Pressman --- drivers/infiniband/hw/efa/efa_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c index a556572058ff..68798b66b84e 100644 --- a/drivers/infiniband/hw/efa/efa_verbs.c +++ b/drivers/infiniband/hw/efa/efa_verbs.c @@ -1367,7 +1367,7 @@ struct ib_mr *efa_reg_mr(struct ib_pd *ibpd, u64 start, u64 length, IB_ACCESS_LOCAL_WRITE | (is_rdma_read_cap(dev) ? IB_ACCESS_REMOTE_READ : 0); - access_flags &= ~IB_UVERBS_ACCESS_OPTIONAL_RANGE; + access_flags &= ~IB_ACCESS_OPTIONAL; if (access_flags & ~supp_access_flags) { ibdev_dbg(&dev->ibdev, "Unsupported access flags[%#x], supported[%#x]\n",