diff -urN ofed_1_2/kernel_addons/backport/2.6.11/include/linux/dma-mapping.h infinipath-drivers/kernel_addons/backport/2.6.11/include/linux/dma-mapping.h
--- ofed_1_2/kernel_addons/backport/2.6.11/include/linux/dma-mapping.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.11/include/linux/dma-mapping.h	2007-02-13 10:54:57.659567000 -0800
@@ -0,0 +1,13 @@
+#ifndef _DMA_MAPPING_BACKPORT_H
+#define _DMA_MAPPING_BACKPORT_H
+
+#include_next <linux/dma-mapping.h>
+
+static inline int valid_dma_direction(int dma_direction)
+{
+	return ((dma_direction == DMA_BIDIRECTIONAL) ||
+		(dma_direction == DMA_TO_DEVICE) ||
+		(dma_direction == DMA_FROM_DEVICE));
+}
+
+#endif /* _DMA_MAPPING_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.11/include/linux/fs.h infinipath-drivers/kernel_addons/backport/2.6.11/include/linux/fs.h
--- ofed_1_2/kernel_addons/backport/2.6.11/include/linux/fs.h	2006-12-05 14:50:49.168983000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.11/include/linux/fs.h	2007-02-13 10:54:57.662561000 -0800
@@ -5,4 +5,9 @@
 
 #define i_private u.generic_ip
 
+static inline void inc_nlink(struct inode *inode)
+{
+        inode->i_nlink++;
+}
+
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.11/include/linux/pci.h infinipath-drivers/kernel_addons/backport/2.6.11/include/linux/pci.h
--- ofed_1_2/kernel_addons/backport/2.6.11/include/linux/pci.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.11/include/linux/pci.h	2007-02-13 10:54:57.664557000 -0800
@@ -0,0 +1,39 @@
+#ifndef _PCI_BACKPORT_H
+#define _PCI_BACKPORT_H
+
+#include_next <linux/pci.h>
+
+/*
+ * pci_find_next_capability - Find next capability after current position
+ * @dev: PCI device to query
+ * @pos: Position to search from
+ * @cap: capability code
+ */
+static inline int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap)
+{
+	u8 id;
+	int ttl = 48;
+	int ret;
+
+	while (ttl--) {
+		pci_read_config_byte(dev, pos + PCI_CAP_LIST_NEXT, &pos);
+		pos &= ~3;
+		if (pos < 0x40)
+			break;
+		pci_read_config_byte(dev, pos + PCI_CAP_LIST_ID, &id);
+		if (id == 0xff)
+			break;
+		if (id == cap) {
+			ret = pos;
+			goto bail;
+		}
+	}
+
+	ret = 0;
+
+bail:
+	return ret;
+}
+
+
+#endif /* _PCI_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.11/include/linux/utsname.h infinipath-drivers/kernel_addons/backport/2.6.11/include/linux/utsname.h
--- ofed_1_2/kernel_addons/backport/2.6.11/include/linux/utsname.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.11/include/linux/utsname.h	2007-02-13 10:54:57.667590000 -0800
@@ -0,0 +1,11 @@
+#ifndef _UTSNAME_BACKPORT_H
+#define _UTSNAME_BACKPORT_H
+
+#include_next <linux/utsname.h>
+
+static inline struct new_utsname *init_utsname(void)
+{
+        return &system_utsname;
+}
+
+#endif /* _UTSNAME_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.11/include/linux/vmalloc.h infinipath-drivers/kernel_addons/backport/2.6.11/include/linux/vmalloc.h
--- ofed_1_2/kernel_addons/backport/2.6.11/include/linux/vmalloc.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.11/include/linux/vmalloc.h	2007-02-13 10:54:57.670551000 -0800
@@ -0,0 +1,20 @@
+#ifndef _VMALLOC_BACKPORT_H
+#define _VMALLOC_BACKPORT_H
+
+#include_next <linux/vmalloc.h>
+#include <linux/string.h>
+
+static inline void *vmalloc_user(unsigned long size)
+{
+       void *ret = vmalloc(size);
+
+       if (ret == NULL)
+	       goto bail;
+
+       memset(ret, 0, size);
+
+bail:
+       return ret;
+}
+
+#endif /* _VMALLOC_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.11_FC4/include/linux/dma-mapping.h infinipath-drivers/kernel_addons/backport/2.6.11_FC4/include/linux/dma-mapping.h
--- ofed_1_2/kernel_addons/backport/2.6.11_FC4/include/linux/dma-mapping.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.11_FC4/include/linux/dma-mapping.h	2007-02-13 10:54:57.683539000 -0800
@@ -0,0 +1,13 @@
+#ifndef _DMA_MAPPING_BACKPORT_H
+#define _DMA_MAPPING_BACKPORT_H
+
+#include_next <linux/dma-mapping.h>
+
+static inline int valid_dma_direction(int dma_direction)
+{
+	return ((dma_direction == DMA_BIDIRECTIONAL) ||
+		(dma_direction == DMA_TO_DEVICE) ||
+		(dma_direction == DMA_FROM_DEVICE));
+}
+
+#endif /* _DMA_MAPPING_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.11_FC4/include/linux/fs.h infinipath-drivers/kernel_addons/backport/2.6.11_FC4/include/linux/fs.h
--- ofed_1_2/kernel_addons/backport/2.6.11_FC4/include/linux/fs.h	2006-12-05 14:50:49.242928000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.11_FC4/include/linux/fs.h	2007-02-13 10:54:57.686541000 -0800
@@ -5,4 +5,9 @@
 
 #define i_private u.generic_ip
 
+static inline void inc_nlink(struct inode *inode)
+{
+        inode->i_nlink++;
+}
+
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.11_FC4/include/linux/pci.h infinipath-drivers/kernel_addons/backport/2.6.11_FC4/include/linux/pci.h
--- ofed_1_2/kernel_addons/backport/2.6.11_FC4/include/linux/pci.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.11_FC4/include/linux/pci.h	2007-02-13 10:54:57.688542000 -0800
@@ -0,0 +1,39 @@
+#ifndef _PCI_BACKPORT_H
+#define _PCI_BACKPORT_H
+
+#include_next <linux/pci.h>
+
+/*
+ * pci_find_next_capability - Find next capability after current position
+ * @dev: PCI device to query
+ * @pos: Position to search from
+ * @cap: capability code
+ */
+static inline int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap)
+{
+	u8 id;
+	int ttl = 48;
+	int ret;
+
+	while (ttl--) {
+		pci_read_config_byte(dev, pos + PCI_CAP_LIST_NEXT, &pos);
+		pos &= ~3;
+		if (pos < 0x40)
+			break;
+		pci_read_config_byte(dev, pos + PCI_CAP_LIST_ID, &id);
+		if (id == 0xff)
+			break;
+		if (id == cap) {
+			ret = pos;
+			goto bail;
+		}
+	}
+
+	ret = 0;
+
+bail:
+	return ret;
+}
+
+
+#endif /* _PCI_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.11_FC4/include/linux/types.h infinipath-drivers/kernel_addons/backport/2.6.11_FC4/include/linux/types.h
--- ofed_1_2/kernel_addons/backport/2.6.11_FC4/include/linux/types.h	2006-12-05 14:50:49.275873000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.11_FC4/include/linux/types.h	2007-02-13 10:54:57.693529000 -0800
@@ -7,4 +7,6 @@
 typedef unsigned int gfp_t;
 #endif
 
+#define BITS_PER_BYTE 8
+
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.11_FC4/include/linux/utsname.h infinipath-drivers/kernel_addons/backport/2.6.11_FC4/include/linux/utsname.h
--- ofed_1_2/kernel_addons/backport/2.6.11_FC4/include/linux/utsname.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.11_FC4/include/linux/utsname.h	2007-02-13 10:54:57.694531000 -0800
@@ -0,0 +1,11 @@
+#ifndef _UTSNAME_BACKPORT_H
+#define _UTSNAME_BACKPORT_H
+
+#include_next <linux/utsname.h>
+
+static inline struct new_utsname *init_utsname(void)
+{
+        return &system_utsname;
+}
+
+#endif /* _UTSNAME_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.11_FC4/include/linux/vmalloc.h infinipath-drivers/kernel_addons/backport/2.6.11_FC4/include/linux/vmalloc.h
--- ofed_1_2/kernel_addons/backport/2.6.11_FC4/include/linux/vmalloc.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.11_FC4/include/linux/vmalloc.h	2007-02-13 10:54:57.696530000 -0800
@@ -0,0 +1,20 @@
+#ifndef _VMALLOC_BACKPORT_H
+#define _VMALLOC_BACKPORT_H
+
+#include_next <linux/vmalloc.h>
+#include <linux/string.h>
+
+static inline void *vmalloc_user(unsigned long size)
+{
+       void *ret = vmalloc(size);
+
+       if (ret == NULL)
+	       goto bail;
+
+       memset(ret, 0, size);
+
+bail:
+       return ret;
+}
+
+#endif /* _VMALLOC_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.12/include/linux/dma-mapping.h infinipath-drivers/kernel_addons/backport/2.6.12/include/linux/dma-mapping.h
--- ofed_1_2/kernel_addons/backport/2.6.12/include/linux/dma-mapping.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.12/include/linux/dma-mapping.h	2007-02-13 10:54:57.763458000 -0800
@@ -0,0 +1,13 @@
+#ifndef _DMA_MAPPING_BACKPORT_H
+#define _DMA_MAPPING_BACKPORT_H
+
+#include_next <linux/dma-mapping.h>
+
+static inline int valid_dma_direction(int dma_direction)
+{
+	return ((dma_direction == DMA_BIDIRECTIONAL) ||
+		(dma_direction == DMA_TO_DEVICE) ||
+		(dma_direction == DMA_FROM_DEVICE));
+}
+
+#endif /* _DMA_MAPPING_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.12/include/linux/fs.h infinipath-drivers/kernel_addons/backport/2.6.12/include/linux/fs.h
--- ofed_1_2/kernel_addons/backport/2.6.12/include/linux/fs.h	2006-12-05 14:50:49.311847000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.12/include/linux/fs.h	2007-02-13 10:54:57.767476000 -0800
@@ -5,4 +5,9 @@
 
 #define i_private u.generic_ip
 
