aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/acpica
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2017-02-15 23:49:28 +0000
committerWarner Losh <imp@FreeBSD.org>2017-02-15 23:49:28 +0000
commitc21a66649fc10ae9de19be4268263936d52a4258 (patch)
treeb2a5b82b3241f3cd1469e7b5579d2ccc54b5b06f /sys/dev/acpica
parent1085c4fa53644092f7bcf1d195c3090b785da4d0 (diff)
Notes
Diffstat (limited to 'sys/dev/acpica')
-rw-r--r--sys/dev/acpica/acpi_pcib_acpi.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c
index 190674a74623..9a66336e7c62 100644
--- a/sys/dev/acpica/acpi_pcib_acpi.c
+++ b/sys/dev/acpica/acpi_pcib_acpi.c
@@ -309,15 +309,19 @@ acpi_pcib_osc(struct acpi_hpcib_softc *sc)
0x96, 0x57, 0x74, 0x41, 0xc0, 0x3d, 0xd7, 0x66
};
+ /* Status Field */
+ cap_set[PCI_OSC_STATUS] = 0;
+
/* Support Field: Extended PCI Config Space, MSI */
- cap_set[1] = 0x11;
+ cap_set[PCI_OSC_SUPPORT] = PCIM_OSC_SUPPORT_EXT_PCI_CONF |
+ PCIM_OSC_SUPPORT_MSI;
/* Control Field */
- cap_set[2] = 0;
+ cap_set[PCI_OSC_CTL] = 0;
#ifdef PCI_HP
/* Control Field: PCI Express Native Hot Plug */
- cap_set[2] |= 0x1;
+ cap_set[PCI_OSC_CTL] |= PCIM_OSC_CTL_PCIE_HP;
#endif
status = acpi_EvaluateOSC(sc->ap_handle, pci_host_bridge_uuid, 1,
@@ -330,10 +334,16 @@ acpi_pcib_osc(struct acpi_hpcib_softc *sc)
return;
}
- if (cap_set[0] != 0) {
+ if (cap_set[PCI_OSC_STATUS] != 0) {
device_printf(sc->ap_dev, "_OSC returned error %#x\n",
cap_set[0]);
}
+
+#ifdef PCI_HP
+ if ((cap_set[PCI_OSC_CTL] & PCIM_OSC_CTL_PCIE_HP) == 0 && bootverbose) {
+ device_printf(sc->ap_dev, "_OSC didn't allow HP control\n");
+ }
+#endif
}
static int