From patchwork Tue Mar 8 16:36:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 8535651 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 675D8C0554 for ; Tue, 8 Mar 2016 16:37:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A6EA0201EF for ; Tue, 8 Mar 2016 16:37:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B2227201E4 for ; Tue, 8 Mar 2016 16:37:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754317AbcCHQhg (ORCPT ); Tue, 8 Mar 2016 11:37:36 -0500 Received: from [193.47.165.129] ([193.47.165.129]:52283 "EHLO mellanox.co.il" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753635AbcCHQhe (ORCPT ); Tue, 8 Mar 2016 11:37:34 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from eli@mellanox.com) with ESMTPS (AES256-SHA encrypted); 8 Mar 2016 18:37:06 +0200 Received: from sw-mtx-012.mtx.labs.mlnx (sw-mtx-012.mtx.labs.mlnx [10.12.150.39]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id u28Gb57M031868; Tue, 8 Mar 2016 18:37:05 +0200 Received: from sw-mtx-012.mtx.labs.mlnx (localhost [127.0.0.1]) by sw-mtx-012.mtx.labs.mlnx (8.14.7/8.14.7) with ESMTP id u28Gb4fd017683; Tue, 8 Mar 2016 18:37:04 +0200 Received: (from eli@localhost) by sw-mtx-012.mtx.labs.mlnx (8.14.7/8.14.7/Submit) id u28Gb4bM017682; Tue, 8 Mar 2016 18:37:04 +0200 From: Eli Cohen To: dledford@redhat.com Cc: linux-rdma@vger.kernel.org, liranl@mellanox.com, eitan@mellanox.com, Eli Cohen Subject: [PATCH rdma-next V2 02/10] IB/mlx5: Fix decision on using MAD_IFC Date: Tue, 8 Mar 2016 18:36:50 +0200 Message-Id: <1457455018-17638-3-git-send-email-eli@mellanox.com> X-Mailer: git-send-email 2.7.2 In-Reply-To: <1457455018-17638-1-git-send-email-eli@mellanox.com> References: <1457455018-17638-1-git-send-email-eli@mellanox.com> 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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 Fix the condition that dictates when MAD_IFC should be used. According to firmware specifications, MAD_IFC commands must be used only if the ib_virt capability is off. Signed-off-by: Eli Cohen Reviewed-by: Or Gerlitz --- drivers/infiniband/hw/mlx5/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 7e89a547bf34..79ee6997daa2 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -283,7 +283,7 @@ __be16 mlx5_get_roce_udp_sport(struct mlx5_ib_dev *dev, u8 port_num, static int mlx5_use_mad_ifc(struct mlx5_ib_dev *dev) { - return !dev->mdev->issi; + return !MLX5_CAP_GEN(dev->mdev, ib_virt); } enum {