+static inline void inc_nlink(struct inode *inode)
+{
+        inode->i_nlink++;
+}
+
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.12/include/linux/pci.h infinipath-drivers/kernel_addons/backport/2.6.12/include/linux/pci.h
--- ofed_1_2/kernel_addons/backport/2.6.12/include/linux/pci.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.12/include/linux/pci.h	2007-02-13 10:54:57.769468000 -0800
@@ -0,0 +1,39 @@
+#ifndef _PCI_BACKPORT_H
+#define _PCI_BACKPORT_H
+
+#include_next <linux/pci.h>
+
+/*
+ * pci_find_next_capability - Find next capability after current position
+ * @dev: PCI device to query
+ * @pos: Position to search from
+ * @cap: capability code
+ */
+static inline int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap)
+{
+	u8 id;
+	int ttl = 48;
+	int ret;
+
+	while (ttl--) {
+		pci_read_config_byte(dev, pos + PCI_CAP_LIST_NEXT, &pos);
+		pos &= ~3;
+		if (pos < 0x40)
+			break;
+		pci_read_config_byte(dev, pos + PCI_CAP_LIST_ID, &id);
+		if (id == 0xff)
+			break;
+		if (id == cap) {
+			ret = pos;
+			goto bail;
+		}
+	}
+
+	ret = 0;
+
+bail:
+	return ret;
+}
+
+
+#endif /* _PCI_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.12/include/linux/utsname.h infinipath-drivers/kernel_addons/backport/2.6.12/include/linux/utsname.h
--- ofed_1_2/kernel_addons/backport/2.6.12/include/linux/utsname.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.12/include/linux/utsname.h	2007-02-13 10:54:57.775451000 -0800
@@ -0,0 +1,11 @@
+#ifndef _UTSNAME_BACKPORT_H
+#define _UTSNAME_BACKPORT_H
+
+#include_next <linux/utsname.h>
+
+static inline struct new_utsname *init_utsname(void)
+{
+        return &system_utsname;
+}
+
+#endif /* _UTSNAME_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.12/include/linux/vmalloc.h infinipath-drivers/kernel_addons/backport/2.6.12/include/linux/vmalloc.h
--- ofed_1_2/kernel_addons/backport/2.6.12/include/linux/vmalloc.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.12/include/linux/vmalloc.h	2007-02-13 10:54:57.778444000 -0800
@@ -0,0 +1,20 @@
+#ifndef _VMALLOC_BACKPORT_H
+#define _VMALLOC_BACKPORT_H
+
+#include_next <linux/vmalloc.h>
+#include <linux/string.h>
+
+static inline void *vmalloc_user(unsigned long size)
+{
+       void *ret = vmalloc(size);
+
+       if (ret == NULL)
+	       goto bail;
+
+       memset(ret, 0, size);
+
+bail:
+       return ret;
+}
+
+#endif /* _VMALLOC_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.13/include/linux/dma-mapping.h infinipath-drivers/kernel_addons/backport/2.6.13/include/linux/dma-mapping.h
--- ofed_1_2/kernel_addons/backport/2.6.13/include/linux/dma-mapping.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.13/include/linux/dma-mapping.h	2007-02-13 10:54:57.790432000 -0800
@@ -0,0 +1,13 @@
+#ifndef _DMA_MAPPING_BACKPORT_H
+#define _DMA_MAPPING_BACKPORT_H
+
+#include_next <linux/dma-mapping.h>
+
+static inline int valid_dma_direction(int dma_direction)
+{
+	return ((dma_direction == DMA_BIDIRECTIONAL) ||
+		(dma_direction == DMA_TO_DEVICE) ||
+		(dma_direction == DMA_FROM_DEVICE));
+}
+
+#endif /* _DMA_MAPPING_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.13/include/linux/fs.h infinipath-drivers/kernel_addons/backport/2.6.13/include/linux/fs.h
--- ofed_1_2/kernel_addons/backport/2.6.13/include/linux/fs.h	2006-12-05 14:50:49.366783000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.13/include/linux/fs.h	2007-02-13 10:54:57.793428000 -0800
@@ -5,4 +5,9 @@
 
 #define i_private u.generic_ip
 
+static inline void inc_nlink(struct inode *inode)
+{
+        inode->i_nlink++;
+}
+
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.13/include/linux/pci.h infinipath-drivers/kernel_addons/backport/2.6.13/include/linux/pci.h
--- ofed_1_2/kernel_addons/backport/2.6.13/include/linux/pci.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.13/include/linux/pci.h	2007-02-13 10:54:57.795426000 -0800
@@ -0,0 +1,39 @@
+#ifndef _PCI_BACKPORT_H
+#define _PCI_BACKPORT_H
+
+#include_next <linux/pci.h>
+
+/*
+ * pci_find_next_capability - Find next capability after current position
+ * @dev: PCI device to query
+ * @pos: Position to search from
+ * @cap: capability code
+ */
+static inline int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap)
+{
+	u8 id;
+	int ttl = 48;
+	int ret;
+
+	while (ttl--) {
+		pci_read_config_byte(dev, pos + PCI_CAP_LIST_NEXT, &pos);
+		pos &= ~3;
+		if (pos < 0x40)
+			break;
+		pci_read_config_byte(dev, pos + PCI_CAP_LIST_ID, &id);
+		if (id == 0xff)
+			break;
+		if (id == cap) {
+			ret = pos;
+			goto bail;
+		}
+	}
+
+	ret = 0;
+
+bail:
+	return ret;
+}
+
+
+#endif /* _PCI_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.13/include/linux/utsname.h infinipath-drivers/kernel_addons/backport/2.6.13/include/linux/utsname.h
--- ofed_1_2/kernel_addons/backport/2.6.13/include/linux/utsname.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.13/include/linux/utsname.h	2007-02-13 10:54:57.800442000 -0800
@@ -0,0 +1,11 @@
+#ifndef _UTSNAME_BACKPORT_H
+#define _UTSNAME_BACKPORT_H
+
+#include_next <linux/utsname.h>
+
+static inline struct new_utsname *init_utsname(void)
+{
+        return &system_utsname;
+}
+
+#endif /* _UTSNAME_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.13/include/linux/vmalloc.h infinipath-drivers/kernel_addons/backport/2.6.13/include/linux/vmalloc.h
--- ofed_1_2/kernel_addons/backport/2.6.13/include/linux/vmalloc.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.13/include/linux/vmalloc.h	2007-02-13 10:54:57.804424000 -0800
@@ -0,0 +1,20 @@
+#ifndef _VMALLOC_BACKPORT_H
+#define _VMALLOC_BACKPORT_H
+
+#include_next <linux/vmalloc.h>
+#include <linux/string.h>
+
+static inline void *vmalloc_user(unsigned long size)
+{
+       void *ret = vmalloc(size);
+
+       if (ret == NULL)
+	       goto bail;
+
+       memset(ret, 0, size);
+
+bail:
+       return ret;
+}
+
+#endif /* _VMALLOC_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/dma-mapping.h infinipath-drivers/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/dma-mapping.h
--- ofed_1_2/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/dma-mapping.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/dma-mapping.h	2007-02-13 10:54:57.815411000 -0800
@@ -0,0 +1,13 @@
+#ifndef _DMA_MAPPING_BACKPORT_H
+#define _DMA_MAPPING_BACKPORT_H
+
+#include_next <linux/dma-mapping.h>
+
+static inline int valid_dma_direction(int dma_direction)
+{
+	return ((dma_direction == DMA_BIDIRECTIONAL) ||
+		(dma_direction == DMA_TO_DEVICE) ||
+		(dma_direction == DMA_FROM_DEVICE));
+}
+
+#endif /* _DMA_MAPPING_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/fs.h infinipath-drivers/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/fs.h
--- ofed_1_2/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/fs.h	2006-12-05 14:50:49.420729000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/fs.h	2007-02-13 10:54:57.818405000 -0800
@@ -5,4 +5,9 @@
 
 #define i_private u.generic_ip
 
+static inline void inc_nlink(struct inode *inode)
+{
+        inode->i_nlink++;
+}
+
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/pci.h infinipath-drivers/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/pci.h
--- ofed_1_2/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/pci.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/pci.h	2007-02-13 10:54:57.820401000 -0800
@@ -0,0 +1,39 @@
+#ifndef _PCI_BACKPORT_H
+#define _PCI_BACKPORT_H
+
+#include_next <linux/pci.h>
+
+/*
+ * pci_find_next_capability - Find next capability after current position
+ * @dev: PCI device to query
+ * @pos: Position to search from
+ * @cap: capability code
+ */
+static inline int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap)
+{
+	u8 id;
+	int ttl = 48;
+	int ret;
+
+	while (ttl--) {
+		pci_read_config_byte(dev, pos + PCI_CAP_LIST_NEXT, &pos);
+		pos &= ~3;
+		if (pos < 0x40)
+			break;
+		pci_read_config_byte(dev, pos + PCI_CAP_LIST_ID, &id);
+		if (id == 0xff)
+			break;
+		if (id == cap) {
+			ret = pos;
+			goto bail;
+		}
+	}
+
+	ret = 0;
+
+bail:
+	return ret;
+}
+
+
+#endif /* _PCI_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/types.h infinipath-drivers/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/types.h
--- ofed_1_2/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/types.h	2006-12-05 14:50:49.445714000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/types.h	2007-02-13 10:54:57.825400000 -0800
@@ -7,4 +7,6 @@
 typedef unsigned int gfp_t;
 #endif
 
+#define BITS_PER_BYTE 8
+
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/utsname.h infinipath-drivers/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/utsname.h
--- ofed_1_2/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/utsname.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/utsname.h	2007-02-13 10:54:57.827394000 -0800
@@ -0,0 +1,11 @@
+#ifndef _UTSNAME_BACKPORT_H
+#define _UTSNAME_BACKPORT_H
+
+#include_next <linux/utsname.h>
+
+static inline struct new_utsname *init_utsname(void)
+{
+        return &system_utsname;
+}
+
+#endif /* _UTSNAME_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/vmalloc.h infinipath-drivers/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/vmalloc.h
--- ofed_1_2/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/vmalloc.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.13_suse10_0_u/include/linux/vmalloc.h	2007-02-13 10:54:57.829392000 -0800
@@ -0,0 +1,20 @@
+#ifndef _VMALLOC_BACKPORT_H
+#define _VMALLOC_BACKPORT_H
+
+#include_next <linux/vmalloc.h>
+#include <linux/string.h>
+
+static inline void *vmalloc_user(unsigned long size)
+{
+       void *ret = vmalloc(size);
+
+       if (ret == NULL)
+	       goto bail;
+
+       memset(ret, 0, size);
+
+bail:
+       return ret;
+}
+
+#endif /* _VMALLOC_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.14/include/linux/dma-mapping.h infinipath-drivers/kernel_addons/backport/2.6.14/include/linux/dma-mapping.h
--- ofed_1_2/kernel_addons/backport/2.6.14/include/linux/dma-mapping.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.14/include/linux/dma-mapping.h	2007-02-13 10:54:57.843378000 -0800
@@ -0,0 +1,13 @@
+#ifndef _DMA_MAPPING_BACKPORT_H
+#define _DMA_MAPPING_BACKPORT_H
+
+#include_next <linux/dma-mapping.h>
+
+static inline int valid_dma_direction(int dma_direction)
+{
+	return ((dma_direction == DMA_BIDIRECTIONAL) ||
+		(dma_direction == DMA_TO_DEVICE) ||
+		(dma_direction == DMA_FROM_DEVICE));
+}
+
+#endif /* _DMA_MAPPING_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.14/include/linux/fs.h infinipath-drivers/kernel_addons/backport/2.6.14/include/linux/fs.h
--- ofed_1_2/kernel_addons/backport/2.6.14/include/linux/fs.h	2006-12-05 14:50:49.488664000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.14/include/linux/fs.h	2007-02-13 10:54:57.847378000 -0800
@@ -5,4 +5,9 @@
 
 #define i_private u.generic_ip
 
+static inline void inc_nlink(struct inode *inode)
+{
+        inode->i_nlink++;
+}
+
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.14/include/linux/pci.h infinipath-drivers/kernel_addons/backport/2.6.14/include/linux/pci.h
--- ofed_1_2/kernel_addons/backport/2.6.14/include/linux/pci.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.14/include/linux/pci.h	2007-02-13 10:54:57.849379000 -0800
@@ -0,0 +1,38 @@
+#ifndef _PCI_BACKPORT_H
+#define _PCI_BACKPORT_H
+
+#include_next <linux/pci.h>
+
+/*
+ * pci_find_next_capability - Find next capability after current position
+ * @dev: PCI device to query
+ * @pos: Position to search from
+ * @cap: capability code
+ */
+static inline int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap)
+{
+	u8 id;
+	int ttl = 48;
+	int ret;
+
+	while (ttl--) {
+		pci_read_config_byte(dev, pos + PCI_CAP_LIST_NEXT, &pos);
+		pos &= ~3;
+		if (pos < 0x40)
+			break;
+		pci_read_config_byte(dev, pos + PCI_CAP_LIST_ID, &id);
+		if (id == 0xff)
+			break;
+		if (id == cap) {
+			ret = pos;
+			goto bail;
+		}
+	}
+
+	ret = 0;
+
+bail:
+	return ret;
+}
+
+#endif /* _PCI_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.14/include/linux/types.h infinipath-drivers/kernel_addons/backport/2.6.14/include/linux/types.h
--- ofed_1_2/kernel_addons/backport/2.6.14/include/linux/types.h	2007-01-23 08:34:31.350901000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.14/include/linux/types.h	2007-02-13 10:54:57.853368000 -0800
@@ -1,6 +1,8 @@
 #ifndef BACKPORT_LINUX_TYPES_TO_2_6_15
 #define BACKPORT_LINUX_TYPES_TO_2_6_15
+
 #include_next <linux/types.h>
 
 #define BITS_PER_BYTE 8
