From patchwork Mon Feb 4 13:20:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Netes X-Patchwork-Id: 2091981 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 575683FD56 for ; Mon, 4 Feb 2013 13:20:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755236Ab3BDNUh (ORCPT ); Mon, 4 Feb 2013 08:20:37 -0500 Received: from mail-vb0-f52.google.com ([209.85.212.52]:40938 "EHLO mail-vb0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755339Ab3BDNUe (ORCPT ); Mon, 4 Feb 2013 08:20:34 -0500 Received: by mail-vb0-f52.google.com with SMTP id fa15so3885947vbb.11 for ; Mon, 04 Feb 2013 05:20:33 -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=yEP7Qt0JWMHUZMhftvkJhQTIHLZMg3W8F3m5mhDzB4s=; b=VgXKKfkZD/i+I9S6Rgoj3GTh0cx6j/aPpCgiLLR1+R1sK7QuvKluWdYsP7jJBWqV/B ijat3A+lqlM/yIuPsgxgvAJb0sNUHq2lTe+fVa+F/v+yk4BMkfYu7FptDDxa/c+U3cbk EpXSHFosTtHS6yM22QqeRO5BPtee6qB0OWbXbiTuQ2/EEwTREoN3LznbPGT0c6fWZdFc GsW068zhqrfAUxMDoyADbwGRexNSa3GjWBKQxgyGS9DL1Y18MC8RT6FkpP13AuNcqC/m wn4b1lodF0jdVre/MvxF+tNAyUdm/hARJbIANeo3dF5vk7Bt/I/j04pgjYBX8xBZ8dl8 JHEQ== X-Received: by 10.52.176.202 with SMTP id ck10mr19257460vdc.42.1359984033768; Mon, 04 Feb 2013 05:20:33 -0800 (PST) Received: from localhost (out.voltaire.com. [193.47.165.251]) by mx.google.com with ESMTPS id cd16sm21649819vdb.0.2013.02.04.05.20.32 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 04 Feb 2013 05:20:33 -0800 (PST) From: Alex Netes To: linux-rdma@vger.kernel.org Cc: Alex Netes Subject: [PATCH] opensm/osm_link_mgr.c: Set AM SMSupportExtendedSpeeds bit if port supports ExtPortInfo Date: Mon, 4 Feb 2013 15:20:06 +0200 Message-Id: <1359984011-30753-5-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: ALoCoQl5QNEu8c3kwJyGR7+8YY34FCbjjVcy3B/0iKhTIGJ/SxMIjJDwg+gfXpBXAuKusPdiXXgV Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org When updating PortInfo we should set AM SMSupportExtendedSpeeds bit for the ports that support ExtendedSpeeds. Otherwise, we won't be able to update ExtendedSpeedEnabled field. Signed-off-by: Alex Netes --- opensm/osm_link_mgr.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/opensm/osm_link_mgr.c b/opensm/osm_link_mgr.c index 5271d59..9d73e74 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 qdr_change = 0, fdr10_change = 0; + int issue_ext = 1, fdr10_change = 0; int ret = 0; ib_net32_t attr_mod, cap_mask; boolean_t update_mkey = FALSE; @@ -334,19 +334,8 @@ static int link_mgr_set_physp_pi(osm_sm_t * sm, IN osm_physp_t * p_physp, sm->p_subn->opt. force_link_speed); if (memcmp(&p_pi->link_speed, &p_old_pi->link_speed, - sizeof(p_pi->link_speed))) { + sizeof(p_pi->link_speed))) send_set = TRUE; - /* Determine whether QDR in LSE is being changed */ - if ((ib_port_info_get_link_speed_enabled(p_pi) & - IB_LINK_SPEED_ACTIVE_10 && - !(ib_port_info_get_link_speed_enabled(p_old_pi) & - IB_LINK_SPEED_ACTIVE_10)) || - ((!(ib_port_info_get_link_speed_enabled(p_pi) & - IB_LINK_SPEED_ACTIVE_10) && - ib_port_info_get_link_speed_enabled(p_old_pi) & - IB_LINK_SPEED_ACTIVE_10))) - qdr_change = 1; - } } if (sm->p_subn->opt.fdr10 && @@ -377,7 +366,7 @@ static int link_mgr_set_physp_pi(osm_sm_t * sm, IN osm_physp_t * p_physp, } else cap_mask = p_pi->capability_mask; if (!(cap_mask & IB_PORT_CAP_HAS_EXT_SPEEDS)) - qdr_change = 0; + issue_ext = 0; /* Do peer ports support extended link speeds ? */ if (port_num != 0 && p_remote_physp) { @@ -462,7 +451,7 @@ Send: goto Exit; attr_mod = cl_hton32(port_num); - if (qdr_change) + if (issue_ext) attr_mod |= cl_hton32(1 << 31); /* AM SMSupportExtendedSpeeds */ status = osm_req_set(sm, osm_physp_get_dr_path_ptr(p_physp), payload, sizeof(payload), IB_MAD_ATTR_PORT_INFO,