From patchwork Mon Apr 18 13:29:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 715081 X-Patchwork-Delegate: alexne@voltaire.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3IDU0K1030104 for ; Mon, 18 Apr 2011 13:30:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751707Ab1DRN35 (ORCPT ); Mon, 18 Apr 2011 09:29:57 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:34627 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751340Ab1DRN35 (ORCPT ); Mon, 18 Apr 2011 09:29:57 -0400 Received: by wwa36 with SMTP id 36so5661363wwa.1 for ; Mon, 18 Apr 2011 06:29:52 -0700 (PDT) Received: by 10.227.195.6 with SMTP id ea6mr1227119wbb.74.1303133392591; Mon, 18 Apr 2011 06:29:52 -0700 (PDT) Received: from [192.168.1.100] (c-71-192-10-85.hsd1.ma.comcast.net [71.192.10.85]) by mx.google.com with ESMTPS id l24sm3266310wbc.64.2011.04.18.06.29.50 (version=SSLv3 cipher=OTHER); Mon, 18 Apr 2011 06:29:51 -0700 (PDT) Message-ID: <4DAC3CCC.4090101@dev.mellanox.co.il> Date: Mon, 18 Apr 2011 09:29:48 -0400 From: Hal Rosenstock User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: Alex Netes CC: "linux-rdma@vger.kernel.org" Subject: [PATCH 1/2] opensm/osm_state_mgr.c: Don't rely on PortInfo:PortState for base SP0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 18 Apr 2011 13:30:00 +0000 (UTC) For base SP0, PortState in SM PortInfo attribute is not used and base SP0 is always "active". Signed-off-by: Hal Rosenstock --- -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/opensm/osm_state_mgr.c b/opensm/osm_state_mgr.c index 2e1ef94..dd308f2 100644 --- a/opensm/osm_state_mgr.c +++ b/opensm/osm_state_mgr.c @@ -352,7 +352,11 @@ static boolean_t state_mgr_is_sm_port_down(IN osm_sm_t * sm) CL_ASSERT(p_physp); - state = osm_physp_get_port_state(p_physp); + if (p_port->p_node->sw && + !ib_switch_info_is_enhanced_port0(&p_port->p_node->sw->switch_info)) + state = IB_LINK_ACTIVE; /* base SP0 */ + else + state = osm_physp_get_port_state(p_physp); CL_PLOCK_RELEASE(sm->p_lock); Exit: