From patchwork Sat Feb 20 07:47:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 8365771 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 DA52AC0553 for ; Sat, 20 Feb 2016 07:48:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0C0E120513 for ; Sat, 20 Feb 2016 07:48:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0E54C20511 for ; Sat, 20 Feb 2016 07:48:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758123AbcBTHsj (ORCPT ); Sat, 20 Feb 2016 02:48:39 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:33400 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758115AbcBTHsZ (ORCPT ); Sat, 20 Feb 2016 02:48:25 -0500 Received: by mail-wm0-f53.google.com with SMTP id g62so95842899wme.0 for ; Fri, 19 Feb 2016 23:48:24 -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=1QZIB88PHhR835OxBwAp69faSmbJ22LuWffPwhgjd9I=; b=FFMYx0JWsKIFq1ck5E838cbPpuWQCUqlJQmymBk0sgLJj7pP9ufqsP02KfY8outlfX unV9Y+jxX9YBCBCfw+lgBqL/Otdp+8la4jTkD4ilPumF7bSzGeTHBbD/vaGY9uU1VQHP FnEt49hJocbIa+ofCegCBmnnfvcxIWu8D/3FKBL0miBMRw1k1RqiFDub5JqjTShFEPc3 0/trNe5jQnXV7G+eIqo5rzEpKtbi54W8zu8VV/25JpW8PNQ5Og31AJ6MboQrF/CmsUbx l98Fy7T0LfMKrBXc1qLy7I774N89ySP6qUhkpZINS+7daq3vPC9zCqWFGgb4pRExMUfN thxg== 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=1QZIB88PHhR835OxBwAp69faSmbJ22LuWffPwhgjd9I=; b=hAIAvASNZzO7x6syEJuGnMrqKyPnOp5PPEVc3VXfX28iThPof2q4rqkwPA6j+p2P1/ 7xXUgNB7hgVnAcnhCOLJ8cnl0dar6JhH94IUaX6wSW7e6HcXkfp5En7unRRIeNitp6ny WwfMy39ZAXcTGBC8HS4hUzE2jPBrSPtzTm7pmNlKAoKiRiQddjvswHx/O4eQ5O2CPuoJ YGtvBUkjFoERPTBDsp+P/iNXxxCTcjzkFTcPe4VDwGNhGvh3IVmsToB+8Wk+GiCMAvNs 9C+DO3hXzN9NzrqmXJcyRQRICUWYvP+LyHVQw5JXOy3AmU9Xm2WnEpXoCAPvfnMxD10P lc2g== X-Gm-Message-State: AG10YOS30cMvQ29fjBTobA30nPpkpDoJbObWHtrYPxASCxY1oMbMru2EoQ1mTDbTLdwgAw== X-Received: by 10.28.45.73 with SMTP id t70mr1236535wmt.31.1455954504241; Fri, 19 Feb 2016 23:48:24 -0800 (PST) Received: from localhost ([213.57.247.249]) by smtp.gmail.com with ESMTPSA id k4sm10977078wmc.12.2016.02.19.23.48.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Feb 2016 23:48:23 -0800 (PST) From: Leon Romanovsky To: dledford@redhat.com, saeedm@mellanox.com Cc: linux-rdma@vger.kernel.org, Leon Romanovsky Subject: [PATCH rdma-next 1/8] net/mlx5_core: Fix caching ATOMIC endian mode capability Date: Sat, 20 Feb 2016 09:47:38 +0200 Message-Id: <1455954465-15141-2-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 Add caching of maximum device capability of ATOMIC endian mode. Fixes: f91e6d8941bf ('net/mlx5_core: Add setting ATOMIC endian mode') Signed-off-by: Leon Romanovsky Reviewed-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c index 1545a94..b86fe50 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -423,6 +423,10 @@ static int handle_hca_cap_atomic(struct mlx5_core_dev *dev) HCA_CAP_OPMOD_GET_CUR); if (err) return err; + err = mlx5_core_get_caps(dev, MLX5_CAP_ATOMIC, + HCA_CAP_OPMOD_GET_MAX); + if (err) + return err; } else { return 0; }