From patchwork Mon Jun 8 13:32:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moni Shoua X-Patchwork-Id: 6565161 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 B4E6EC0020 for ; Mon, 8 Jun 2015 13:34:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E6FE5204A9 for ; Mon, 8 Jun 2015 13:34:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5D1D120524 for ; Mon, 8 Jun 2015 13:34:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751708AbbFHNeU (ORCPT ); Mon, 8 Jun 2015 09:34:20 -0400 Received: from [193.47.165.129] ([193.47.165.129]:50961 "EHLO mellanox.co.il" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752244AbbFHNeO (ORCPT ); Mon, 8 Jun 2015 09:34:14 -0400 Received: from Internal Mail-Server by MTLPINE1 (envelope-from monis@mellanox.com) with ESMTPS (AES256-SHA encrypted); 8 Jun 2015 16:33:34 +0300 Received: from rsws33.mtr.labs.mlnx (dev-r-vrt-064.mtr.labs.mlnx [10.212.64.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id t58DXmgm020675; Mon, 8 Jun 2015 16:33:48 +0300 From: Moni Shoua To: Doug Ledford , Ira Weiny , Michael Wang Cc: linux-rdma@vger.kernel.org, Moni Shoua Subject: [PATCH] IB/CMA: Fix condition to search for InfiniBand route Date: Mon, 8 Jun 2015 16:32:25 +0300 Message-Id: <1433770345-17354-1-git-send-email-monis@mellanox.com> X-Mailer: git-send-email 2.1.0 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, T_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 The flag RDMA_CORE_CAP_IB_SA is set when link layer is InfiniBand but also when link layer is Ethernet. Therefore, link layer is not implied by this flag. --- drivers/infiniband/core/cma.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 3b943b7..f96d6fd 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -1993,7 +1993,7 @@ int rdma_resolve_route(struct rdma_cm_id *id, int timeout_ms) return -EINVAL; atomic_inc(&id_priv->refcount); - if (rdma_cap_ib_sa(id->device, id->port_num)) + if (rdma_protocol_ib(id->device, id->port_num)) ret = cma_resolve_ib_route(id_priv, timeout_ms); else if (rdma_protocol_roce(id->device, id->port_num)) ret = cma_resolve_iboe_route(id_priv);