From patchwork Mon Feb 4 13:20:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Netes X-Patchwork-Id: 2091991 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 1B8803FD56 for ; Mon, 4 Feb 2013 13:20:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755339Ab3BDNUk (ORCPT ); Mon, 4 Feb 2013 08:20:40 -0500 Received: from mail-ve0-f175.google.com ([209.85.128.175]:38550 "EHLO mail-ve0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755307Ab3BDNUi (ORCPT ); Mon, 4 Feb 2013 08:20:38 -0500 Received: by mail-ve0-f175.google.com with SMTP id cy12so2132558veb.34 for ; Mon, 04 Feb 2013 05:20:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=YCmbc/Q4e3hU3pkA1RY4j5tq9FBM28sijJ4sUHHj++E=; b=FU6KPY+Zw5DT0mBLBmIYlJn0pCJ61DJV32/GIRk02NGUf0W0wQ67VYr2v18nSlaxu+ bbOgnVosqxoQGHSvHSE4S2IKAZcJp8gUzLpdP5X0lQRAbxqfNDVgnP6k9n6CFZtHvyAj CjqYugz/CT3DoniXsr6lkjzlcyWu55HSpdFA+lHzlm2eDemcg47N+HVwNj8ADN/WZYoE yk8fr4uyLaUDZ/GeMxMv1lQMzfq4GgaRurn6FZ9NFDJjGjOkHdpf2PJOsISTp9DJ7k/Q AuoEvqwIrL+iLEtJcdDx3CGVDyIe3Ilbbn8adr/VFYaRSC+kaE+kL6KGZA/2U5IFaHT6 todQ== X-Received: by 10.52.18.148 with SMTP id w20mr19324664vdd.8.1359984037380; Mon, 04 Feb 2013 05:20:37 -0800 (PST) Received: from localhost (out.voltaire.com. [193.47.165.251]) by mx.google.com with ESMTPS id d13sm21629765vdj.8.2013.02.04.05.20.35 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 04 Feb 2013 05:20:36 -0800 (PST) From: Alex Netes To: linux-rdma@vger.kernel.org Cc: Alex Netes Subject: [PATCH] opensm/osm_link_mgr.c: Fix sending PortInfo(Set) with AM SMSupportExtendedSpeeds bit set for switch base port 0 Date: Mon, 4 Feb 2013 15:20:07 +0200 Message-Id: <1359984011-30753-6-git-send-email-alexne@mellanox.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1359984011-30753-1-git-send-email-alexne@mellanox.com> References: <1359984011-30753-1-git-send-email-alexne@mellanox.com> X-Gm-Message-State: ALoCoQlvPowr3pfyeKCtLGEtg9+iV81rzj2uzgEYijHlbQ+IfYRnoJHAtS5OTo4Lh1ePcLgJyOAQ Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org link_mgr mistakenly assums that port supports extended speeds when setting AM SMSupportExtendedSpeeds. Signed-off-by: Alex Netes --- opensm/osm_link_mgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opensm/osm_link_mgr.c b/opensm/osm_link_mgr.c index 9d73e74..26671bf 100644 --- a/opensm/osm_link_mgr.c +++ b/opensm/osm_link_mgr.c @@ -102,7 +102,7 @@ static int link_mgr_set_physp_pi(osm_sm_t * sm, IN osm_physp_t * p_physp, uint8_t port_num, mtu, op_vls, smsl = OSM_DEFAULT_SL; boolean_t esp0 = FALSE, send_set = FALSE, send_set2 = FALSE; osm_physp_t *p_remote_physp, *physp0; - int issue_ext = 1, fdr10_change = 0; + int issue_ext = 0, fdr10_change = 0; int ret = 0; ib_net32_t attr_mod, cap_mask; boolean_t update_mkey = FALSE; @@ -365,8 +365,8 @@ static int link_mgr_set_physp_pi(osm_sm_t * sm, IN osm_physp_t * p_physp, cap_mask = physp0->port_info.capability_mask; } else cap_mask = p_pi->capability_mask; - if (!(cap_mask & IB_PORT_CAP_HAS_EXT_SPEEDS)) - issue_ext = 0; + if (cap_mask & IB_PORT_CAP_HAS_EXT_SPEEDS) + issue_ext = 1; /* Do peer ports support extended link speeds ? */ if (port_num != 0 && p_remote_physp) {