Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151900935
D51823.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
D51823.diff
View Options
diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h
--- a/sys/dev/acpica/acpivar.h
+++ b/sys/dev/acpica/acpivar.h
@@ -520,7 +520,8 @@
static __inline const char *
acpi_d_state_to_str(int state)
{
- const char *strs[ACPI_D_STATE_COUNT] = {"D0", "D1", "D2", "D3", "D3cold"};
+ const char *strs[ACPI_D_STATE_COUNT] = {"D0", "D1", "D2", "D3hot",
+ "D3cold"};
MPASS(state >= ACPI_STATE_D0 && state <= ACPI_D_STATES_MAX);
return (strs[state]);
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -81,9 +81,6 @@
#include <dev/iommu/iommu.h>
-#include <contrib/dev/acpica/include/acpi.h>
-#include <dev/acpica/acpivar.h>
-
#include "pcib_if.h"
#include "pci_if.h"
@@ -2900,7 +2897,8 @@
if (bootverbose)
pci_printf(cfg, "Transition from %s to %s\n",
- acpi_d_state_to_str(oldstate), acpi_d_state_to_str(state));
+ pci_powerstate_to_str(oldstate),
+ pci_powerstate_to_str(state));
PCI_WRITE_CONFIG(dev, child, cfg->pp.pp_location + PCIR_POWER_STATUS,
status, 2);
diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h
--- a/sys/dev/pci/pcivar.h
+++ b/sys/dev/pci/pcivar.h
@@ -516,8 +516,20 @@
#define PCI_POWERSTATE_D3_HOT 3
#define PCI_POWERSTATE_D3_COLD 4
#define PCI_POWERSTATE_D3 PCI_POWERSTATE_D3_COLD
+#define PCI_POWERSTATE_MAX PCI_POWERSTATE_D3_COLD
+#define PCI_POWERSTATE_COUNT 5
#define PCI_POWERSTATE_UNKNOWN -1
+static __inline const char *
+pci_powerstate_to_str(int state)
+{
+ const char *strs[PCI_POWERSTATE_COUNT] = {"D0", "D1", "D2", "D3hot",
+ "D3cold"};
+
+ MPASS(state >= PCI_POWERSTATE_D0 && state <= PCI_POWERSTATE_MAX);
+ return (strs[state]);
+}
+
static __inline int
pci_set_powerstate(device_t dev, int state)
{
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Apr 12, 10:51 AM (10 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31343573
Default Alt Text
D51823.diff (1 KB)
Attached To
Mode
D51823: pci: Fix dependency on ACPICA for non-ACPI builds
Attached
Detach File
Event Timeline
Log In to Comment