Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102085194
D43427.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
D43427.diff
View Options
diff --git a/sys/dev/pci/pci_subr.c b/sys/dev/pci/pci_subr.c
--- a/sys/dev/pci/pci_subr.c
+++ b/sys/dev/pci/pci_subr.c
@@ -379,6 +379,38 @@
#endif
return (rman_release_resource(r));
}
+
+int
+pci_domain_activate_bus(int domain, device_t dev, int rid, struct resource *r)
+{
+#ifdef INVARIANTS
+ struct pci_domain *d;
+#endif
+
+ if (domain < 0 || domain > PCI_DOMAINMAX)
+ return (EINVAL);
+#ifdef INVARIANTS
+ d = pci_find_domain(domain);
+ KASSERT(rman_is_region_manager(r, &d->pd_bus_rman), ("bad resource"));
+#endif
+ return (rman_activate_resource(r));
+}
+
+int
+pci_domain_deactivate_bus(int domain, device_t dev, int rid, struct resource *r)
+{
+#ifdef INVARIANTS
+ struct pci_domain *d;
+#endif
+
+ if (domain < 0 || domain > PCI_DOMAINMAX)
+ return (EINVAL);
+#ifdef INVARIANTS
+ d = pci_find_domain(domain);
+ KASSERT(rman_is_region_manager(r, &d->pd_bus_rman), ("bad resource"));
+#endif
+ return (rman_deactivate_resource(r));
+}
#endif /* PCI_RES_BUS */
#endif /* NEW_PCIB */
diff --git a/sys/dev/pci/pcib_private.h b/sys/dev/pci/pcib_private.h
--- a/sys/dev/pci/pcib_private.h
+++ b/sys/dev/pci/pcib_private.h
@@ -160,6 +160,10 @@
struct resource *r, rman_res_t start, rman_res_t end);
int pci_domain_release_bus(int domain, device_t dev, int rid,
struct resource *r);
+int pci_domain_activate_bus(int domain, device_t dev, int rid,
+ struct resource *r);
+int pci_domain_deactivate_bus(int domain, device_t dev, int rid,
+ struct resource *r);
struct resource *pcib_alloc_subbus(struct pcib_secbus *bus, device_t child,
int *rid, rman_res_t start, rman_res_t end, rman_res_t count,
u_int flags);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 8, 10:36 AM (21 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14533390
Default Alt Text
D43427.diff (1 KB)
Attached To
Mode
D43427: pcib: Add helper routines for [de]activating PCI_RES_BUS resources
Attached
Detach File
Event Timeline
Log In to Comment