+
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.14/include/linux/utsname.h infinipath-drivers/kernel_addons/backport/2.6.14/include/linux/utsname.h
--- ofed_1_2/kernel_addons/backport/2.6.14/include/linux/utsname.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.14/include/linux/utsname.h	2007-02-13 10:54:57.855376000 -0800
@@ -0,0 +1,11 @@
+#ifndef _UTSNAME_BACKPORT_H
+#define _UTSNAME_BACKPORT_H
+
+#include_next <linux/utsname.h>
+
+static inline struct new_utsname *init_utsname(void)
+{
+        return &system_utsname;
+}
+
+#endif /* _UTSNAME_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.14/include/linux/vmalloc.h infinipath-drivers/kernel_addons/backport/2.6.14/include/linux/vmalloc.h
--- ofed_1_2/kernel_addons/backport/2.6.14/include/linux/vmalloc.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.14/include/linux/vmalloc.h	2007-02-13 10:54:57.857380000 -0800
@@ -0,0 +1,20 @@
+#ifndef _VMALLOC_BACKPORT_H
+#define _VMALLOC_BACKPORT_H
+
+#include_next <linux/vmalloc.h>
+#include <linux/string.h>
+
+static inline void *vmalloc_user(unsigned long size)
+{
+       void *ret = vmalloc(size);
+
+       if (ret == NULL)
+	       goto bail;
+
+       memset(ret, 0, size);
+
+bail:
+       return ret;
+}
+
+#endif /* _VMALLOC_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.15/include/linux/dma-mapping.h infinipath-drivers/kernel_addons/backport/2.6.15/include/linux/dma-mapping.h
--- ofed_1_2/kernel_addons/backport/2.6.15/include/linux/dma-mapping.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.15/include/linux/dma-mapping.h	2007-02-13 10:54:57.886337000 -0800
@@ -0,0 +1,13 @@
+#ifndef _DMA_MAPPING_BACKPORT_H
+#define _DMA_MAPPING_BACKPORT_H
+
+#include_next <linux/dma-mapping.h>
+
+static inline int valid_dma_direction(int dma_direction)
+{
+	return ((dma_direction == DMA_BIDIRECTIONAL) ||
+		(dma_direction == DMA_TO_DEVICE) ||
+		(dma_direction == DMA_FROM_DEVICE));
+}
+
+#endif /* _DMA_MAPPING_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.15/include/linux/fs.h infinipath-drivers/kernel_addons/backport/2.6.15/include/linux/fs.h
--- ofed_1_2/kernel_addons/backport/2.6.15/include/linux/fs.h	2006-12-05 14:50:49.535618000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.15/include/linux/fs.h	2007-02-13 10:54:57.891338000 -0800
@@ -5,4 +5,9 @@
 
 #define i_private u.generic_ip
 
+static inline void inc_nlink(struct inode *inode)
+{
+        inode->i_nlink++;
+}
+
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.15/include/linux/types.h infinipath-drivers/kernel_addons/backport/2.6.15/include/linux/types.h
--- ofed_1_2/kernel_addons/backport/2.6.15/include/linux/types.h	2007-01-23 08:34:31.394860000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.15/include/linux/types.h	2007-02-13 10:54:57.895333000 -0800
@@ -1,6 +1,8 @@
 #ifndef BACKPORT_LINUX_TYPES_TO_2_6_15
 #define BACKPORT_LINUX_TYPES_TO_2_6_15
+
 #include_next <linux/types.h>
 
 #define BITS_PER_BYTE 8
+
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.15/include/linux/utsname.h infinipath-drivers/kernel_addons/backport/2.6.15/include/linux/utsname.h
--- ofed_1_2/kernel_addons/backport/2.6.15/include/linux/utsname.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.15/include/linux/utsname.h	2007-02-13 10:54:57.897324000 -0800
@@ -0,0 +1,11 @@
+#ifndef _UTSNAME_BACKPORT_H
+#define _UTSNAME_BACKPORT_H
+
+#include_next <linux/utsname.h>
+
+static inline struct new_utsname *init_utsname(void)
+{
+        return &system_utsname;
+}
+
+#endif /* _UTSNAME_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.15/include/linux/vmalloc.h infinipath-drivers/kernel_addons/backport/2.6.15/include/linux/vmalloc.h
--- ofed_1_2/kernel_addons/backport/2.6.15/include/linux/vmalloc.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.15/include/linux/vmalloc.h	2007-02-13 10:54:57.900327000 -0800
@@ -0,0 +1,20 @@
+#ifndef _VMALLOC_BACKPORT_H
+#define _VMALLOC_BACKPORT_H
+
+#include_next <linux/vmalloc.h>
+#include <linux/string.h>
+
+static inline void *vmalloc_user(unsigned long size)
+{
+       void *ret = vmalloc(size);
+
+       if (ret == NULL)
+	       goto bail;
+
+       memset(ret, 0, size);
+
+bail:
+       return ret;
+}
+
+#endif /* _VMALLOC_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.15_ubuntu606/include/linux/dma-mapping.h infinipath-drivers/kernel_addons/backport/2.6.15_ubuntu606/include/linux/dma-mapping.h
--- ofed_1_2/kernel_addons/backport/2.6.15_ubuntu606/include/linux/dma-mapping.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.15_ubuntu606/include/linux/dma-mapping.h	2007-02-13 10:54:57.948274000 -0800
@@ -0,0 +1,13 @@
+#ifndef _DMA_MAPPING_BACKPORT_H
+#define _DMA_MAPPING_BACKPORT_H
+
+#include_next <linux/dma-mapping.h>
+
+static inline int valid_dma_direction(int dma_direction)
+{
+	return ((dma_direction == DMA_BIDIRECTIONAL) ||
+		(dma_direction == DMA_TO_DEVICE) ||
+		(dma_direction == DMA_FROM_DEVICE));
+}
+
+#endif /* _DMA_MAPPING_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.15_ubuntu606/include/linux/fs.h infinipath-drivers/kernel_addons/backport/2.6.15_ubuntu606/include/linux/fs.h
--- ofed_1_2/kernel_addons/backport/2.6.15_ubuntu606/include/linux/fs.h	2007-01-23 08:34:31.439813000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.15_ubuntu606/include/linux/fs.h	2007-02-13 10:54:57.951270000 -0800
@@ -5,4 +5,9 @@
 
 #define i_private u.generic_ip
 
+static inline void inc_nlink(struct inode *inode)
+{
+        inode->i_nlink++;
+}
+
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.15_ubuntu606/include/linux/types.h infinipath-drivers/kernel_addons/backport/2.6.15_ubuntu606/include/linux/types.h
--- ofed_1_2/kernel_addons/backport/2.6.15_ubuntu606/include/linux/types.h	2007-01-23 08:34:31.477772000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.15_ubuntu606/include/linux/types.h	2007-02-13 10:54:57.953268000 -0800
@@ -1,6 +1,8 @@
 #ifndef BACKPORT_LINUX_TYPES_TO_2_6_15
 #define BACKPORT_LINUX_TYPES_TO_2_6_15
+
 #include_next <linux/types.h>
 
 #define BITS_PER_BYTE 8
+
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.15_ubuntu606/include/linux/utsname.h infinipath-drivers/kernel_addons/backport/2.6.15_ubuntu606/include/linux/utsname.h
--- ofed_1_2/kernel_addons/backport/2.6.15_ubuntu606/include/linux/utsname.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.15_ubuntu606/include/linux/utsname.h	2007-02-13 10:54:57.954269000 -0800
@@ -0,0 +1,11 @@
+#ifndef _UTSNAME_BACKPORT_H
+#define _UTSNAME_BACKPORT_H
+
+#include_next <linux/utsname.h>
+
+static inline struct new_utsname *init_utsname(void)
+{
+        return &system_utsname;
+}
+
+#endif /* _UTSNAME_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.15_ubuntu606/include/linux/vmalloc.h infinipath-drivers/kernel_addons/backport/2.6.15_ubuntu606/include/linux/vmalloc.h
--- ofed_1_2/kernel_addons/backport/2.6.15_ubuntu606/include/linux/vmalloc.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.15_ubuntu606/include/linux/vmalloc.h	2007-02-13 10:54:57.957277000 -0800
@@ -0,0 +1,20 @@
+#ifndef _VMALLOC_BACKPORT_H
+#define _VMALLOC_BACKPORT_H
+
+#include_next <linux/vmalloc.h>
+#include <linux/string.h>
+
+static inline void *vmalloc_user(unsigned long size)
+{
+       void *ret = vmalloc(size);
+
+       if (ret == NULL)
+	       goto bail;
+
+       memset(ret, 0, size);
+
+bail:
+       return ret;
+}
+
+#endif /* _VMALLOC_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.16/include/linux/dma-mapping.h infinipath-drivers/kernel_addons/backport/2.6.16/include/linux/dma-mapping.h
--- ofed_1_2/kernel_addons/backport/2.6.16/include/linux/dma-mapping.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.16/include/linux/dma-mapping.h	2007-02-13 10:54:57.975247000 -0800
@@ -0,0 +1,13 @@
+#ifndef _DMA_MAPPING_BACKPORT_H
+#define _DMA_MAPPING_BACKPORT_H
+
+#include_next <linux/dma-mapping.h>
+
+static inline int valid_dma_direction(int dma_direction)
+{
+	return ((dma_direction == DMA_BIDIRECTIONAL) ||
+		(dma_direction == DMA_TO_DEVICE) ||
+		(dma_direction == DMA_FROM_DEVICE));
+}
+
+#endif /* _DMA_MAPPING_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.16/include/linux/fs.h infinipath-drivers/kernel_addons/backport/2.6.16/include/linux/fs.h
--- ofed_1_2/kernel_addons/backport/2.6.16/include/linux/fs.h	2006-12-05 14:50:49.589563000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.16/include/linux/fs.h	2007-02-13 10:54:57.978243000 -0800
@@ -5,4 +5,9 @@
 
 #define i_private u.generic_ip
 
