[Midnightbsd-cvs] src [9284] trunk/sys/dev: ensure that PCI bus BUS_GET_DMA_TAG method ses the actual device that maeks the request for the dma tag instead of a decendeant.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Thu Mar 2 18:01:03 EST 2017


Revision: 9284
          http://svnweb.midnightbsd.org/src/?rev=9284
Author:   laffer1
Date:     2017-03-02 18:01:03 -0500 (Thu, 02 Mar 2017)
Log Message:
-----------
ensure that PCI bus BUS_GET_DMA_TAG method ses the actual device that maeks the request for the dma tag instead of a decendeant. freebsd svn 249723

Modified Paths:
--------------
    trunk/sys/dev/ata/ata-pci.c
    trunk/sys/dev/pci/vga_pci.c

Modified: trunk/sys/dev/ata/ata-pci.c
===================================================================
--- trunk/sys/dev/ata/ata-pci.c	2017-03-02 22:59:55 UTC (rev 9283)
+++ trunk/sys/dev/ata/ata-pci.c	2017-03-02 23:01:03 UTC (rev 9284)
@@ -572,6 +572,13 @@
 	return (0);
 }
 
+static bus_dma_tag_t
+ata_pci_get_dma_tag(device_t bus, device_t child)
+{
+
+	return (bus_get_dma_tag(bus));
+}
+
 static device_method_t ata_pci_methods[] = {
     /* device interface */
     DEVMETHOD(device_probe,             ata_pci_probe),
@@ -594,6 +601,7 @@
     DEVMETHOD(pci_write_config,		ata_pci_write_config),
     DEVMETHOD(bus_print_child,		ata_pci_print_child),
     DEVMETHOD(bus_child_location_str,	ata_pci_child_location_str),
+    DEVMETHOD(bus_get_dma_tag,		ata_pci_get_dma_tag),
 
     DEVMETHOD_END
 };

Modified: trunk/sys/dev/pci/vga_pci.c
===================================================================
--- trunk/sys/dev/pci/vga_pci.c	2017-03-02 22:59:55 UTC (rev 9283)
+++ trunk/sys/dev/pci/vga_pci.c	2017-03-02 23:01:03 UTC (rev 9284)
@@ -393,6 +393,13 @@
 	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),
@@ -410,6 +417,7 @@
 	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),



More information about the Midnightbsd-cvs mailing list