Page MenuHomeFreeBSD

D19717.diff
No OneTemporary

D19717.diff

Index: head/sys/dev/pci/pci.c
===================================================================
--- head/sys/dev/pci/pci.c
+++ head/sys/dev/pci/pci.c
@@ -31,6 +31,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "opt_acpi.h"
#include "opt_bus.h"
#include <sys/param.h>
@@ -5693,13 +5694,34 @@
return (&dinfo->resources);
}
+#ifdef ACPI_DMAR
+bus_dma_tag_t dmar_get_dma_tag(device_t dev, device_t child);
bus_dma_tag_t
pci_get_dma_tag(device_t bus, device_t dev)
{
+ bus_dma_tag_t tag;
+ struct pci_softc *sc;
+
+ if (device_get_parent(dev) == bus) {
+ /* try dmar and return if it works */
+ tag = dmar_get_dma_tag(bus, dev);
+ } else
+ tag = NULL;
+ if (tag == NULL) {
+ sc = device_get_softc(bus);
+ tag = sc->sc_dma_tag;
+ }
+ return (tag);
+}
+#else
+bus_dma_tag_t
+pci_get_dma_tag(device_t bus, device_t dev)
+{
struct pci_softc *sc = device_get_softc(bus);
return (sc->sc_dma_tag);
}
+#endif
uint32_t
pci_read_config_method(device_t dev, device_t child, int reg, int width)

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 18, 8:56 AM (15 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15852812
Default Alt Text
D19717.diff (1 KB)

Event Timeline