+static inline void inc_nlink(struct inode *inode)
+{
+        inode->i_nlink++;
+}
+
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.16/include/linux/hvcall.h infinipath-drivers/kernel_addons/backport/2.6.16/include/linux/hvcall.h
--- ofed_1_2/kernel_addons/backport/2.6.16/include/linux/hvcall.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.16/include/linux/hvcall.h	2007-02-12 11:20:29.126379000 -0800
@@ -0,0 +1,232 @@
+#ifndef ASM_HVCALL_BACKPORT_2616_H
+#define ASM_HVCALL_BACKPORT_2616_H
+
+#include_next <asm/hvcall.h>
+
+#ifdef __KERNEL__
+
+#define H_SUCCESS               H_Success
+#define H_BUSY                  H_Busy
+#define H_CONSTRAINED           H_Constrained
+#define H_PAGE_REGISTERED       15
+
+#define H_PARAMETER             H_Parameter
+#define H_NO_MEM                H_NoMem
+#define H_RESOURCE              H_Resource
+#define H_HARDWARE              H_Hardware
+#define H_ADAPTER_PARM          -17
+#define H_RH_PARM               -18
+#define H_RT_PARM               -22
+#define H_MLENGTH_PARM          -27
+#define H_MEM_PARM              -28
+#define H_MEM_ACCESS_PARM       -29
+#define H_ALIAS_EXIST           -39
+#define H_TABLE_FULL            -41
+#define H_NOT_ENOUGH_RESOURCES  -44
+#define H_R_STATE               -45
+
+#define H_CB_ALIGNMENT          4096
+
+#define H_RESET_EVENTS          0x15C
+#define H_ALLOC_RESOURCE        0x160
+#define H_FREE_RESOURCE         0x164
+#define H_MODIFY_QP             0x168
+#define H_QUERY_QP              0x16C
+#define H_REREGISTER_PMR        0x170
+#define H_REGISTER_SMR          0x174
+#define H_QUERY_MR              0x178
+#define H_QUERY_MW              0x17C
+#define H_QUERY_HCA             0x180
+#define H_QUERY_PORT            0x184
+#define H_MODIFY_PORT           0x188
+#define H_DEFINE_AQP1           0x18C
+#define H_DEFINE_AQP0           0x194
+#define H_RESIZE_MR             0x198
+#define H_ATTACH_MCQP           0x19C
+#define H_DETACH_MCQP           0x1A0
+#define H_REGISTER_RPAGES       0x1AC
+#define H_DISABLE_AND_GETC      0x1B0
+#define H_ERROR_DATA            0x1B4
+#define H_QUERY_INT_STATE       0x1E4
+
+#define H_LONG_BUSY_ORDER_1_MSEC   H_LongBusyOrder1msec
+#define H_LONG_BUSY_ORDER_10_MSEC  H_LongBusyOrder10msec
+#define H_LONG_BUSY_ORDER_100_MSEC H_LongBusyOrder100msec
+#define H_LONG_BUSY_ORDER_1_SEC    H_LongBusyOrder1sec
+#define H_LONG_BUSY_ORDER_10_SEC   H_LongBusyOrder10sec
+#define H_LONG_BUSY_ORDER_100_SEC  H_LongBusyOrder100sec
+#define H_IS_LONG_BUSY(x) ((x >= H_LongBusyStartRange) && (x <= H_LongBusyEndRange))
+
+
+#ifndef __ASSEMBLY__
+#include <linux/kernel.h>
+inline static long plpar_hcall_7arg_7ret(unsigned long opcode,
+					 unsigned long arg1,    /* <R4  */
+					 unsigned long arg2,	/* <R5  */
+					 unsigned long arg3,	/* <R6  */
+					 unsigned long arg4,	/* <R7  */
+					 unsigned long arg5,	/* <R8  */
+					 unsigned long arg6,	/* <R9  */
+					 unsigned long arg7,	/* <R10 */
+					 unsigned long *out1,	/* <R4  */
+					 unsigned long *out2,	/* <R5  */
+					 unsigned long *out3,	/* <R6  */
+					 unsigned long *out4,	/* <R7  */
+					 unsigned long *out5,	/* <R8  */
+					 unsigned long *out6,	/* <R9  */
+					 unsigned long *out7	/* <R10 */
+    )
+{
+	unsigned long regs[11] = {opcode,
+				  arg1, arg2, arg3, arg4, arg5, arg6, arg7};
+
+	__asm__ __volatile__("mr 3,%10\n"
+			     "mr 4,%11\n"
+			     "mr 5,%12\n"
+			     "mr 6,%13\n"
+			     "mr 7,%14\n"
+			     "mr 8,%15\n"
+			     "mr 9,%16\n"
+			     "mr 10,%17\n"
+			     "mr 11,%18\n"
+			     "mr 12,%19\n"
+			     ".long 0x44000022\n"
+			     "mr %0,3\n"
+			     "mr %1,4\n"
+			     "mr %2,5\n"
+			     "mr %3,6\n"
+			     "mr %4,7\n"
+			     "mr %5,8\n"
+			     "mr %6,9\n"
+			     "mr %7,10\n"
+			     "mr %8,11\n"
+			     "mr %9,12\n":"=r"(regs[0]),
+			     "=r"(regs[1]), "=r"(regs[2]),
+			     "=r"(regs[3]), "=r"(regs[4]),
+			     "=r"(regs[5]), "=r"(regs[6]),
+			     "=r"(regs[7]), "=r"(regs[8]),
+			     "=r"(regs[9])
+			     :"r"(regs[0]), "r"(regs[1]),
+			     "r"(regs[2]), "r"(regs[3]),
+			     "r"(regs[4]), "r"(regs[5]),
+			     "r"(regs[6]), "r"(regs[7]),
+			     "r"(regs[8]), "r"(regs[9])
+			     :"r0", "r2", "r3", "r4", "r5", "r6", "r7",
+			     "r8", "r9", "r10", "r11", "r12", "cc",
+			     "xer", "ctr", "lr", "cr0", "cr1", "cr5",
+			     "cr6", "cr7");
+	*out1 = regs[1];
+	*out2 = regs[2];
+	*out3 = regs[3];
+	*out4 = regs[4];
+	*out5 = regs[5];
+	*out6 = regs[6];
+	*out7 = regs[7];
+
+	if (!H_isLongBusy(regs[0]) && regs[0] < 0) {
+		printk(KERN_ERR "HCALL77_IN r3=%lx r4=%lx r5=%lx r6=%lx "
+		       "r7=%lx r8=%lx r9=%lx r10=%lx",
+		       opcode, arg1, arg2, arg3,
+		       arg4, arg5, arg6, arg7);
+		printk(KERN_ERR "HCALL77_OUT r3=%lx r4=%lx r5=%lx "
+		       "r6=%lx r7=%lx r8=%lx r9=%lx r10=%lx ",
+		       regs[0], regs[1],
+		       regs[2], regs[3],
+		       regs[4], regs[5],
+		       regs[6], regs[7]);
+	}
+	return regs[0];
+}
+
+inline static long plpar_hcall_9arg_9ret(unsigned long opcode,
+					 unsigned long arg1,	/* <R4  */
+					 unsigned long arg2,	/* <R5  */
+					 unsigned long arg3,	/* <R6  */
+					 unsigned long arg4,	/* <R7  */
+					 unsigned long arg5,	/* <R8  */
+					 unsigned long arg6,	/* <R9  */
+					 unsigned long arg7,	/* <R10 */
+					 unsigned long arg8,	/* <R11 */
+					 unsigned long arg9,	/* <R12 */
+					 unsigned long *out1,	/* <R4  */
+					 unsigned long *out2,	/* <R5  */
+					 unsigned long *out3,	/* <R6  */
+					 unsigned long *out4,	/* <R7  */
+					 unsigned long *out5,	/* <R8  */
+					 unsigned long *out6,	/* <R9  */
+					 unsigned long *out7,	/* <R10 */
+					 unsigned long *out8,	/* <R11 */
+					 unsigned long *out9	/* <R12 */
+    )
+{
+	unsigned long regs[11] = {opcode,
+				  arg1, arg2, arg3, arg4, arg5, arg6, arg7,
+				  arg8, arg9};
+
+	__asm__ __volatile__("mr 3,%10\n"
+			     "mr 4,%11\n"
+			     "mr 5,%12\n"
+			     "mr 6,%13\n"
+			     "mr 7,%14\n"
+			     "mr 8,%15\n"
+			     "mr 9,%16\n"
+			     "mr 10,%17\n"
+			     "mr 11,%18\n"
+			     "mr 12,%19\n"
+			     ".long 0x44000022\n"
+			     "mr %0,3\n"
+			     "mr %1,4\n"
+			     "mr %2,5\n"
+			     "mr %3,6\n"
+			     "mr %4,7\n"
+			     "mr %5,8\n"
+			     "mr %6,9\n"
+			     "mr %7,10\n"
+			     "mr %8,11\n"
+			     "mr %9,12\n":"=r"(regs[0]),
+			     "=r"(regs[1]), "=r"(regs[2]),
+			     "=r"(regs[3]), "=r"(regs[4]),
+			     "=r"(regs[5]), "=r"(regs[6]),
+			     "=r"(regs[7]), "=r"(regs[8]),
+			     "=r"(regs[9])
+			     :"r"(regs[0]), "r"(regs[1]),
+			     "r"(regs[2]), "r"(regs[3]),
+			     "r"(regs[4]), "r"(regs[5]),
+			     "r"(regs[6]), "r"(regs[7]),
+			     "r"(regs[8]), "r"(regs[9])
+			     :"r0", "r2", "r3", "r4", "r5", "r6", "r7",
+			     "r8", "r9", "r10", "r11", "r12", "cc",
+			     "xer", "ctr", "lr", "cr0", "cr1", "cr5",
+			     "cr6", "cr7");
+	*out1 = regs[1];
+	*out2 = regs[2];
+	*out3 = regs[3];
+	*out4 = regs[4];
+	*out5 = regs[5];
+	*out6 = regs[6];
+	*out7 = regs[7];
+	*out8 = regs[8];
+	*out9 = regs[9];
+
+	if (!H_isLongBusy(regs[0]) && regs[0] < 0) {
+		printk(KERN_ERR "HCALL99_IN r3=%lx r4=%lx r5=%lx r6=%lx "
+		       "r7=%lx r8=%lx r9=%lx r10=%lx "
+		       "r11=%lx r12=%lx",
+		       opcode, arg1, arg2, arg3,
+		       arg4, arg5, arg6, arg7,
+		       arg8, arg9);
+		printk(KERN_ERR "HCALL99_OUT r3=%lx r4=%lx r5=%lx "
+		       "r6=%lx r7=%lx r8=%lx r9=%lx r10=%lx "
+		       "r11=%lx r12=lx",
+		       regs[0], regs[1],
+		       regs[2], regs[3],
+		       regs[4], regs[5],
+		       regs[6], regs[7],
+		       regs[8]);
+	}
+	return regs[0];
+}
+
+#endif /* __ASSEMBLY__ */
+#endif /* __KERNEL__ */
+#endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.16/include/linux/utsname.h infinipath-drivers/kernel_addons/backport/2.6.16/include/linux/utsname.h
--- ofed_1_2/kernel_addons/backport/2.6.16/include/linux/utsname.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.16/include/linux/utsname.h	2007-02-13 10:54:58.000223000 -0800
@@ -0,0 +1,11 @@
+#ifndef _UTSNAME_BACKPORT_H
+#define _UTSNAME_BACKPORT_H
+
+#include_next <linux/utsname.h>
+
+static inline struct new_utsname *init_utsname(void)
+{
+        return &system_utsname;
+}
+
+#endif /* _UTSNAME_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.16/include/linux/vmalloc.h infinipath-drivers/kernel_addons/backport/2.6.16/include/linux/vmalloc.h
--- ofed_1_2/kernel_addons/backport/2.6.16/include/linux/vmalloc.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.16/include/linux/vmalloc.h	2007-02-13 10:54:58.002220000 -0800
@@ -0,0 +1,20 @@
+#ifndef _VMALLOC_BACKPORT_H
+#define _VMALLOC_BACKPORT_H
+
+#include_next <linux/vmalloc.h>
+#include <linux/string.h>
+
+static inline void *vmalloc_user(unsigned long size)
+{
+       void *ret = vmalloc(size);
+
+       if (ret == NULL)
+	       goto bail;
+
+       memset(ret, 0, size);
+
+bail:
+       return ret;
+}
+
+#endif /* _VMALLOC_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.16_sles10/include/linux/dma-mapping.h infinipath-drivers/kernel_addons/backport/2.6.16_sles10/include/linux/dma-mapping.h
--- ofed_1_2/kernel_addons/backport/2.6.16_sles10/include/linux/dma-mapping.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.16_sles10/include/linux/dma-mapping.h	2007-02-13 10:54:58.022201000 -0800
@@ -0,0 +1,13 @@
+#ifndef _DMA_MAPPING_BACKPORT_H
+#define _DMA_MAPPING_BACKPORT_H
+
+#include_next <linux/dma-mapping.h>
+
+static inline int valid_dma_direction(int dma_direction)
+{
+	return ((dma_direction == DMA_BIDIRECTIONAL) ||
+		(dma_direction == DMA_TO_DEVICE) ||
+		(dma_direction == DMA_FROM_DEVICE));
+}
+
+#endif /* _DMA_MAPPING_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.16_sles10/include/linux/fs.h infinipath-drivers/kernel_addons/backport/2.6.16_sles10/include/linux/fs.h
--- ofed_1_2/kernel_addons/backport/2.6.16_sles10/include/linux/fs.h	2006-12-05 14:50:49.623527000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.16_sles10/include/linux/fs.h	2007-02-13 10:54:58.026198000 -0800
@@ -5,4 +5,9 @@
 
 #define i_private u.generic_ip
 
