Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153669667
D42186.id128818.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
754 B
Referenced Files
None
Subscribers
None
D42186.id128818.diff
View Options
diff --git a/sys/dev/pci/pci_host_generic.c b/sys/dev/pci/pci_host_generic.c
--- a/sys/dev/pci/pci_host_generic.c
+++ b/sys/dev/pci/pci_host_generic.c
@@ -83,7 +83,7 @@
uint64_t phys_base;
uint64_t pci_base;
uint64_t size;
- int error;
+ int domain, error;
int rid, tuple;
sc = device_get_softc(dev);
@@ -104,6 +104,13 @@
if (error != 0)
return (error);
+ /*
+ * Attempt to set the domain. If it's missing, or we are unable to
+ * set it then memory allocations may be placed in the wrong domain.
+ */
+ if (bus_get_domain(dev, &domain) == 0)
+ (void)bus_dma_tag_set_domain(sc->dmat, domain);
+
if ((sc->quirks & PCIE_CUSTOM_CONFIG_SPACE_QUIRK) == 0) {
rid = 0;
sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 23, 7:24 PM (6 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32040703
Default Alt Text
D42186.id128818.diff (754 B)
Attached To
Mode
D42186: pci: Set the domain in the pci_generic driver
Attached
Detach File
Event Timeline
Log In to Comment