From patchwork Sat Feb 20 07:47:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 8365811 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F2A7CC0553 for ; Sat, 20 Feb 2016 07:48:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1DA6E20511 for ; Sat, 20 Feb 2016 07:48:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1FC312051A for ; Sat, 20 Feb 2016 07:48:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758117AbcBTHsn (ORCPT ); Sat, 20 Feb 2016 02:48:43 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:36576 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758119AbcBTHsd (ORCPT ); Sat, 20 Feb 2016 02:48:33 -0500 Received: by mail-wm0-f44.google.com with SMTP id g62so106139942wme.1 for ; Fri, 19 Feb 2016 23:48:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leon-nu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=R0PThQfMb4iLBsnxHCiTpTPqX3YtIk8HgCLEqUoNPqg=; b=IPCdaR21jQ4fhk9n6fGGoBnpG51SN3rmgaFvz8RvNymxAdHMSOcSRykCVBFhum8ap4 vNV9F9Q95Y1YPm9LFzzfwo3CSwC1qfbsNnMEpvd5THRrBi6zD9o/V4LCSQHTYn73ceqo PGoMTHvSqyFvtBRr7S0hBQ1LiWS26DnC9SoJ0/AP5wzZ4f6DETGUObJmjYjaO0I8QDuP RvF+6sgU6uZOVSyO1OFnKn1sm+U50BH264eKScfmBeA8gaZmSk1NOet1VsYkO7NJ7BiY uC0VpOfjhsfXbvTUR+hTn4u7x9Fnl1xVyK1cQpYt/x6cAWmgtBWa5/cIQ6KFarM8QD/W GLAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=R0PThQfMb4iLBsnxHCiTpTPqX3YtIk8HgCLEqUoNPqg=; b=du3pujxFtkRvfT5BEXxbiHX+zSqgD138+4ZMCHqA94VfHqdZ4JMOm+MP0D655McEha e/FuOSc2E0JhT8Art903cZ+uDguzhfz8IvTKZN+HkpmBGmBpUDIp0akERjHrHXSLw1wO bNQbiIudHD/mxyfyXk/TBbDYFMPo5fsiIKg8hwBq9Cbb380eB/o+wVPXwAcHTh1EQeZy cpQMFRIqA+YEsmlzgGmwyrn0qHzIOpgi3PCX+TJEMjswcfJ8LeYPagr7ixjbz8c5JDSf Hos377CiHL2KQ4BIrnxXyDFXs/5E5Z3aQ7dEo8bAw5pnHAW2wSKmrKpNnEpuenfC0wb+ 5XWQ== X-Gm-Message-State: AG10YOQxTNl9adrYmBw/8tQOV1TwYsHHn62SoV0pXFnt4VpAL3NAZi7u5d4qauHogPMe5Q== X-Received: by 10.194.103.5 with SMTP id fs5mr10336720wjb.42.1455954512525; Fri, 19 Feb 2016 23:48:32 -0800 (PST) Received: from localhost ([213.57.247.249]) by smtp.gmail.com with ESMTPSA id l7sm14568619wjx.14.2016.02.19.23.48.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Feb 2016 23:48:31 -0800 (PST) From: Leon Romanovsky To: dledford@redhat.com, saeedm@mellanox.com Cc: linux-rdma@vger.kernel.org, Leon Romanovsky Subject: [PATCH rdma-next 5/8] IB/{core, ulp} Support above 32 possible device capability flags Date: Sat, 20 Feb 2016 09:47:42 +0200 Message-Id: <1455954465-15141-6-git-send-email-leon@leon.nu> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1455954465-15141-1-git-send-email-leon@leon.nu> References: <1455954465-15141-1-git-send-email-leon@leon.nu> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Leon Romanovsky The old bitwise device_cap_flags variable was limited to u32 which has all bits already defined. In order to overcome it, we converted device_cap_flags variable to be u64 type. Signed-off-by: Leon Romanovsky --- drivers/infiniband/core/uverbs_cmd.c | 2 +- drivers/infiniband/ulp/ipoib/ipoib_main.c | 2 +- include/rdma/ib_verbs.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c index c647d67..6887252 100644 --- a/drivers/infiniband/core/uverbs_cmd.c +++ b/drivers/infiniband/core/uverbs_cmd.c @@ -402,7 +402,7 @@ static void copy_query_dev_fields(struct ib_uverbs_file *file, resp->hw_ver = attr->hw_ver; resp->max_qp = attr->max_qp; resp->max_qp_wr = attr->max_qp_wr; - resp->device_cap_flags = attr->device_cap_flags; + resp->device_cap_flags = lower_32_bits(attr->device_cap_flags); resp->max_sge = attr->max_sge; resp->max_sge_rd = attr->max_sge_rd; resp->max_cq = attr->max_cq; diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 25509bb..6d53330 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -1762,7 +1762,7 @@ int ipoib_add_pkey_attr(struct net_device *dev) int ipoib_set_dev_features(struct ipoib_dev_priv *priv, struct ib_device *hca) { - priv->hca_caps = hca->attrs.device_cap_flags; + priv->hca_caps = (int)hca->attrs.device_cap_flags; if (priv->hca_caps & IB_DEVICE_UD_IP_CSUM) { priv->dev->hw_features = NETIF_F_SG | diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index 284b00c..2ff1fd1 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -273,7 +273,7 @@ struct ib_device_attr { u32 hw_ver; int max_qp; int max_qp_wr; - int device_cap_flags; + u64 device_cap_flags; int max_sge; int max_sge_rd; int max_cq;