From patchwork Sun Apr 25 11:04:07 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Eli Dorfman (Voltaire)" X-Patchwork-Id: 94935 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 o3PAmx9w015707 for ; Sun, 25 Apr 2010 10:48:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752219Ab0DYKsy (ORCPT ); Sun, 25 Apr 2010 06:48:54 -0400 Received: from fwil.voltaire.com ([193.47.165.2]:47073 "EHLO exil.voltaire.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751918Ab0DYKsx (ORCPT ); Sun, 25 Apr 2010 06:48:53 -0400 Received: from [172.25.1.69] ([172.25.1.69]) by exil.voltaire.com with Microsoft SMTPSVC(6.0.3790.4675); Sun, 25 Apr 2010 13:48:51 +0300 Message-ID: <4BD421A7.7040009@gmail.com> Date: Sun, 25 Apr 2010 14:04:07 +0300 From: "Eli Dorfman (Voltaire)" User-Agent: Thunderbird 2.0.0.17 (X11/20080914) MIME-Version: 1.0 To: linux-rdma CC: Sasha Khapyorsky , Erez Cohen Subject: [PATCH] opensm: Always set enabled speed and width X-OriginalArrivalTime: 25 Apr 2010 10:48:51.0020 (UTC) FILETIME=[E437B8C0:01CAE464] 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]); Sun, 25 Apr 2010 10:49:00 +0000 (UTC) diff --git a/infiniband-diags/src/ibportstate.c b/infiniband-diags/src/ibportstate.c index 66f069e..b99c0e1 100644 --- a/infiniband-diags/src/ibportstate.c +++ b/infiniband-diags/src/ibportstate.c @@ -64,13 +64,13 @@ enum port_ops { }; struct ibmad_port *srcport; -int speed = 15; -int width = 255; +int speed = 0; /* no state change */ +int width = 0; /* no state change */ int lid; int smlid; int lmc; int mtu; -int vls; +int vls = 0; /* no state change */ struct { const char *name; @@ -394,12 +394,11 @@ int main(int argc, char **argv) mad_set_field(data, 0, IB_PORT_STATE_F, 4); break; } - if (port_args[SPEED].set) - mad_set_field(data, 0, IB_PORT_LINK_SPEED_ENABLED_F, - speed); - if (port_args[WIDTH].set) - mad_set_field(data, 0, IB_PORT_LINK_WIDTH_ENABLED_F, - width); + + /* always set enabled speed/width - defaults to NOP */ + mad_set_field(data, 0, IB_PORT_LINK_SPEED_ENABLED_F, speed); + mad_set_field(data, 0, IB_PORT_LINK_WIDTH_ENABLED_F, width); + if (port_args[VLS].set) mad_set_field(data, 0, IB_PORT_OPER_VLS_F, vls); if (port_args[MTU].set)