Page MenuHomeFreeBSD

D43430.diff
No OneTemporary

D43430.diff

diff --git a/sys/x86/include/legacyvar.h b/sys/x86/include/legacyvar.h
--- a/sys/x86/include/legacyvar.h
+++ b/sys/x86/include/legacyvar.h
@@ -62,6 +62,10 @@
struct resource *r, rman_res_t start, rman_res_t end);
int legacy_pcib_release_resource(device_t dev, device_t child, int type,
int rid, struct resource *r);
+int legacy_pcib_activate_resource(device_t dev, device_t child, int type,
+ int rid, struct resource *r);
+int legacy_pcib_deactivate_resource(device_t dev, device_t child, int type,
+ int rid, struct resource *r);
int legacy_pcib_alloc_msi(device_t pcib, device_t dev, int count,
int maxcount, int *irqs);
int legacy_pcib_alloc_msix(device_t pcib, device_t dev, int *irq);
diff --git a/sys/x86/pci/pci_bus.c b/sys/x86/pci/pci_bus.c
--- a/sys/x86/pci/pci_bus.c
+++ b/sys/x86/pci/pci_bus.c
@@ -625,6 +625,24 @@
return (pci_domain_release_bus(0, child, rid, r));
return (bus_generic_release_resource(dev, child, type, rid, r));
}
+
+int
+legacy_pcib_activate_resource(device_t dev, device_t child, int type, int rid,
+ struct resource *r)
+{
+ if (type == PCI_RES_BUS)
+ return (pci_domain_activate_bus(0, child, rid, r));
+ return (bus_generic_activate_resource(dev, child, type, rid, r));
+}
+
+int
+legacy_pcib_deactivate_resource(device_t dev, device_t child, int type, int rid,
+ struct resource *r)
+{
+ if (type == PCI_RES_BUS)
+ return (pci_domain_deactivate_bus(0, child, rid, r));
+ return (bus_generic_deactivate_resource(dev, child, type, rid, r));
+}
#endif
static device_method_t legacy_pcib_methods[] = {
@@ -643,12 +661,14 @@
#if defined(NEW_PCIB) && defined(PCI_RES_BUS)
DEVMETHOD(bus_adjust_resource, legacy_pcib_adjust_resource),
DEVMETHOD(bus_release_resource, legacy_pcib_release_resource),
+ DEVMETHOD(bus_activate_resource, legacy_pcib_activate_resource),
+ DEVMETHOD(bus_deactivate_resource, legacy_pcib_deactivate_resource),
#else
DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource),
DEVMETHOD(bus_release_resource, bus_generic_release_resource),
-#endif
DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
+#endif
DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr),
diff --git a/sys/x86/pci/qpi.c b/sys/x86/pci/qpi.c
--- a/sys/x86/pci/qpi.c
+++ b/sys/x86/pci/qpi.c
@@ -284,12 +284,14 @@
DEVMETHOD(bus_alloc_resource, qpi_pcib_alloc_resource),
DEVMETHOD(bus_adjust_resource, legacy_pcib_adjust_resource),
DEVMETHOD(bus_release_resource, legacy_pcib_release_resource),
+ DEVMETHOD(bus_activate_resource, legacy_pcib_activate_resource),
+ DEVMETHOD(bus_deactivate_resource, legacy_pcib_deactivate_resource),
#else
DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource),
DEVMETHOD(bus_release_resource, bus_generic_release_resource),
-#endif
DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
+#endif
DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr),
diff --git a/sys/x86/x86/mptable_pci.c b/sys/x86/x86/mptable_pci.c
--- a/sys/x86/x86/mptable_pci.c
+++ b/sys/x86/x86/mptable_pci.c
@@ -174,11 +174,13 @@
#endif
#if defined(NEW_PCIB) && defined(PCI_RES_BUS)
DEVMETHOD(bus_release_resource, legacy_pcib_release_resource),
+ DEVMETHOD(bus_activate_resource, legacy_pcib_activate_resource),
+ DEVMETHOD(bus_deactivate_resource, legacy_pcib_deactivate_resource),
#else
DEVMETHOD(bus_release_resource, bus_generic_release_resource),
-#endif
DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
+#endif
DEVMETHOD(bus_setup_intr, bus_generic_setup_intr),
DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr),

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 8, 10:49 AM (21 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14533633
Default Alt Text
D43430.diff (3 KB)

Event Timeline