summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2013-04-14 14:02:34 +0000
committerkib <kib@FreeBSD.org>2013-04-14 14:02:34 +0000
commit0749739009c894564d14ddf50ccc39ae723ad30c (patch)
treed61640b36103df50ce39bec8bb652ea64ce53cc4 /sys/dev/pci
parentc7cb06a811249addb8c109bf748aba476b136fbc (diff)
downloadFreeBSD-src-0749739009c894564d14ddf50ccc39ae723ad30c.zip
FreeBSD-src-0749739009c894564d14ddf50ccc39ae723ad30c.tar.gz
Usnure that PCI bus BIS_GET_DMA_TAG() method sees the actual PCI
device which makes the request for dma tag, instead of some descendant of the PCI device, by creating a pass-through trampoline for vga_pci and ata_pci buses. Sponsored by: The FreeBSD Foundation Suggested by: jhb Discussed with: jhb, mav MFC after: 1 week
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/vga_pci.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c
index e52d5d8..dc3237c 100644
--- a/sys/dev/pci/vga_pci.c
+++ b/sys/dev/pci/vga_pci.c
@@ -419,6 +419,13 @@ vga_pci_msix_count(device_t dev, device_t child)
return (pci_msix_count(dev));
}
+static bus_dma_tag_t
+vga_pci_get_dma_tag(device_t bus, device_t child)
+{
+
+ return (bus_get_dma_tag(bus));
+}
+
static device_method_t vga_pci_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, vga_pci_probe),
@@ -436,6 +443,7 @@ static device_method_t vga_pci_methods[] = {
DEVMETHOD(bus_release_resource, vga_pci_release_resource),
DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
+ DEVMETHOD(bus_get_dma_tag, vga_pci_get_dma_tag),
/* PCI interface */
DEVMETHOD(pci_read_config, vga_pci_read_config),
OpenPOWER on IntegriCloud