From patchwork Thu Jul 28 13:59:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 1015762 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.4) with ESMTP id p6SDxDwQ022457 for ; Thu, 28 Jul 2011 13:59:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753769Ab1G1N7Q (ORCPT ); Thu, 28 Jul 2011 09:59:16 -0400 Received: from mail-ww0-f42.google.com ([74.125.82.42]:48603 "EHLO mail-ww0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754671Ab1G1N7P (ORCPT ); Thu, 28 Jul 2011 09:59:15 -0400 Received: by wwg11 with SMTP id 11so4017325wwg.1 for ; Thu, 28 Jul 2011 06:59:14 -0700 (PDT) Received: by 10.227.53.210 with SMTP id n18mr53091wbg.63.1311861554499; Thu, 28 Jul 2011 06:59:14 -0700 (PDT) Received: from [192.168.1.102] (c-71-192-10-85.hsd1.ma.comcast.net [71.192.10.85]) by mx.google.com with ESMTPS id fx12sm875927wbb.8.2011.07.28.06.59.12 (version=SSLv3 cipher=OTHER); Thu, 28 Jul 2011 06:59:13 -0700 (PDT) Message-ID: <4E316B2E.9000003@dev.mellanox.co.il> Date: Thu, 28 Jul 2011 09:59:10 -0400 From: Hal Rosenstock User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 MIME-Version: 1.0 To: Alex Netes CC: "linux-rdma@vger.kernel.org" Subject: [PATCH] opensm/osm_sa_class_port_info.c: Minor simplification to setting CapabilityMask2 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]); Thu, 28 Jul 2011 13:59:18 +0000 (UTC) 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_sa_class_port_info.c b/opensm/osm_sa_class_port_info.c index 743258d..a5d17a8 100644 --- a/opensm/osm_sa_class_port_info.c +++ b/opensm/osm_sa_class_port_info.c @@ -1,6 +1,6 @@ /* * Copyright (c) 2004-2008 Voltaire, Inc. All rights reserved. - * Copyright (c) 2002-2007 Mellanox Technologies LTD. All rights reserved. + * Copyright (c) 2002-2011 Mellanox Technologies LTD. All rights reserved. * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. * * This software is available to you under a choice of one of two @@ -73,6 +73,7 @@ static void cpi_rcv_respond(IN osm_sa_t * sa, IN const osm_madw_t * p_madw) ib_sa_mad_t *p_resp_sa_mad; ib_class_port_info_t *p_resp_cpi; ib_gid_t zero_gid; + uint32_t cap_mask2; uint8_t rtv; OSM_LOG_ENTER(sa->p_log); @@ -156,13 +157,11 @@ static void cpi_rcv_respond(IN osm_sa_t * sa, IN const osm_madw_t * p_madw) p_resp_cpi->cap_mask = OSM_CAP_IS_SUBN_GET_SET_NOTICE_SUP | OSM_CAP_IS_PORT_INFO_CAPMASK_MATCH_SUPPORTED; #endif + cap_mask2 = OSM_CAP2_IS_MCAST_TOP_SUPPORTED | + OSM_CAP2_IS_FULL_PORTINFO_REC_SUPPORTED; if (sa->p_subn->opt.qos) - ib_class_set_cap_mask2(p_resp_cpi, OSM_CAP2_IS_QOS_SUPPORTED | - OSM_CAP2_IS_MCAST_TOP_SUPPORTED | - OSM_CAP2_IS_FULL_PORTINFO_REC_SUPPORTED); - else - ib_class_set_cap_mask2(p_resp_cpi, OSM_CAP2_IS_MCAST_TOP_SUPPORTED | - OSM_CAP2_IS_FULL_PORTINFO_REC_SUPPORTED); + cap_mask2 |= OSM_CAP2_IS_QOS_SUPPORTED; + ib_class_set_cap_mask2(p_resp_cpi, cap_mask2); if (!sa->p_subn->opt.disable_multicast) p_resp_cpi->cap_mask |= OSM_CAP_IS_UD_MCAST_SUP;