From owner-cvs-src@FreeBSD.ORG Sun Aug 24 15:06:02 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 6AC2A1065756; Sun, 24 Aug 2008 15:06:02 +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 467E88FC1B; Sun, 24 Aug 2008 15:06:02 +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 m7OF62s8011756; Sun, 24 Aug 2008 15:06:02 GMT (envelope-from marius@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m7OF62oi011755; Sun, 24 Aug 2008 15:06:02 GMT (envelope-from marius@repoman.freebsd.org) Message-Id: <200808241506.m7OF62oi011755@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to marius@repoman.freebsd.org using -f From: Marius Strobl Date: Sun, 24 Aug 2008 15:05:46 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD 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: Sun, 24 Aug 2008 15:06:02 -0000 marius 2008-08-24 15:05:46 UTC FreeBSD src repository Modified files: sys/sparc64/pci ofw_pcibus.c Log: SVN rev 182108 on 2008-08-24 15:05:46Z by marius 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. MFC after: 3 days Revision Changes Path 1.21 +58 -20 src/sys/sparc64/pci/ofw_pcibus.c