Date: Mon, 4 May 2009 20:35:59 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/dev/pci pci.c pci_private.h pcireg.h Message-ID: <200905042036.n44KaHhW012434@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905042036.n44KaHhW012434>
