From patchwork Tue Feb 23 08:25:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 8388891 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 E31AF9F1D4 for ; Tue, 23 Feb 2016 08:29:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0A07020610 for ; Tue, 23 Feb 2016 08:29:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BD92220392 for ; Tue, 23 Feb 2016 08:29:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932625AbcBWI3o (ORCPT ); Tue, 23 Feb 2016 03:29:44 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:33003 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932568AbcBWI3n (ORCPT ); Tue, 23 Feb 2016 03:29:43 -0500 Received: by mail-wm0-f51.google.com with SMTP id g62so190120596wme.0 for ; Tue, 23 Feb 2016 00:29:42 -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=aV8KetIiouTrcQlypAwk9IN7hAC6aPTzssePOBYYd6saY/BVSxJqn/hyfofUfg0yux KF4FeNk/VMRSREXl5fbypJmrD4Gg5iYjci2P8ZJDZBCeyl2dHRXXu2BOZUBhZDiNNits IGP1+vG3l2kcGMVWQcYHgAiAU7fEu5VjIJeqCzXTpHhfBi6VlfsZrpEeTTo5HfAy31iy y9vujPB6lZIPlG5Qt1UpXnaR9DVRAnKGVlPzFg3TvjNUAay536trnN0UgDFaT9iojDYe ZNQcr7pu1yvjLd8krStNHAd9LhAdfb+7cTe8+ncqErEPH2t04Xqti9jdUcLXNk3Wekoy RnSA== 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=BbP3ZDMZglRc/7MgtzdhR+YrGEC7K69xcLVTUyW44ui+L2X9h8os7virwwj8NYmfKI xgT/ffVkUJinoDAolMd4n0OjU8EXb2IAXeIStoZqUfacbgENHcdGloNBF60tKngYuuBs 7Z28S5CsEBuMegA66ZaRUZ1L7mHXpFMMviHP3Z2ocXuu6SLvGtHEgE0tl0z+BpT2F2fF 9tPDfbzPLLpA3Tkhz+6m/3e4NmF/9NX9+oZkOGCd+iIJT+ZTygBWENir+r5e/BFfJ+BI JkV4PWL5/8k3fmRLegdHmi8Ct1tchn++7KzTqP3Wyr8QgthqHRp+gkVy9/9Jm94OAHMO jjsw== X-Gm-Message-State: AG10YOR99MCyjYjaOIr1jPeqqXww9ppDlAahBZRxXHnRLse7DphKO8lyDVQ7FBu7B4uSBA== X-Received: by 10.194.174.197 with SMTP id bu5mr35900737wjc.23.1456216182391; Tue, 23 Feb 2016 00:29:42 -0800 (PST) Received: from localhost ([213.57.247.249]) by smtp.gmail.com with ESMTPSA id ls5sm5692819wjb.33.2016.02.23.00.29.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Feb 2016 00:29:41 -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 1/8] net/mlx5_core: Fix caching ATOMIC endian mode capability Date: Tue, 23 Feb 2016 10:25:21 +0200 Message-Id: <1456215928-9305-2-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 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; }