+static inline void inc_nlink(struct inode *inode)
+{
+        inode->i_nlink++;
+}
+
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.16_sles10/include/linux/hvcall.h infinipath-drivers/kernel_addons/backport/2.6.16_sles10/include/linux/hvcall.h
--- ofed_1_2/kernel_addons/backport/2.6.16_sles10/include/linux/hvcall.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.16_sles10/include/linux/hvcall.h	2007-02-12 11:20:29.263255000 -0800
@@ -0,0 +1,232 @@
+#ifndef ASM_HVCALL_BACKPORT_2616_H
+#define ASM_HVCALL_BACKPORT_2616_H
+
+#include_next <asm/hvcall.h>
+
+#ifdef __KERNEL__
+
+#define H_SUCCESS               H_Success
+#define H_BUSY                  H_Busy
+#define H_CONSTRAINED           H_Constrained
+#define H_PAGE_REGISTERED       15
+
+#define H_PARAMETER             H_Parameter
+#define H_NO_MEM                H_NoMem
+#define H_RESOURCE              H_Resource
+#define H_HARDWARE              H_Hardware
+#define H_ADAPTER_PARM          -17
+#define H_RH_PARM               -18
+#define H_RT_PARM               -22
+#define H_MLENGTH_PARM          -27
+#define H_MEM_PARM              -28
+#define H_MEM_ACCESS_PARM       -29
+#define H_ALIAS_EXIST           -39
+#define H_TABLE_FULL            -41
+#define H_NOT_ENOUGH_RESOURCES  -44
+#define H_R_STATE               -45
+
+#define H_CB_ALIGNMENT          4096
+
+#define H_RESET_EVENTS          0x15C
+#define H_ALLOC_RESOURCE        0x160
+#define H_FREE_RESOURCE         0x164
+#define H_MODIFY_QP             0x168
+#define H_QUERY_QP              0x16C
+#define H_REREGISTER_PMR        0x170
+#define H_REGISTER_SMR          0x174
+#define H_QUERY_MR              0x178
+#define H_QUERY_MW              0x17C
+#define H_QUERY_HCA             0x180
+#define H_QUERY_PORT            0x184
+#define H_MODIFY_PORT           0x188
+#define H_DEFINE_AQP1           0x18C
+#define H_DEFINE_AQP0           0x194
+#define H_RESIZE_MR             0x198
+#define H_ATTACH_MCQP           0x19C
+#define H_DETACH_MCQP           0x1A0
+#define H_REGISTER_RPAGES       0x1AC
+#define H_DISABLE_AND_GETC      0x1B0
+#define H_ERROR_DATA            0x1B4
+#define H_QUERY_INT_STATE       0x1E4
+
+#define H_LONG_BUSY_ORDER_1_MSEC   H_LongBusyOrder1msec
+#define H_LONG_BUSY_ORDER_10_MSEC  H_LongBusyOrder10msec
+#define H_LONG_BUSY_ORDER_100_MSEC H_LongBusyOrder100msec
+#define H_LONG_BUSY_ORDER_1_SEC    H_LongBusyOrder1sec
+#define H_LONG_BUSY_ORDER_10_SEC   H_LongBusyOrder10sec
+#define H_LONG_BUSY_ORDER_100_SEC  H_LongBusyOrder100sec
+#define H_IS_LONG_BUSY(x) ((x >= H_LongBusyStartRange) && (x <= H_LongBusyEndRange))
+
+
+#ifndef __ASSEMBLY__
+#include <linux/kernel.h>
+inline static long plpar_hcall_7arg_7ret(unsigned long opcode,
+					 unsigned long arg1,    /* <R4  */
+					 unsigned long arg2,	/* <R5  */
+					 unsigned long arg3,	/* <R6  */
+					 unsigned long arg4,	/* <R7  */
+					 unsigned long arg5,	/* <R8  */
+					 unsigned long arg6,	/* <R9  */
+					 unsigned long arg7,	/* <R10 */
+					 unsigned long *out1,	/* <R4  */
+					 unsigned long *out2,	/* <R5  */
+					 unsigned long *out3,	/* <R6  */
+					 unsigned long *out4,	/* <R7  */
+					 unsigned long *out5,	/* <R8  */
+					 unsigned long *out6,	/* <R9  */
+					 unsigned long *out7	/* <R10 */
+    )
+{
+	unsigned long regs[11] = {opcode,
+				  arg1, arg2, arg3, arg4, arg5, arg6, arg7};
+
+	__asm__ __volatile__("mr 3,%10\n"
+			     "mr 4,%11\n"
+			     "mr 5,%12\n"
+			     "mr 6,%13\n"
+			     "mr 7,%14\n"
+			     "mr 8,%15\n"
+			     "mr 9,%16\n"
+			     "mr 10,%17\n"
+			     "mr 11,%18\n"
+			     "mr 12,%19\n"
+			     ".long 0x44000022\n"
+			     "mr %0,3\n"
+			     "mr %1,4\n"
+			     "mr %2,5\n"
+			     "mr %3,6\n"
+			     "mr %4,7\n"
+			     "mr %5,8\n"
+			     "mr %6,9\n"
+			     "mr %7,10\n"
+			     "mr %8,11\n"
+			     "mr %9,12\n":"=r"(regs[0]),
+			     "=r"(regs[1]), "=r"(regs[2]),
+			     "=r"(regs[3]), "=r"(regs[4]),
+			     "=r"(regs[5]), "=r"(regs[6]),
+			     "=r"(regs[7]), "=r"(regs[8]),
+			     "=r"(regs[9])
+			     :"r"(regs[0]), "r"(regs[1]),
+			     "r"(regs[2]), "r"(regs[3]),
+			     "r"(regs[4]), "r"(regs[5]),
+			     "r"(regs[6]), "r"(regs[7]),
+			     "r"(regs[8]), "r"(regs[9])
+			     :"r0", "r2", "r3", "r4", "r5", "r6", "r7",
+			     "r8", "r9", "r10", "r11", "r12", "cc",
+			     "xer", "ctr", "lr", "cr0", "cr1", "cr5",
+			     "cr6", "cr7");
+	*out1 = regs[1];
+	*out2 = regs[2];
+	*out3 = regs[3];
+	*out4 = regs[4];
+	*out5 = regs[5];
+	*out6 = regs[6];
+	*out7 = regs[7];
+
+	if (!H_isLongBusy(regs[0]) && regs[0] < 0) {
+		printk(KERN_ERR "HCALL77_IN r3=%lx r4=%lx r5=%lx r6=%lx "
+		       "r7=%lx r8=%lx r9=%lx r10=%lx",
+		       opcode, arg1, arg2, arg3,
+		       arg4, arg5, arg6, arg7);
+		printk(KERN_ERR "HCALL77_OUT r3=%lx r4=%lx r5=%lx "
+		       "r6=%lx r7=%lx r8=%lx r9=%lx r10=%lx ",
+		       regs[0], regs[1],
+		       regs[2], regs[3],
+		       regs[4], regs[5],
+		       regs[6], regs[7]);
+	}
+	return regs[0];
+}
+
+inline static long plpar_hcall_9arg_9ret(unsigned long opcode,
+					 unsigned long arg1,	/* <R4  */
+					 unsigned long arg2,	/* <R5  */
+					 unsigned long arg3,	/* <R6  */
+					 unsigned long arg4,	/* <R7  */
+					 unsigned long arg5,	/* <R8  */
+					 unsigned long arg6,	/* <R9  */
+					 unsigned long arg7,	/* <R10 */
+					 unsigned long arg8,	/* <R11 */
+					 unsigned long arg9,	/* <R12 */
+					 unsigned long *out1,	/* <R4  */
+					 unsigned long *out2,	/* <R5  */
+					 unsigned long *out3,	/* <R6  */
+					 unsigned long *out4,	/* <R7  */
+					 unsigned long *out5,	/* <R8  */
+					 unsigned long *out6,	/* <R9  */
+					 unsigned long *out7,	/* <R10 */
+					 unsigned long *out8,	/* <R11 */
+					 unsigned long *out9	/* <R12 */
+    )
+{
+	unsigned long regs[11] = {opcode,
+				  arg1, arg2, arg3, arg4, arg5, arg6, arg7,
+				  arg8, arg9};
+
+	__asm__ __volatile__("mr 3,%10\n"
+			     "mr 4,%11\n"
+			     "mr 5,%12\n"
+			     "mr 6,%13\n"
+			     "mr 7,%14\n"
+			     "mr 8,%15\n"
+			     "mr 9,%16\n"
+			     "mr 10,%17\n"
+			     "mr 11,%18\n"
+			     "mr 12,%19\n"
+			     ".long 0x44000022\n"
+			     "mr %0,3\n"
+			     "mr %1,4\n"
+			     "mr %2,5\n"
+			     "mr %3,6\n"
+			     "mr %4,7\n"
+			     "mr %5,8\n"
+			     "mr %6,9\n"
+			     "mr %7,10\n"
+			     "mr %8,11\n"
+			     "mr %9,12\n":"=r"(regs[0]),
+			     "=r"(regs[1]), "=r"(regs[2]),
+			     "=r"(regs[3]), "=r"(regs[4]),
+			     "=r"(regs[5]), "=r"(regs[6]),
+			     "=r"(regs[7]), "=r"(regs[8]),
+			     "=r"(regs[9])
+			     :"r"(regs[0]), "r"(regs[1]),
+			     "r"(regs[2]), "r"(regs[3]),
+			     "r"(regs[4]), "r"(regs[5]),
+			     "r"(regs[6]), "r"(regs[7]),
+			     "r"(regs[8]), "r"(regs[9])
+			     :"r0", "r2", "r3", "r4", "r5", "r6", "r7",
+			     "r8", "r9", "r10", "r11", "r12", "cc",
+			     "xer", "ctr", "lr", "cr0", "cr1", "cr5",
+			     "cr6", "cr7");
+	*out1 = regs[1];
+	*out2 = regs[2];
+	*out3 = regs[3];
+	*out4 = regs[4];
+	*out5 = regs[5];
+	*out6 = regs[6];
+	*out7 = regs[7];
+	*out8 = regs[8];
+	*out9 = regs[9];
+
+	if (!H_isLongBusy(regs[0]) && regs[0] < 0) {
+		printk(KERN_ERR "HCALL99_IN r3=%lx r4=%lx r5=%lx r6=%lx "
+		       "r7=%lx r8=%lx r9=%lx r10=%lx "
+		       "r11=%lx r12=%lx",
+		       opcode, arg1, arg2, arg3,
+		       arg4, arg5, arg6, arg7,
+		       arg8, arg9);
+		printk(KERN_ERR "HCALL99_OUT r3=%lx r4=%lx r5=%lx "
+		       "r6=%lx r7=%lx r8=%lx r9=%lx r10=%lx "
+		       "r11=%lx r12=lx",
+		       regs[0], regs[1],
+		       regs[2], regs[3],
+		       regs[4], regs[5],
+		       regs[6], regs[7],
+		       regs[8]);
+	}
+	return regs[0];
+}
+
+#endif /* __ASSEMBLY__ */
+#endif /* __KERNEL__ */
+#endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.16_sles10/include/linux/utsname.h infinipath-drivers/kernel_addons/backport/2.6.16_sles10/include/linux/utsname.h
--- ofed_1_2/kernel_addons/backport/2.6.16_sles10/include/linux/utsname.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.16_sles10/include/linux/utsname.h	2007-02-13 10:54:58.028195000 -0800
@@ -0,0 +1,11 @@
+#ifndef _UTSNAME_BACKPORT_H
+#define _UTSNAME_BACKPORT_H
+
+#include_next <linux/utsname.h>
+
+static inline struct new_utsname *init_utsname(void)
+{
+        return &system_utsname;
+}
+
+#endif /* _UTSNAME_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.16_sles10/include/linux/vmalloc.h infinipath-drivers/kernel_addons/backport/2.6.16_sles10/include/linux/vmalloc.h
--- ofed_1_2/kernel_addons/backport/2.6.16_sles10/include/linux/vmalloc.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.16_sles10/include/linux/vmalloc.h	2007-02-13 10:54:58.031191000 -0800
@@ -0,0 +1,20 @@
+#ifndef _VMALLOC_BACKPORT_H
+#define _VMALLOC_BACKPORT_H
+
+#include_next <linux/vmalloc.h>
+#include <linux/string.h>
+
+static inline void *vmalloc_user(unsigned long size)
+{
+       void *ret = vmalloc(size);
+
+       if (ret == NULL)
+	       goto bail;
+
+       memset(ret, 0, size);
+
+bail:
+       return ret;
+}
+
+#endif /* _VMALLOC_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.17/include/linux/dma-mapping.h infinipath-drivers/kernel_addons/backport/2.6.17/include/linux/dma-mapping.h
--- ofed_1_2/kernel_addons/backport/2.6.17/include/linux/dma-mapping.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.17/include/linux/dma-mapping.h	2007-02-13 10:54:58.043180000 -0800
@@ -0,0 +1,13 @@
+#ifndef _DMA_MAPPING_BACKPORT_H
+#define _DMA_MAPPING_BACKPORT_H
+
+#include_next <linux/dma-mapping.h>
+
+static inline int valid_dma_direction(int dma_direction)
+{
+	return ((dma_direction == DMA_BIDIRECTIONAL) ||
+		(dma_direction == DMA_TO_DEVICE) ||
+		(dma_direction == DMA_FROM_DEVICE));
+}
+
+#endif /* _DMA_MAPPING_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.17/include/linux/fs.h infinipath-drivers/kernel_addons/backport/2.6.17/include/linux/fs.h
--- ofed_1_2/kernel_addons/backport/2.6.17/include/linux/fs.h	2006-12-05 14:50:49.674475000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.17/include/linux/fs.h	2007-02-13 10:54:58.046176000 -0800
@@ -5,4 +5,9 @@
 
 #define i_private u.generic_ip
 
