Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759268AbYGULRA (ORCPT ); Mon, 21 Jul 2008 07:17:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758822AbYGULQl (ORCPT ); Mon, 21 Jul 2008 07:16:41 -0400 Received: from mtagate5.uk.ibm.com ([195.212.29.138]:52534 "EHLO mtagate5.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750698AbYGULQk (ORCPT ); Mon, 21 Jul 2008 07:16:40 -0400 From: Joachim Fenkes To: "LinuxPPC-Dev" , LKML , "OF-General" , Roland Dreier , "OF-EWG" Subject: [PATCH 2/2] IB/ehca: Default value for Local CA ACK Delay User-Agent: KMail/1.9.1 Cc: "Hoang-Nam Nguyen" , Christoph Raisch , Stefan Roscher , Alexander Schmidt References: <200807211313.23648.fenkes@de.ibm.com> In-Reply-To: <200807211313.23648.fenkes@de.ibm.com> MIME-Version: 1.0 Content-Disposition: inline X-Length: 3080 Date: Mon, 21 Jul 2008 13:16:36 +0200 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200807211316.37224.fenkes@de.ibm.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1358 Lines: 32 Some firmware versions report a Local CA ACK Delay of 0. In that case, return a more sensible default value of 12 (-> 16 msec) instead. Signed-off-by: Joachim Fenkes --- drivers/infiniband/hw/ehca/ehca_hca.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/infiniband/hw/ehca/ehca_hca.c b/drivers/infiniband/hw/ehca/ehca_hca.c index bc3b37d..4628822 100644 --- a/drivers/infiniband/hw/ehca/ehca_hca.c +++ b/drivers/infiniband/hw/ehca/ehca_hca.c @@ -114,7 +114,9 @@ int ehca_query_device(struct ib_device *ibdev, struct ib_device_attr *props) } props->max_pkeys = 16; - props->local_ca_ack_delay = min_t(u8, rblock->local_ca_ack_delay, 255); + /* Some FW versions say 0 here; insert sensible value in that case */ + props->local_ca_ack_delay = rblock->local_ca_ack_delay ? + min_t(u8, rblock->local_ca_ack_delay, 255) : 12; props->max_raw_ipv6_qp = limit_uint(rblock->max_raw_ipv6_qp); props->max_raw_ethy_qp = limit_uint(rblock->max_raw_ethy_qp); props->max_mcast_grp = limit_uint(rblock->max_mcast_grp); -- 1.5.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/