From patchwork Tue Feb 23 08:25:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 8388931 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 00B609F1D4 for ; Tue, 23 Feb 2016 08:29:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 17CAA20612 for ; Tue, 23 Feb 2016 08:29:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2999120392 for ; Tue, 23 Feb 2016 08:29:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932771AbcBWI3w (ORCPT ); Tue, 23 Feb 2016 03:29:52 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:35819 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932568AbcBWI3v (ORCPT ); Tue, 23 Feb 2016 03:29:51 -0500 Received: by mail-wm0-f53.google.com with SMTP id c200so208066375wme.0 for ; Tue, 23 Feb 2016 00:29:51 -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=4Go5qBmiY7+r3XW/NXnrTRh8dL5G1Vyi/s5TH2Wb2jg=; b=ugaUi/2WD/ZHJiTdj/zPYr91nDgx3Orv0jA0fWPEC+tXIWHuhX6uTFknQtMuswCtRo 62Wo4Se2KTTofEOp9aVMUcwkTH8fCBPo5F5iDfjZzEnuJWv3mA3fmafq1+kWNDnz7FmC IfJrNWGA8wHXw9mnF22uAvhmthiQR5aEZXYIFAQ/xw1b22Lz7VEtABueamG/swmaQ5G2 DN1wZzeoFUVlSPvGMCxWmuB0NCszb5TYzLYloeTwKzs0SCNiiLjqs/y7bqMULTq7RcX0 iLhy1bOpP1YORJbSirupJq2MoDfHy5bLbJwtUjEsm3uif8ca3IIfexJmY8jbFkQI9GIS E4lA== 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=4Go5qBmiY7+r3XW/NXnrTRh8dL5G1Vyi/s5TH2Wb2jg=; b=HX527HVZznSR1s5m0XK9m5CpGiBndgW4D8Fv6zh9pGnInqTSGoh9dHtmhJC9HDrlQl 8mtZJFxkCfJNGSvVAkdRHWcMfcyPPYyBZbcjw2nNQoTGq87uJR0w3tmfJSgS3fx43MvD pywSXEP8OCnSkDIs8nSYc2QudXbFaJmvfJY/0yjCs6JES+1LvcZ9mrtxKGLaxG85NWtz yNZP0yxI88eBj8wh1YLBhxyiCslwyojBLTYMAwaapM/06A2uYiimi9alZ8r2yAyTqXI7 b/O20tMhNwoBKJIRLCzbyT5tLK4F4wROAvWb3vZnYBpgeCNdhrmBumytbJpXWGlz/rJy gzSg== X-Gm-Message-State: AG10YOQOHZOy8q3KaGWbOE7Hn672axbmfwAWTYzFRByYI3zKG0UnRwJY8pmkhdIatyztMQ== X-Received: by 10.194.22.68 with SMTP id b4mr31368320wjf.158.1456216190734; Tue, 23 Feb 2016 00:29:50 -0800 (PST) Received: from localhost ([213.57.247.249]) by smtp.gmail.com with ESMTPSA id p125sm24967547wmd.16.2016.02.23.00.29.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Feb 2016 00:29:49 -0800 (PST) From: Leon Romanovsky To: dledford@redhat.com, saeedm@mellanox.com Cc: linux-rdma@vger.kernel.org, Leon Romanovsky Subject: [PATCH rdma-next V1 5/8] IB/{core, ulp} Support above 32 possible device capability flags Date: Tue, 23 Feb 2016 10:25:25 +0200 Message-Id: <1456215928-9305-6-git-send-email-leon@leon.nu> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1456215928-9305-1-git-send-email-leon@leon.nu> References: <1456215928-9305-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 Reviewed-by: Matan Barak --- drivers/infiniband/core/uverbs_cmd.c | 2 +- drivers/infiniband/ulp/ipoib/ipoib.h | 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.h b/drivers/infiniband/ulp/ipoib/ipoib.h index a6f3eab..4dd05f0 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib.h +++ b/drivers/infiniband/ulp/ipoib/ipoib.h @@ -387,7 +387,7 @@ struct ipoib_dev_priv { struct dentry *mcg_dentry; struct dentry *path_dentry; #endif - int hca_caps; + u64 hca_caps; struct ipoib_ethtool_st ethtool; struct timer_list poll_timer; }; 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;