+static inline void inc_nlink(struct inode *inode)
+{
+        inode->i_nlink++;
+}
+
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.17/include/linux/utsname.h infinipath-drivers/kernel_addons/backport/2.6.17/include/linux/utsname.h
--- ofed_1_2/kernel_addons/backport/2.6.17/include/linux/utsname.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.17/include/linux/utsname.h	2007-02-13 10:54:58.047177000 -0800
@@ -0,0 +1,11 @@
+#ifndef _UTSNAME_BACKPORT_H
+#define _UTSNAME_BACKPORT_H
+
+#include_next <linux/utsname.h>
+
+static inline struct new_utsname *init_utsname(void)
+{
+        return &system_utsname;
+}
+
+#endif /* _UTSNAME_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.17/include/linux/vmalloc.h infinipath-drivers/kernel_addons/backport/2.6.17/include/linux/vmalloc.h
--- ofed_1_2/kernel_addons/backport/2.6.17/include/linux/vmalloc.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.17/include/linux/vmalloc.h	2007-02-13 10:54:58.049179000 -0800
@@ -0,0 +1,20 @@
+#ifndef _VMALLOC_BACKPORT_H
+#define _VMALLOC_BACKPORT_H
+
+#include_next <linux/vmalloc.h>
+#include <linux/string.h>
+
+static inline void *vmalloc_user(unsigned long size)
+{
+       void *ret = vmalloc(size);
+
+       if (ret == NULL)
+	       goto bail;
+
+       memset(ret, 0, size);
+
+bail:
+       return ret;
+}
+
+#endif /* _VMALLOC_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.18/include/linux/fs.h infinipath-drivers/kernel_addons/backport/2.6.18/include/linux/fs.h
--- ofed_1_2/kernel_addons/backport/2.6.18/include/linux/fs.h	2006-12-05 14:50:49.693462000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.18/include/linux/fs.h	2007-02-13 10:54:58.053168000 -0800
@@ -5,4 +5,9 @@
 
 #define i_private u.generic_ip
 
+static inline void inc_nlink(struct inode *inode)
+{
+        inode->i_nlink++;
+}
+
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.18/include/linux/slab.h infinipath-drivers/kernel_addons/backport/2.6.18/include/linux/slab.h
--- ofed_1_2/kernel_addons/backport/2.6.18/include/linux/slab.h	2007-01-23 08:34:31.686566000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.18/include/linux/slab.h	2007-02-13 16:21:14.590587000 -0800
@@ -1,24 +1,7 @@
-#include_next <linux/slab.h>
-
-#include_next <linux/slab.h>
-
 #ifndef BACKPORT_LINUX_STRING_TO_2_6_18
 #define BACKPORT_LINUX_STRING_TO_2_6_18
 
-static inline
-void *kmemdup(const void *src, size_t len, gfp_t gfp)
-{
-       void *p;
-
-       p = kmalloc(len, gfp);
-       if (p)
-               memcpy(p, src, len);
-       return p;
-}
-
-#endif
-#ifndef BACKPORT_LINUX_STRING_TO_2_6_18
-#define BACKPORT_LINUX_STRING_TO_2_6_18
+#include_next <linux/slab.h>
 
 static inline
 void *kmemdup(const void *src, size_t len, gfp_t gfp)
diff -urN ofed_1_2/kernel_addons/backport/2.6.18/include/linux/utsname.h infinipath-drivers/kernel_addons/backport/2.6.18/include/linux/utsname.h
--- ofed_1_2/kernel_addons/backport/2.6.18/include/linux/utsname.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.18/include/linux/utsname.h	2007-02-13 10:54:58.071152000 -0800
@@ -0,0 +1,11 @@
+#ifndef _UTSNAME_BACKPORT_H
+#define _UTSNAME_BACKPORT_H
+
+#include_next <linux/utsname.h>
+
+static inline struct new_utsname *init_utsname(void)
+{
+        return &system_utsname;
+}
+
+#endif /* _UTSNAME_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.18_FC6/include/linux/fs.h infinipath-drivers/kernel_addons/backport/2.6.18_FC6/include/linux/fs.h
--- ofed_1_2/kernel_addons/backport/2.6.18_FC6/include/linux/fs.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.18_FC6/include/linux/fs.h	2007-02-13 16:21:14.612568000 -0800
@@ -0,0 +1,11 @@
+#ifndef BACKPORT_LINUX_FS_H
+#define BACKPORT_LINUX_FS_H
+
+#include_next <linux/fs.h>
+
+static inline void inc_nlink(struct inode *inode)
+{
+        inode->i_nlink++;
+}
+
+#endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.18_FC6/include/linux/utsname.h infinipath-drivers/kernel_addons/backport/2.6.18_FC6/include/linux/utsname.h
--- ofed_1_2/kernel_addons/backport/2.6.18_FC6/include/linux/utsname.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.18_FC6/include/linux/utsname.h	2007-02-13 16:21:14.630548000 -0800
@@ -0,0 +1,11 @@
+#ifndef _UTSNAME_BACKPORT_H
+#define _UTSNAME_BACKPORT_H
+
+#include_next <linux/utsname.h>
+
+static inline struct new_utsname *init_utsname(void)
+{
+        return &system_utsname;
+}
+
+#endif /* _UTSNAME_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.5_sles9_sp3/include/asm/atomic.h infinipath-drivers/kernel_addons/backport/2.6.5_sles9_sp3/include/asm/atomic.h
--- ofed_1_2/kernel_addons/backport/2.6.5_sles9_sp3/include/asm/atomic.h	2007-01-23 08:34:31.805446000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.5_sles9_sp3/include/asm/atomic.h	2007-02-13 10:54:58.078153000 -0800
@@ -25,4 +25,199 @@
 
 #endif
 
+#if defined(__x86_64__)
+
+#ifdef CONFIG_SMP
+#define LOCK_PREFIX "lock ; "
+#else
+#define LOCK_PREFIX ""
+#endif
+
+/* An 64bit atomic type */
+
+typedef struct { volatile long counter; } atomic64_t;
+
+#define ATOMIC64_INIT(i)	{ (i) }
+
+/**
+ * atomic64_read - read atomic64 variable
+ * @v: pointer of type atomic64_t
+ *
+ * Atomically reads the value of @v.
+ * Doesn't imply a read memory barrier.
+ */
+#define atomic64_read(v)		((v)->counter)
+
+/**
+ * atomic64_set - set atomic64 variable
+ * @v: pointer to type atomic64_t
+ * @i: required value
+ *
+ * Atomically sets the value of @v to @i.
+ */
+#define atomic64_set(v,i)		(((v)->counter) = (i))
+
+/**
+ * atomic64_add - add integer to atomic64 variable
+ * @i: integer value to add
+ * @v: pointer to type atomic64_t
+ *
+ * Atomically adds @i to @v.
+ */
+static __inline__ void atomic64_add(long i, atomic64_t *v)
+{
+	__asm__ __volatile__(
+		LOCK_PREFIX "addq %1,%0"
+		:"=m" (v->counter)
+		:"ir" (i), "m" (v->counter));
+}
+
+/**
+ * atomic64_sub - subtract the atomic64 variable
+ * @i: integer value to subtract
+ * @v: pointer to type atomic64_t
+ *
+ * Atomically subtracts @i from @v.
+ */
+static __inline__ void atomic64_sub(long i, atomic64_t *v)
+{
+	__asm__ __volatile__(
+		LOCK_PREFIX "subq %1,%0"
+		:"=m" (v->counter)
+		:"ir" (i), "m" (v->counter));
+}
+
+/**
+ * atomic64_sub_and_test - subtract value from variable and test result
+ * @i: integer value to subtract
+ * @v: pointer to type atomic64_t
+ *
+ * Atomically subtracts @i from @v and returns
+ * true if the result is zero, or false for all
+ * other cases.
+ */
+static __inline__ int atomic64_sub_and_test(long i, atomic64_t *v)
+{
+	unsigned char c;
+
+	__asm__ __volatile__(
+		LOCK_PREFIX "subq %2,%0; sete %1"
+		:"=m" (v->counter), "=qm" (c)
+		:"ir" (i), "m" (v->counter) : "memory");
+	return c;
+}
+
+/**
+ * atomic64_inc - increment atomic64 variable
+ * @v: pointer to type atomic64_t
+ *
+ * Atomically increments @v by 1.
+ */
+static __inline__ void atomic64_inc(atomic64_t *v)
+{
+	__asm__ __volatile__(
+		LOCK_PREFIX "incq %0"
+		:"=m" (v->counter)
+		:"m" (v->counter));
+}
+
+/**
+ * atomic64_dec - decrement atomic64 variable
+ * @v: pointer to type atomic64_t
+ *
+ * Atomically decrements @v by 1.
+ */
+static __inline__ void atomic64_dec(atomic64_t *v)
+{
+	__asm__ __volatile__(
+		LOCK_PREFIX "decq %0"
+		:"=m" (v->counter)
+		:"m" (v->counter));
+}
+
+/**
+ * atomic64_dec_and_test - decrement and test
+ * @v: pointer to type atomic64_t
+ *
+ * Atomically decrements @v by 1 and
+ * returns true if the result is 0, or false for all other
+ * cases.
+ */
+static __inline__ int atomic64_dec_and_test(atomic64_t *v)
+{
+	unsigned char c;
+
+	__asm__ __volatile__(
+		LOCK_PREFIX "decq %0; sete %1"
+		:"=m" (v->counter), "=qm" (c)
+		:"m" (v->counter) : "memory");
+	return c != 0;
+}
+
+/**
+ * atomic64_inc_and_test - increment and test
+ * @v: pointer to type atomic64_t
+ *
+ * Atomically increments @v by 1
+ * and returns true if the result is zero, or false for all
+ * other cases.
+ */
+static __inline__ int atomic64_inc_and_test(atomic64_t *v)
+{
+	unsigned char c;
+
+	__asm__ __volatile__(
+		LOCK_PREFIX "incq %0; sete %1"
+		:"=m" (v->counter), "=qm" (c)
+		:"m" (v->counter) : "memory");
+	return c != 0;
+}
+
+/**
+ * atomic64_add_negative - add and test if negative
+ * @i: integer value to add
+ * @v: pointer to type atomic64_t
+ *
+ * Atomically adds @i to @v and returns true
+ * if the result is negative, or false when
+ * result is greater than or equal to zero.
+ */
+static __inline__ int atomic64_add_negative(long i, atomic64_t *v)
+{
+	unsigned char c;
+
+	__asm__ __volatile__(
+		LOCK_PREFIX "addq %2,%0; sets %1"
+		:"=m" (v->counter), "=qm" (c)
+		:"ir" (i), "m" (v->counter) : "memory");
+	return c;
+}
+
+/**
+ * atomic64_add_return - add and return
+ * @i: integer value to add
+ * @v: pointer to type atomic64_t
+ *
+ * Atomically adds @i to @v and returns @i + @v
+ */
+static __inline__ long atomic64_add_return(long i, atomic64_t *v)
+{
+	long __i = i;
+	__asm__ __volatile__(
+		LOCK_PREFIX "xaddq %0, %1;"
+		:"=r"(i)
+		:"m"(v->counter), "0"(i));
+	return i + __i;
+}
+
+static __inline__ long atomic64_sub_return(long i, atomic64_t *v)
+{
+	return atomic64_add_return(-i,v);
+}
+
+#define atomic64_inc_return(v)  (atomic64_add_return(1,v))
+#define atomic64_dec_return(v)  (atomic64_sub_return(1,v))
+
+#endif
+
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.5_sles9_sp3/include/asm/dma-mapping.h infinipath-drivers/kernel_addons/backport/2.6.5_sles9_sp3/include/asm/dma-mapping.h
--- ofed_1_2/kernel_addons/backport/2.6.5_sles9_sp3/include/asm/dma-mapping.h	2007-01-23 08:34:31.814435000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.5_sles9_sp3/include/asm/dma-mapping.h	2007-02-13 10:54:58.081155000 -0800
@@ -1,6 +1,7 @@
 #ifndef LINUX_ASM_DMA_MAPPING_BACKPORT_H
 #define LINUX_ASM_DMA_MAPPING_BACKPORT_H
 
