]> git.openfabrics.org - ~emulex/compat.git/commitdiff
compat: backport linux/pci-aspm.h
authorHauke Mehrtens <hauke@hauke-m.de>
Thu, 2 Sep 2010 13:19:13 +0000 (06:19 -0700)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Thu, 2 Sep 2010 15:16:03 +0000 (08:16 -0700)
pci-aspm.h was introduced in kernel 2.6.25 and is used by the ath5k and iwlwifi driver.

v2: Do not place the empty functions into pci-aspm.h. Now we do not
have to change pci-aspm.h when it changes in the mainline kernel only
compat-2.6.26.h has to be changed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
include/linux/compat-2.6.26.h
include/linux/pci-aspm.h [new file with mode: 0644]

index 825117742ba844fa68a3c354b96439680f87bbbb..30ee46c04d633bf8d5d60b304ee0347764ee75b1 100644 (file)
@@ -394,6 +394,15 @@ struct net *dev_net(const struct net_device *dev)
 
 #endif /* xtensa */
 
+#define PCIE_LINK_STATE_L0S    1
+#define PCIE_LINK_STATE_L1     2
+#define PCIE_LINK_STATE_CLKPM  4
+
+static inline void pci_disable_link_state(struct pci_dev *pdev, int state)
+{
+}
+/* source: include/linux/pci-aspm.h */
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)) */
 
 #endif /* LINUX_26_26_COMPAT_H */
diff --git a/include/linux/pci-aspm.h b/include/linux/pci-aspm.h
new file mode 100644 (file)
index 0000000..2bc6efb
--- /dev/null
@@ -0,0 +1,5 @@
+#include <linux/version.h>
+
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25))
+#include_next <linux/pci-aspm.h>
+#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25)) */