From owner-cvs-src@FreeBSD.ORG Thu Aug 28 18:05:33 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4085106568B; Thu, 28 Aug 2008 18:05:33 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B03D28FC12; Thu, 28 Aug 2008 18:05:33 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m7SI5X6S049932; Thu, 28 Aug 2008 18:05:33 GMT (envelope-from marius@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m7SI5Xkm049931; Thu, 28 Aug 2008 18:05:33 GMT (envelope-from marius@repoman.freebsd.org) Message-Id: <200808281805.m7SI5Xkm049931@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to marius@repoman.freebsd.org using -f From: Marius Strobl Date: Thu, 28 Aug 2008 18:05:18 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_7 Cc: Subject: cvs commit: src/sys/sparc64/pci ofw_pcibus.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Aug 2008 18:05:33 -0000 marius 2008-08-28 18:05:18 UTC FreeBSD src repository Modified files: (Branch: RELENG_7) sys/sparc64/pci ofw_pcibus.c Log: SVN rev 182385 on 2008-08-28 18:05:18Z by marius MFC: r182108 The PCI specifications don't explain the details on how to calculate the latency based on the Min_Gnt register so use the algorithm found in OpenSolaris as they probably know how to interpret the value Sun puts into these registers (previously, the latency calculated for 66MHz was most likely wrong) and for bridges additionally set up the secondary latency register. Also set up the bridge control register the way it's done in OpenSolaris. As the latency register don't apply to PCI-Express and the bridge control setup wasn't tested on sun4v (besides most likely not being needed), expand the #ifndef SUN4V accordingly. Revision Changes Path 1.16.2.5 +58 -20 src/sys/sparc64/pci/ofw_pcibus.c