+#include <linux/types.h>
 #include <asm/scatterlist.h>
 #include <asm/io.h>
 #include_next <asm/dma-mapping.h>
diff -urN ofed_1_2/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/cpumask.h infinipath-drivers/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/cpumask.h
--- ofed_1_2/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/cpumask.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/cpumask.h	2007-02-13 10:54:58.098128000 -0800
@@ -0,0 +1,16 @@
+#ifndef _CPUMASK_BACKPORT_H
+#define _CPUMASK_BACKPORT_H
+
+#include_next <linux/cpumask.h>
+
+#ifdef CONFIG_SMP
+# if NR_CPUS > BITS_PER_LONG
+#  define cpus_full(map) bitmap_full(map.mask, NR_CPUS)
+# else
+#  define cpus_full(map) (map == CPU_MASK_ALL)
+# endif
+#else
+# define cpus_full(map) (map == 1UL)
+#endif
+
+#endif /* _CPUMASK_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/dma-mapping.h infinipath-drivers/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/dma-mapping.h
--- ofed_1_2/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/dma-mapping.h	2007-01-23 08:34:31.840413000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/dma-mapping.h	2007-02-13 10:54:58.101125000 -0800
@@ -1,8 +1,13 @@
-#ifndef LINUX_DMA_MAPPING_BACKPORT_H
-#define LINUX_DMA_MAPPING_BACKPORT_H
+#ifndef _DMA_MAPPING_BACKPORT_H
+#define _DMA_MAPPING_BACKPORT_H
 
-#include <linux/device.h>
-#include <linux/mm.h>
 #include_next <linux/dma-mapping.h>
 
-#endif
+static inline int valid_dma_direction(int dma_direction)
+{
+	return ((dma_direction == DMA_BIDIRECTIONAL) ||
+		(dma_direction == DMA_TO_DEVICE) ||
+		(dma_direction == DMA_FROM_DEVICE));
+}
+
+#endif /* _DMA_MAPPING_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/fs.h infinipath-drivers/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/fs.h
--- ofed_1_2/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/fs.h	2007-01-23 08:34:31.846407000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/fs.h	2007-02-13 10:54:58.103124000 -0800
@@ -2,7 +2,30 @@
 #define BACKPORT_LINUX_FS_H
 
 #include_next <linux/fs.h>
+#include <asm/uaccess.h>
 
 #define i_private u.generic_ip
 
+static inline ssize_t simple_read_from_buffer(void __user *to, size_t count,
+					      loff_t *ppos, const void *from,
+					      size_t available)
+{
+	loff_t pos = *ppos;
+	if (pos < 0)
+		return -EINVAL;
+	if (pos >= available)
+		return 0;
+	if (count > available - pos)
+		count = available - pos;
+	if (copy_to_user(to, from + pos, count))
+		return -EFAULT;
+	*ppos = pos + count;
+	return count;
+}
+
+static inline void inc_nlink(struct inode *inode)
+{
+        inode->i_nlink++;
+}
+
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/pci.h infinipath-drivers/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/pci.h
--- ofed_1_2/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/pci.h	2007-01-23 08:34:31.916339000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/pci.h	2007-02-13 10:54:58.105121000 -0800
@@ -9,14 +9,36 @@
 #define  PCI_EXP_DEVCTL_PAYLOAD	0x00e0	/* Max_Payload_Size */
 #define PCI_EXP_LNKSTA		18	/* Link Status */
 
-struct msix_entry {
-        u16     vector; /* kernel uses to write allocated vector */
-        u16     entry;  /* driver uses to specify entry, OS writes */
-};
+/*
+ * pci_find_next_capability - Find next capability after current position
+ * @dev: PCI device to query
+ * @pos: Position to search from
+ * @cap: capability code
+ */
+static inline int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap)
+{
+	u8 id;
+	int ttl = 48;
+	int ret;
 
-static inline void pci_disable_msi(struct pci_dev* dev) {}
-static inline void pci_disable_msix(struct pci_dev* dev) {}
-static inline int pci_enable_msix(struct pci_dev* dev,
-        struct msix_entry *entries, int nvec) {return -1;}
+	while (ttl--) {
+		pci_read_config_byte(dev, pos + PCI_CAP_LIST_NEXT, &pos);
+		pos &= ~3;
+		if (pos < 0x40)
+			break;
+		pci_read_config_byte(dev, pos + PCI_CAP_LIST_ID, &id);
+		if (id == 0xff)
+			break;
+		if (id == cap) {
+			ret = pos;
+			goto bail;
+		}
+	}
+
+	ret = 0;
+
+bail:
+	return ret;
+}
 
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/utsname.h infinipath-drivers/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/utsname.h
--- ofed_1_2/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/utsname.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/utsname.h	2007-02-13 10:54:58.109115000 -0800
@@ -0,0 +1,11 @@
+#ifndef _UTSNAME_BACKPORT_H
+#define _UTSNAME_BACKPORT_H
+
+#include_next <linux/utsname.h>
+
+static inline struct new_utsname *init_utsname(void)
+{
+        return &system_utsname;
+}
+
+#endif /* _UTSNAME_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/vmalloc.h infinipath-drivers/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/vmalloc.h
--- ofed_1_2/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/vmalloc.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.5_sles9_sp3/include/linux/vmalloc.h	2007-02-13 10:54:58.111112000 -0800
@@ -0,0 +1,20 @@
+#ifndef _VMALLOC_BACKPORT_H
+#define _VMALLOC_BACKPORT_H
+
+#include_next <linux/vmalloc.h>
+#include <linux/string.h>
+
+static inline void *vmalloc_user(unsigned long size)
+{
+       void *ret = vmalloc(size);
+
+       if (ret == NULL)
+	       goto bail;
+
+       memset(ret, 0, size);
+
+bail:
+       return ret;
+}
+
+#endif /* _VMALLOC_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.9_U2/include/asm/atomic.h infinipath-drivers/kernel_addons/backport/2.6.9_U2/include/asm/atomic.h
--- ofed_1_2/kernel_addons/backport/2.6.9_U2/include/asm/atomic.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.9_U2/include/asm/atomic.h	2007-02-13 10:54:58.135091000 -0800
@@ -0,0 +1,27 @@
+#ifndef _ASM_ATOMIC_BACKPORT_H
+#define _ASM_ATOMIC_BACKPORT_H
+
+#include_next <asm/atomic.h>
+
+# if defined(__x86_64__)
+
+/**
+ * atomic64_add_return - add and return
+ * @i: integer value to add
+ * @v: pointer to type atomic64_t
+ *
+ * Atomically adds @i to @v and returns @i + @v
+ */
+static __inline__ long atomic64_add_return(long i, atomic64_t *v)
+{
+	long __i = i;
+	__asm__ __volatile__(
+		LOCK "xaddq %0, %1;"
+		:"=r"(i)
+		:"m"(v->counter), "0"(i));
+	return i + __i;
+}
+
+# endif /* __x86_64__ */
+
+#endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.9_U2/include/asm/io.h infinipath-drivers/kernel_addons/backport/2.6.9_U2/include/asm/io.h
--- ofed_1_2/kernel_addons/backport/2.6.9_U2/include/asm/io.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.9_U2/include/asm/io.h	2007-02-13 10:54:58.137089000 -0800
@@ -0,0 +1,10 @@
+#ifndef _ASM_IO_BACKPORT_H
+#define _ASM_IO_BACKPORT_H
+
+#include_next <asm/io.h>
+
+#ifndef mmiowb
+#define mmiowb()
+#endif
+
+#endif /* _ASM_IO_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.9_U2/include/linux/dma-mapping.h infinipath-drivers/kernel_addons/backport/2.6.9_U2/include/linux/dma-mapping.h
--- ofed_1_2/kernel_addons/backport/2.6.9_U2/include/linux/dma-mapping.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.9_U2/include/linux/dma-mapping.h	2007-02-13 10:54:58.193034000 -0800
@@ -0,0 +1,13 @@
+#ifndef _DMA_MAPPING_BACKPORT_H
+#define _DMA_MAPPING_BACKPORT_H
+
+#include_next <linux/dma-mapping.h>
+
+static inline int valid_dma_direction(int dma_direction)
+{
+	return ((dma_direction == DMA_BIDIRECTIONAL) ||
+		(dma_direction == DMA_TO_DEVICE) ||
+		(dma_direction == DMA_FROM_DEVICE));
+}
+
+#endif /* _DMA_MAPPING_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.9_U2/include/linux/fs.h infinipath-drivers/kernel_addons/backport/2.6.9_U2/include/linux/fs.h
--- ofed_1_2/kernel_addons/backport/2.6.9_U2/include/linux/fs.h	2007-01-23 08:34:32.073182000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.9_U2/include/linux/fs.h	2007-02-13 10:54:58.196028000 -0800
@@ -5,4 +5,9 @@
 
 #define i_private u.generic_ip
 
+static inline void inc_nlink(struct inode *inode)
+{
+        inode->i_nlink++;
+}
+
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.9_U2/include/linux/pci.h infinipath-drivers/kernel_addons/backport/2.6.9_U2/include/linux/pci.h
--- ofed_1_2/kernel_addons/backport/2.6.9_U2/include/linux/pci.h	2007-02-04 23:02:01.767528000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.9_U2/include/linux/pci.h	2007-02-13 10:54:58.200023000 -0800
@@ -4,6 +4,38 @@
 #include_next <linux/pci.h>
 
 #define PCI_EXP_LNKCTL          16      /* Link Control */
