From patchwork Tue Mar 1 16:52:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Cohen X-Patchwork-Id: 8467241 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 C4045C0554 for ; Tue, 1 Mar 2016 16:53:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E946120254 for ; Tue, 1 Mar 2016 16:53:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1AB3A20265 for ; Tue, 1 Mar 2016 16:53:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751169AbcCAQxE (ORCPT ); Tue, 1 Mar 2016 11:53:04 -0500 Received: from [193.47.165.129] ([193.47.165.129]:59729 "EHLO mellanox.co.il" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751342AbcCAQxB (ORCPT ); Tue, 1 Mar 2016 11:53:01 -0500 Received: from Internal Mail-Server by MTLPINE1 (envelope-from eli@mellanox.com) with ESMTPS (AES256-SHA encrypted); 1 Mar 2016 18:52:31 +0200 Received: from x-vnc01.mtx.labs.mlnx (x-vnc01.mtx.labs.mlnx [10.12.150.16]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id u21GqUwm023142; Tue, 1 Mar 2016 18:52:31 +0200 Received: from x-vnc01.mtx.labs.mlnx (localhost.localdomain [127.0.0.1]) by x-vnc01.mtx.labs.mlnx (8.14.4/8.14.4) with ESMTP id u21GqU2q138375; Tue, 1 Mar 2016 18:52:30 +0200 Received: (from eli@localhost) by x-vnc01.mtx.labs.mlnx (8.14.4/8.14.4/Submit) id u21GqUOo138374; Tue, 1 Mar 2016 18:52:30 +0200 From: Eli Cohen To: dledford@redhat.com Cc: linux-rdma@vger.kernel.org, liranl@mellanox.com, Eli Cohen Subject: [PATCH for-next 02/10] IB/mlx5: Fix decision on using MAD_IFC Date: Tue, 1 Mar 2016 18:52:15 +0200 Message-Id: <1456851143-138332-3-git-send-email-eli@mellanox.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1456851143-138332-1-git-send-email-eli@mellanox.com> References: <1456851143-138332-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 --- 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 03c418ccbc98..399049b70a72 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 {