Page MenuHomeFreeBSD

D36749.id111071.diff
No OneTemporary

D36749.id111071.diff

diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h
--- a/sys/compat/linuxkpi/common/include/linux/device.h
+++ b/sys/compat/linuxkpi/common/include/linux/device.h
@@ -124,6 +124,7 @@
struct fwnode_handle *fwnode;
struct cdev *backlight_dev;
struct backlight_device *bd;
+ struct dev_pm_info power;
spinlock_t devres_lock;
struct list_head devres_head;
diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h
--- a/sys/compat/linuxkpi/common/include/linux/pci.h
+++ b/sys/compat/linuxkpi/common/include/linux/pci.h
@@ -202,6 +202,10 @@
#define PCI_POWER_ERROR PCI_POWERSTATE_UNKNOWN
+static const char *pci_power_names[] = {
+ "UNKNOWN", "D0", "D1", "D2", "D3hot", "D3cold"
+};
+
#define PCI_ERR_ROOT_COMMAND PCIR_AER_ROOTERR_CMD
#define PCI_ERR_ROOT_ERR_SRC PCIR_AER_COR_SOURCE_ID
@@ -288,6 +292,7 @@
struct pci_driver *pdrv;
struct pci_bus *bus;
struct pci_dev *root;
+ pci_power_t current_state;
uint16_t device;
uint16_t vendor;
uint16_t subsystem_vendor;
@@ -1576,6 +1581,12 @@
{
}
+static inline const char *
+pci_power_name(pci_power_t state)
+{
+ return (pci_power_names[1 + (int) state]);
+}
+
static inline int
pcie_get_readrq(struct pci_dev *dev)
{
diff --git a/sys/compat/linuxkpi/common/include/linux/pm.h b/sys/compat/linuxkpi/common/include/linux/pm.h
--- a/sys/compat/linuxkpi/common/include/linux/pm.h
+++ b/sys/compat/linuxkpi/common/include/linux/pm.h
@@ -33,6 +33,8 @@
#ifndef _LINUXKPI_LINUX_PM_H
#define _LINUXKPI_LINUX_PM_H
+#include <asm/atomic.h>
+
/* Needed but breaks linux_usb.c */
/* #include <linux/completion.h> */
/* #include <linux/wait.h> */
@@ -44,6 +46,10 @@
struct dev_pm_domain {
};
+struct dev_pm_info {
+ atomic_t usage_count;
+};
+
#define PM_EVENT_FREEZE 0x0001
#define PM_EVENT_SUSPEND 0x0002

File Metadata

Mime Type
text/plain
Expires
Sun, Apr 19, 5:16 AM (7 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31747683
Default Alt Text
D36749.id111071.diff (1 KB)

Event Timeline