Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107662998
D19717.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D19717.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D19717: devices behind downstream bridges should still get DMAR protection
Attached
Detach File
Event Timeline
Log In to Comment