compat: backport PCI MSI-X entry definitions
authorLuis R. Rodriguez <mcgrof@do-not-panic.com>
Sat, 1 Dec 2012 19:22:09 +0000 (11:22 -0800)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Sat, 1 Dec 2012 19:22:09 +0000 (11:22 -0800)
The PCI MSI-X entries were moved to uapi headers on v2.6.38
to allow drivers to use it. Older kernels will need this.

mcgrof@frijol ~/linux-stable (git::linux-3.2.y)$ git describe --contains 00aaaef9
v2.6.38-rc1~55^2~15

commit 00aaaef9a51a1a25c5d6d52ce510772f149a0eb0
Author: Sheng Yang <sheng@linux.intel.com>
Date:   Thu Nov 11 15:46:54 2010 +0800

    PCI: MSI: Move MSI-X entry definition to pci_regs.h

    Then it can be used by others.

Reviewed-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Reviewed-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Sheng Yang <sheng@linux.intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
include/linux/compat-2.6.38.h

index 1d725231b40063d1d9caec6fb10dbc1222b80951..676d5540788188b63452e9f49d6207b66327921f 100644 (file)
 #include <linux/etherdevice.h>
 #include <net/sch_generic.h>
 
+/* MSI-X entry's format */
+#define PCI_MSIX_ENTRY_SIZE            16
+#define  PCI_MSIX_ENTRY_LOWER_ADDR     0
+#define  PCI_MSIX_ENTRY_UPPER_ADDR     4
+#define  PCI_MSIX_ENTRY_DATA           8
+#define  PCI_MSIX_ENTRY_VECTOR_CTRL    12
+
 #if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30))
 static inline void bstats_update(struct gnet_stats_basic_packed *bstats,
                                 const struct sk_buff *skb)