From patchwork Fri Sep 14 06:16:14 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Chu X-Patchwork-Id: 1455771 X-Patchwork-Delegate: ira.weiny@intel.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id B8C19DF280 for ; Fri, 14 Sep 2012 06:15:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755138Ab2INGPz (ORCPT ); Fri, 14 Sep 2012 02:15:55 -0400 Received: from prdiron-1.llnl.gov ([128.15.143.171]:64441 "EHLO prdiron-1.llnl.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755068Ab2INGPz (ORCPT ); Fri, 14 Sep 2012 02:15:55 -0400 X-Attachments: Received: from vpna-user-128-15-244-27.llnl.gov (HELO [128.15.244.27]) ([128.15.244.27]) by prdiron-1.llnl.gov with ESMTP; 13 Sep 2012 23:15:54 -0700 Subject: [PATCH] infiniband-diags/src/perfquery.c: Fix all_ports corner case From: Al Chu To: linux-rdma@vger.kernel.org Date: Thu, 13 Sep 2012 23:16:14 -0700 Message-Id: <1347603374.19910.3.camel@crazyclimber.llnl.gov> Mime-Version: 1.0 X-Mailer: Evolution 2.12.3 (2.12.3-19.el5) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org if AllPortSelect is not supported and --all_ports is specified, it should only emulate AllPortSelect if no port is specified or the all ports port number (255) is specified. Signed-off-by: Albert Chu --- src/perfquery.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/perfquery.c b/src/perfquery.c index 27ec4f7..605ece9 100644 --- a/src/perfquery.c +++ b/src/perfquery.c @@ -783,7 +783,7 @@ int main(int argc, char **argv) if (!(cap_mask & IB_PM_ALL_PORT_SELECT)) { /* bit 8 is AllPortSelect */ if (!all_ports && port == ALL_PORTS) IBERROR("AllPortSelect not supported"); - if (all_ports) + if (all_ports && port == ALL_PORTS) all_ports_loop = 1; }