From patchwork Tue Dec 28 15:27:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Marciniszyn X-Patchwork-Id: 436381 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBSFc3Mh018707 for ; Tue, 28 Dec 2010 15:38:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754073Ab0L1PiD (ORCPT ); Tue, 28 Dec 2010 10:38:03 -0500 Received: from [198.186.4.11] ([198.186.4.11]:4757 "EHLO kop-dev-sles11-04.qlogic.org" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752292Ab0L1PiA (ORCPT ); Tue, 28 Dec 2010 10:38:00 -0500 Received: from kop-dev-sles11-04.qlogic.org (localhost [127.0.0.1]) by kop-dev-sles11-04.qlogic.org (Postfix) with ESMTP id 38F0027E2CF; Tue, 28 Dec 2010 10:27:37 -0500 (EST) Subject: [PATCH 09/24] IB/qib: Multi Florida HCA Hosts panic on reboot To: Roland Dreier From: Mike Marciniszyn Cc: linux-rdma@vger.kernel.org Date: Tue, 28 Dec 2010 10:27:37 -0500 Message-ID: <20101228152737.19960.79055.stgit@kop-dev-sles11-04.qlogic.org> In-Reply-To: <20101228152648.19960.84006.stgit@kop-dev-sles11-04.qlogic.org> References: <20101228152648.19960.84006.stgit@kop-dev-sles11-04.qlogic.org> User-Agent: StGit/0.15 MIME-Version: 1.0 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 (demeter1.kernel.org [140.211.167.41]); Tue, 28 Dec 2010 15:38:04 +0000 (UTC) diff --git a/drivers/infiniband/hw/qib/qib_init.c b/drivers/infiniband/hw/qib/qib_init.c index f3b5039..7896afb 100644 --- a/drivers/infiniband/hw/qib/qib_init.c +++ b/drivers/infiniband/hw/qib/qib_init.c @@ -92,9 +92,11 @@ unsigned long *qib_cpulist; /* set number of contexts we'll actually use */ void qib_set_ctxtcnt(struct qib_devdata *dd) { - if (!qib_cfgctxts) + if (!qib_cfgctxts) { dd->cfgctxts = dd->first_user_ctxt + num_online_cpus(); - else if (qib_cfgctxts < dd->num_pports) + if (dd->cfgctxts > dd->ctxtcnt) + dd->cfgctxts = dd->ctxtcnt; + } else if (qib_cfgctxts < dd->num_pports) dd->cfgctxts = dd->ctxtcnt; else if (qib_cfgctxts <= dd->ctxtcnt) dd->cfgctxts = qib_cfgctxts;