From patchwork Wed Jun 2 13:04:15 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 103807 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o52D6WlW014076 for ; Wed, 2 Jun 2010 13:06:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752211Ab0FBNGc (ORCPT ); Wed, 2 Jun 2010 09:06:32 -0400 Received: from qmta13.westchester.pa.mail.comcast.net ([76.96.59.243]:57787 "EHLO qmta13.westchester.pa.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757866Ab0FBNGa (ORCPT ); Wed, 2 Jun 2010 09:06:30 -0400 Received: from omta02.westchester.pa.mail.comcast.net ([76.96.62.19]) by qmta13.westchester.pa.mail.comcast.net with comcast id Qzd41e0080QuhwU5D16X4b; Wed, 02 Jun 2010 13:06:31 +0000 Received: from hal.comcast.net ([75.69.247.31]) by omta02.westchester.pa.mail.comcast.net with comcast id R16W1e0030hNrtn3N16WJN; Wed, 02 Jun 2010 13:06:31 +0000 Received: from hal.comcast.net (localhost.localdomain [127.0.0.1]) by hal.comcast.net (8.14.3/8.14.3) with ESMTP id o52D8iqU004762; Wed, 2 Jun 2010 09:08:50 -0400 Received: (from hnrose@localhost) by hal.comcast.net (8.14.3/8.14.3/Submit) id o52D4FSX004726; Wed, 2 Jun 2010 09:04:15 -0400 Date: Wed, 2 Jun 2010 09:04:15 -0400 From: Hal Rosenstock To: sashak@voltaire.com Cc: weiny2@llnl.gov, linux-rdma@vger.kernel.org Subject: [PATCH 2/2] infiniband-diags/libibnetdisc/chassis.c: In group_nodes, set fabric->chassis Message-ID: <20100602130415.GB4715@comcast.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) 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.3 (demeter.kernel.org [140.211.167.41]); Wed, 02 Jun 2010 13:06:32 +0000 (UTC) diff --git a/infiniband-diags/libibnetdisc/src/chassis.c b/infiniband-diags/libibnetdisc/src/chassis.c index f5f683e..25d7473 100644 --- a/infiniband-diags/libibnetdisc/src/chassis.c +++ b/infiniband-diags/libibnetdisc/src/chassis.c @@ -2,6 +2,7 @@ * Copyright (c) 2004-2009 Voltaire Inc. All rights reserved. * Copyright (c) 2007 Xsigo Systems Inc. All rights reserved. * Copyright (c) 2008 Lawrence Livermore National Lab. All rights reserved. + * Copyright (c) 2010 HNR Consulting. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -1074,6 +1075,8 @@ int group_nodes(ibnd_fabric_t * fabric) chassis_scan.current_chassis->chassisguid = get_chassisguid(node); chassis_scan.current_chassis->nodecount = 1; + if (!fabric->chassis) + fabric->chassis = chassis_scan.first_chassis; } } } @@ -1107,5 +1110,6 @@ cleanup: free(ch); ch = ch_next; } + fabric->chassis = NULL; return -1; }