-#define PCI_EXP_LNKSTA		 18	 /* Link Status */
+#define PCI_EXP_LNKSTA          18      /* Link Status */
+
+/*
+ * pci_find_next_capability - Find next capability after current position
+ * @dev: PCI device to query
+ * @pos: Position to search from
+ * @cap: capability code
+ */
+static inline int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap)
+{
+	u8 id;
+	int ttl = 48;
+	int ret;
+
+	while (ttl--) {
+		pci_read_config_byte(dev, pos + PCI_CAP_LIST_NEXT, &pos);
+		pos &= ~3;
+		if (pos < 0x40)
+			break;
+		pci_read_config_byte(dev, pos + PCI_CAP_LIST_ID, &id);
+		if (id == 0xff)
+			break;
+		if (id == cap) {
+			ret = pos;
+			goto bail;
+		}
+	}
+
+	ret = 0;
+
+bail:
+	return ret;
+}
 
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.9_U2/include/linux/utsname.h infinipath-drivers/kernel_addons/backport/2.6.9_U2/include/linux/utsname.h
--- ofed_1_2/kernel_addons/backport/2.6.9_U2/include/linux/utsname.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.9_U2/include/linux/utsname.h	2007-02-13 10:54:58.212013000 -0800
@@ -0,0 +1,11 @@
+#ifndef _UTSNAME_BACKPORT_H
+#define _UTSNAME_BACKPORT_H
+
+#include_next <linux/utsname.h>
+
+static inline struct new_utsname *init_utsname(void)
+{
+        return &system_utsname;
+}
+
+#endif /* _UTSNAME_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.9_U2/include/linux/vmalloc.h infinipath-drivers/kernel_addons/backport/2.6.9_U2/include/linux/vmalloc.h
--- ofed_1_2/kernel_addons/backport/2.6.9_U2/include/linux/vmalloc.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.9_U2/include/linux/vmalloc.h	2007-02-13 10:54:58.217016000 -0800
@@ -0,0 +1,20 @@
+#ifndef _VMALLOC_BACKPORT_H
+#define _VMALLOC_BACKPORT_H
+
+#include_next <linux/vmalloc.h>
+#include <linux/string.h>
+
+static inline void *vmalloc_user(unsigned long size)
+{
+       void *ret = vmalloc(size);
+
+       if (ret == NULL)
+	       goto bail;
+
+       memset(ret, 0, size);
+
+bail:
+       return ret;
+}
+
+#endif /* _VMALLOC_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.9_U3/include/asm/atomic.h infinipath-drivers/kernel_addons/backport/2.6.9_U3/include/asm/atomic.h
--- ofed_1_2/kernel_addons/backport/2.6.9_U3/include/asm/atomic.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.9_U3/include/asm/atomic.h	2007-02-13 10:54:58.245010000 -0800
@@ -0,0 +1,27 @@
+#ifndef _ASM_ATOMIC_BACKPORT_H
+#define _ASM_ATOMIC_BACKPORT_H
+
+#include_next <asm/atomic.h>
+
+# if defined(__x86_64__)
+
+/**
+ * atomic64_add_return - add and return
+ * @i: integer value to add
+ * @v: pointer to type atomic64_t
+ *
+ * Atomically adds @i to @v and returns @i + @v
+ */
+static __inline__ long atomic64_add_return(long i, atomic64_t *v)
+{
+	long __i = i;
+	__asm__ __volatile__(
+		LOCK "xaddq %0, %1;"
+		:"=r"(i)
+		:"m"(v->counter), "0"(i));
+	return i + __i;
+}
+
+# endif /* __x86_64__ */
+
+#endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.9_U3/include/linux/dma-mapping.h infinipath-drivers/kernel_addons/backport/2.6.9_U3/include/linux/dma-mapping.h
--- ofed_1_2/kernel_addons/backport/2.6.9_U3/include/linux/dma-mapping.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.9_U3/include/linux/dma-mapping.h	2007-02-13 10:54:58.253990000 -0800
@@ -0,0 +1,13 @@
+#ifndef _DMA_MAPPING_BACKPORT_H
+#define _DMA_MAPPING_BACKPORT_H
+
+#include_next <linux/dma-mapping.h>
+
+static inline int valid_dma_direction(int dma_direction)
+{
+	return ((dma_direction == DMA_BIDIRECTIONAL) ||
+		(dma_direction == DMA_TO_DEVICE) ||
+		(dma_direction == DMA_FROM_DEVICE));
+}
+
+#endif /* _DMA_MAPPING_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.9_U3/include/linux/fs.h infinipath-drivers/kernel_addons/backport/2.6.9_U3/include/linux/fs.h
--- ofed_1_2/kernel_addons/backport/2.6.9_U3/include/linux/fs.h	2006-12-05 14:50:49.881274000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.9_U3/include/linux/fs.h	2007-02-13 10:54:58.260012000 -0800
@@ -5,4 +5,9 @@
 
 #define i_private u.generic_ip
 
+static inline void inc_nlink(struct inode *inode)
+{
+        inode->i_nlink++;
+}
+
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.9_U3/include/linux/pci.h infinipath-drivers/kernel_addons/backport/2.6.9_U3/include/linux/pci.h
--- ofed_1_2/kernel_addons/backport/2.6.9_U3/include/linux/pci.h	2007-02-04 23:02:01.894406000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.9_U3/include/linux/pci.h	2007-02-13 10:54:58.267975000 -0800
@@ -4,6 +4,38 @@
 #include_next <linux/pci.h>
 
 #define PCI_EXP_LNKCTL          16      /* Link Control */
-#define PCI_EXP_LNKSTA		 18	 /* Link Status */
+#define PCI_EXP_LNKSTA          18      /* Link Status */
+
+/*
+ * pci_find_next_capability - Find next capability after current position
+ * @dev: PCI device to query
+ * @pos: Position to search from
+ * @cap: capability code
+ */
+static inline int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap)
+{
+	u8 id;
+	int ttl = 48;
+	int ret;
+
+	while (ttl--) {
+		pci_read_config_byte(dev, pos + PCI_CAP_LIST_NEXT, &pos);
+		pos &= ~3;
+		if (pos < 0x40)
+			break;
+		pci_read_config_byte(dev, pos + PCI_CAP_LIST_ID, &id);
+		if (id == 0xff)
+			break;
+		if (id == cap) {
+			ret = pos;
+			goto bail;
+		}
+	}
+
+	ret = 0;
+
+bail:
+	return ret;
+}
 
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.9_U3/include/linux/utsname.h infinipath-drivers/kernel_addons/backport/2.6.9_U3/include/linux/utsname.h
--- ofed_1_2/kernel_addons/backport/2.6.9_U3/include/linux/utsname.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.9_U3/include/linux/utsname.h	2007-02-13 10:54:58.277943000 -0800
@@ -0,0 +1,11 @@
+#ifndef _UTSNAME_BACKPORT_H
+#define _UTSNAME_BACKPORT_H
+
+#include_next <linux/utsname.h>
+
+static inline struct new_utsname *init_utsname(void)
+{
+        return &system_utsname;
+}
+
+#endif /* _UTSNAME_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.9_U3/include/linux/vmalloc.h infinipath-drivers/kernel_addons/backport/2.6.9_U3/include/linux/vmalloc.h
--- ofed_1_2/kernel_addons/backport/2.6.9_U3/include/linux/vmalloc.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.9_U3/include/linux/vmalloc.h	2007-02-13 10:54:58.281957000 -0800
@@ -0,0 +1,20 @@
+#ifndef _VMALLOC_BACKPORT_H
+#define _VMALLOC_BACKPORT_H
+
+#include_next <linux/vmalloc.h>
+#include <linux/string.h>
+
+static inline void *vmalloc_user(unsigned long size)
+{
+       void *ret = vmalloc(size);
+
+       if (ret == NULL)
+	       goto bail;
+
+       memset(ret, 0, size);
+
+bail:
+       return ret;
+}
+
+#endif /* _VMALLOC_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.9_U4/include/asm/atomic.h infinipath-drivers/kernel_addons/backport/2.6.9_U4/include/asm/atomic.h
--- ofed_1_2/kernel_addons/backport/2.6.9_U4/include/asm/atomic.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.9_U4/include/asm/atomic.h	2007-02-13 10:54:58.323897000 -0800
@@ -0,0 +1,27 @@
+#ifndef _ASM_ATOMIC_BACKPORT_H
+#define _ASM_ATOMIC_BACKPORT_H
+
+#include_next <asm/atomic.h>
+
+# if defined(__x86_64__)
+
+/**
+ * atomic64_add_return - add and return
+ * @i: integer value to add
+ * @v: pointer to type atomic64_t
+ *
+ * Atomically adds @i to @v and returns @i + @v
+ */
+static __inline__ long atomic64_add_return(long i, atomic64_t *v)
+{
+	long __i = i;
+	__asm__ __volatile__(
+		LOCK "xaddq %0, %1;"
+		:"=r"(i)
+		:"m"(v->counter), "0"(i));
+	return i + __i;
+}
+
+# endif /* __x86_64__ */
+
+#endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.9_U4/include/linux/dma-mapping.h infinipath-drivers/kernel_addons/backport/2.6.9_U4/include/linux/dma-mapping.h
--- ofed_1_2/kernel_addons/backport/2.6.9_U4/include/linux/dma-mapping.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.9_U4/include/linux/dma-mapping.h	2007-02-13 10:54:58.340897000 -0800
@@ -0,0 +1,13 @@
+#ifndef _DMA_MAPPING_BACKPORT_H
+#define _DMA_MAPPING_BACKPORT_H
+
+#include_next <linux/dma-mapping.h>
+
+static inline int valid_dma_direction(int dma_direction)
+{
+	return ((dma_direction == DMA_BIDIRECTIONAL) ||
+		(dma_direction == DMA_TO_DEVICE) ||
+		(dma_direction == DMA_FROM_DEVICE));
+}
+
+#endif /* _DMA_MAPPING_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.9_U4/include/linux/fs.h infinipath-drivers/kernel_addons/backport/2.6.9_U4/include/linux/fs.h
--- ofed_1_2/kernel_addons/backport/2.6.9_U4/include/linux/fs.h	2006-12-05 14:50:49.967181000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.9_U4/include/linux/fs.h	2007-02-13 10:54:58.344877000 -0800
@@ -5,4 +5,9 @@
 
 #define i_private u.generic_ip
 
+static inline void inc_nlink(struct inode *inode)
+{
+        inode->i_nlink++;
+}
+
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.9_U4/include/linux/pci.h infinipath-drivers/kernel_addons/backport/2.6.9_U4/include/linux/pci.h
--- ofed_1_2/kernel_addons/backport/2.6.9_U4/include/linux/pci.h	2007-01-23 08:34:32.190066000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.9_U4/include/linux/pci.h	2007-02-13 16:21:14.635550000 -0800
@@ -4,6 +4,38 @@
 #include_next <linux/pci.h>
 
 #define PCI_EXP_LNKCTL          16      /* Link Control */
-#define PCI_EXP_LNKSTA		 18	 /* Link Status */
+#define PCI_EXP_LNKSTA          18      /* Link Status */
+
+/*
+ * pci_find_next_capability - Find next capability after current position
+ * @dev: PCI device to query
+ * @pos: Position to search from
+ * @cap: capability code
+ */
+static inline int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap)
+{
+	u8 id;
+	int ttl = 48;
+	int ret;
+
+	while (ttl--) {
+		pci_read_config_byte(dev, pos + PCI_CAP_LIST_NEXT, &pos);
+		pos &= ~3;
+		if (pos < 0x40)
+			break;
+		pci_read_config_byte(dev, pos + PCI_CAP_LIST_ID, &id);
+		if (id == 0xff)
+			break;
+		if (id == cap) {
+			ret = pos;
+			goto bail;
+		}
+	}
+
+	ret = 0;
+
+bail:
+	return ret;
+}
 
 #endif
diff -urN ofed_1_2/kernel_addons/backport/2.6.9_U4/include/linux/utsname.h infinipath-drivers/kernel_addons/backport/2.6.9_U4/include/linux/utsname.h
--- ofed_1_2/kernel_addons/backport/2.6.9_U4/include/linux/utsname.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.9_U4/include/linux/utsname.h	2007-02-13 10:54:58.354866000 -0800
@@ -0,0 +1,11 @@
+#ifndef _UTSNAME_BACKPORT_H
+#define _UTSNAME_BACKPORT_H
+
+#include_next <linux/utsname.h>
+
+static inline struct new_utsname *init_utsname(void)
+{
+        return &system_utsname;
+}
+
+#endif /* _UTSNAME_BACKPORT_H */
diff -urN ofed_1_2/kernel_addons/backport/2.6.9_U4/include/linux/vmalloc.h infinipath-drivers/kernel_addons/backport/2.6.9_U4/include/linux/vmalloc.h
--- ofed_1_2/kernel_addons/backport/2.6.9_U4/include/linux/vmalloc.h	1969-12-31 16:00:00.000000000 -0800
+++ infinipath-drivers/kernel_addons/backport/2.6.9_U4/include/linux/vmalloc.h	2007-02-13 10:54:58.356864000 -0800
@@ -0,0 +1,20 @@
+#ifndef _VMALLOC_BACKPORT_H
+#define _VMALLOC_BACKPORT_H
+
+#include_next <linux/vmalloc.h>
+#include <linux/string.h>
+
+static inline void *vmalloc_user(unsigned long size)
+{
+       void *ret = vmalloc(size);
+
+       if (ret == NULL)
+	       goto bail;
+
+       memset(ret, 0, size);
+
+bail:
+       return ret;
+}
+
+#endif /* _VMALLOC_BACKPORT_H */
