Page MenuHomeFreeBSD

D43427.diff
No OneTemporary

D43427.diff

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

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)

Event Timeline