From owner-cvs-src-old@FreeBSD.ORG Mon May 4 20:36:17 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E843F106568C for ; Mon, 4 May 2009 20:36:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id D59B18FC0C for ; Mon, 4 May 2009 20:36:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n44KaHHU012435 for ; Mon, 4 May 2009 20:36:17 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n44KaHhW012434 for cvs-src-old@freebsd.org; Mon, 4 May 2009 20:36:17 GMT (envelope-from jhb@repoman.freebsd.org) Message-Id: <200905042036.n44KaHhW012434@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to jhb@repoman.freebsd.org using -f From: John Baldwin Date: Mon, 4 May 2009 20:35:59 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: RELENG_7 Subject: cvs commit: src/sys/dev/pci pci.c pci_private.h pcireg.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 May 2009 20:36:18 -0000 jhb 2009-05-04 20:35:59 UTC FreeBSD src repository Modified files: (Branch: RELENG_7) sys/dev/pci pci.c pci_private.h pcireg.h Log: SVN rev 191795 on 2009-05-04 20:35:59Z by jhb MFC: Various fixes to the PCI resource allocation code: - Disabling decoding of BARs via the PCI command register before writing to the BARs to size them. - Don't free resources decoded by a BAR when the device driver releases a BAR. Instead, the PCI bus now owns unclaimed BARs and gives them to drivers on demand. When a driver releases a BAR, the PCI bus reclaims it and leaves the resource range allocated. This also prevents drivers from allocating the same resource multiple times. - Move the activation of BARs by enabling decoding in the PCI command register into bus_activate_resource() so that it always happens after the BAR is fully programmed. - Always read/write the full 64-bit value of 64-bit BARs. - Consolidate duplicated code for reading and sizing BARs and writing base address to BARs. Revision Changes Path 1.355.2.10 +258 -171 src/sys/dev/pci/pci.c 1.25.2.1 +4 -0 src/sys/dev/pci/pci_private.h 1.64.2.5 +1 -1 src/sys/dev/pci/pcireg.h