[ewg] Re: [PATCH ofed-1.3.1 0/2] IB/ehca: Upstream patches (mostly bug fixes) for inclusion in ofed-1.3.1

Hoang-Nam Nguyen hnguyen at linux.vnet.ibm.com
Sun May 4 07:22:39 PDT 2008


IB/ehca: Backport patches: Fix compile issues due to code changes

ehca_01_ibmebus_loc_code.patch     2.6.23-2.6.16, 2.6.9_U5/6
backport_ehca_2_rhel45_umap.patch  2.6.9_U5/6
backport_ehca_3_rhel45_dma.patch   2.6.9_U5/6

Signed-off-by: Hoang-Nam Nguyen <hnguyen at de.ibm.com>
---
 .../backport/2.6.16/ehca_01_ibmebus_loc_code.patch |  285 +++++++++--------
 .../2.6.16_sles10/ehca_01_ibmebus_loc_code.patch   |  285 +++++++++--------
 .../ehca_01_ibmebus_loc_code.patch                 |  285 +++++++++--------
 .../backport/2.6.17/ehca_01_ibmebus_loc_code.patch |  285 +++++++++--------
 .../2.6.18-EL5.1/ehca_01_ibmebus_loc_code.patch    |  285 +++++++++--------
 .../backport/2.6.18/ehca_01_ibmebus_loc_code.patch |  285 +++++++++--------
 .../2.6.18_FC6/ehca_01_ibmebus_loc_code.patch      |  285 +++++++++--------
 .../backport/2.6.19/ehca_01_ibmebus_loc_code.patch |  285 +++++++++--------
 .../backport/2.6.20/ehca_01_ibmebus_loc_code.patch |  285 +++++++++--------
 .../backport/2.6.21/ehca_01_ibmebus_loc_code.patch |  285 +++++++++--------
 .../backport/2.6.22/ehca_01_ibmebus_loc_code.patch |  285 +++++++++--------
 .../backport/2.6.23/ehca_01_ibmebus_loc_code.patch |  285 +++++++++--------
 .../2.6.9_U5/backport_ehca_2_rhel45_umap.patch     |  330 +++++++++-----------
 .../2.6.9_U5/backport_ehca_3_rhel45_dma.patch      |   31 +-
 .../2.6.9_U5/ehca_01_ibmebus_loc_code.patch        |  285 +++++++++--------
 .../2.6.9_U6/backport_ehca_2_rhel45_umap.patch     |  330 +++++++++-----------
 .../2.6.9_U6/backport_ehca_3_rhel45_dma.patch      |   31 +-
 .../2.6.9_U6/ehca_01_ibmebus_loc_code.patch        |  285 +++++++++--------
 18 files changed, 2396 insertions(+), 2316 deletions(-)

diff --git a/kernel_patches/backport/2.6.16/ehca_01_ibmebus_loc_code.patch b/kernel_patches/backport/2.6.16/ehca_01_ibmebus_loc_code.patch
index 40054fa..52a91fa 100644
--- a/kernel_patches/backport/2.6.16/ehca_01_ibmebus_loc_code.patch
+++ b/kernel_patches/backport/2.6.16/ehca_01_ibmebus_loc_code.patch
@@ -1,137 +1,148 @@
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 08:51:40.264936336 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 10:39:52.595875776 -0800
-@@ -107,7 +107,7 @@ struct ehca_sport {
- 
- struct ehca_shca {
- 	struct ib_device ib_device;
--	struct of_device *ofdev;
-+	struct ibmebus_dev *ibmebus_dev;
- 	u8 num_ports;
- 	int hw_level;
- 	struct list_head shca_list;
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 08:51:40.265936184 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 10:42:52.454956424 -0800
-@@ -123,7 +123,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 	/* register interrupt handlers and initialize work queues */
- 	if (type == EHCA_EQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
- 					  IRQF_DISABLED, "ehca_eq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -131,7 +131,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
- 	} else if (type == EHCA_NEQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
- 					  IRQF_DISABLED, "ehca_neq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -171,7 +171,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
- 	u64 h_ret;
- 
- 	spin_lock_irqsave(&eq->spinlock, flags);
--	ibmebus_free_irq(eq->ist, (void *)shca);
-+	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
- 
- 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
- 
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 08:51:40.267935880 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 10:58:15.135992904 -0800
-@@ -418,7 +418,7 @@ int ehca_init_device(struct ehca_shca *s
- 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
- 	shca->ib_device.phys_port_cnt       = shca->num_ports;
- 	shca->ib_device.num_comp_vectors    = 1;
--	shca->ib_device.dma_device          = &shca->ofdev->dev;
-+	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
- 	shca->ib_device.query_device        = ehca_query_device;
- 	shca->ib_device.query_port          = ehca_query_port;
- 	shca->ib_device.query_gid           = ehca_query_gid;
-@@ -672,7 +672,7 @@ static struct attribute_group ehca_dev_a
- 	.attrs = ehca_dev_attrs
- };
- 
--static int __devinit ehca_probe(struct of_device *dev,
-+static int __devinit ehca_probe(struct ibmebus_dev *dev,
- 				const struct of_device_id *id)
- {
- 	struct ehca_shca *shca;
-@@ -680,16 +680,16 @@ static int __devinit ehca_probe(struct o
- 	struct ib_pd *ibpd;
- 	int ret;
- 
--	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
-+	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
- 	if (!handle) {
- 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
- 	if (!(*handle)) {
- 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
-@@ -700,9 +700,9 @@ static int __devinit ehca_probe(struct o
- 	}
- 	mutex_init(&shca->modify_mutex);
- 
--	shca->ofdev = dev;
-+	shca->ibmebus_dev = dev;
- 	shca->ipz_hca_handle.handle = *handle;
--	dev->dev.driver_data = shca;
-+	dev->ofdev.dev.driver_data = shca;
- 
- 	ret = ehca_sense_attributes(shca);
- 	if (ret < 0) {
-@@ -778,7 +778,7 @@ static int __devinit ehca_probe(struct o
- 		}
- 	}
- 
--	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 	if (ret) /* only complain; we can live without attributes */
- 		ehca_err(&shca->ib_device,
- 			 "Cannot create device attributes  ret=%d", ret);
-@@ -828,12 +828,12 @@ probe1:
- 	return -EINVAL;
- }
- 
--static int __devexit ehca_remove(struct of_device *dev)
-+static int __devexit ehca_remove(struct ibmebus_dev *dev)
- {
--	struct ehca_shca *shca = dev->dev.driver_data;
-+	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
- 	int ret;
- 
--	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 
- 	if (ehca_open_aqp1 == 1) {
- 		int i;
-@@ -884,11 +884,11 @@ static struct of_device_id ehca_device_t
- 	{},
- };
- 
--static struct of_platform_driver ehca_driver = {
--	.name        = "ehca",
--	.match_table = ehca_device_table,
--	.probe       = ehca_probe,
--	.remove      = ehca_remove,
-+static struct ibmebus_driver ehca_driver = {
-+	.name     = "ehca",
-+	.id_table = ehca_device_table,
-+	.probe    = ehca_probe,
-+	.remove   = ehca_remove,
- };
- 
- void ehca_poll_eqs(unsigned long data)
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:08:21.000000000 +0200
+@@ -112,7 +112,7 @@ struct ehca_sport {
+ 
+ struct ehca_shca {
+ 	struct ib_device ib_device;
+-	struct of_device *ofdev;
++	struct ibmebus_dev *ibmebus_dev;
+ 	u8 num_ports;
+ 	int hw_level;
+ 	struct list_head shca_list;
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:08:21.000000000 +0200
+@@ -122,7 +122,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 	/* register interrupt handlers and initialize work queues */
+ 	if (type == EHCA_EQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
+ 					  IRQF_DISABLED, "ehca_eq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -130,7 +130,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
+ 	} else if (type == EHCA_NEQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
+ 					  IRQF_DISABLED, "ehca_neq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -170,7 +170,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
+ 	u64 h_ret;
+ 
+ 	spin_lock_irqsave(&eq->spinlock, flags);
+-	ibmebus_free_irq(eq->ist, (void *)shca);
++	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
+ 
+ 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
+ 
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:09:18.000000000 +0200
+@@ -289,8 +289,8 @@ static int ehca_sense_attributes(struct 
+ 	};
+ 
+ 	ehca_gen_dbg("Probing adapter %s...",
+-		     shca->ofdev->node->full_name);
+-	loc_code = of_get_property(shca->ofdev->node, "ibm,loc-code", NULL);
++		     shca->ibmebus_dev->ofdev.node->full_name);
++	loc_code = of_get_property(shca->ibmebus_dev->ofdev.node, "ibm,loc-code", NULL);
+ 	if (loc_code)
+ 		ehca_gen_dbg(" ... location lode=%s", loc_code);
+ 
+@@ -458,7 +458,7 @@ static int ehca_init_device(struct ehca_
+ 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
+ 	shca->ib_device.phys_port_cnt       = shca->num_ports;
+ 	shca->ib_device.num_comp_vectors    = 1;
+-	shca->ib_device.dma_device          = &shca->ofdev->dev;
++	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
+ 	shca->ib_device.query_device        = ehca_query_device;
+ 	shca->ib_device.query_port          = ehca_query_port;
+ 	shca->ib_device.query_gid           = ehca_query_gid;
+@@ -702,7 +702,7 @@ static struct attribute_group ehca_dev_a
+ 	.attrs = ehca_dev_attrs
+ };
+ 
+-static int __devinit ehca_probe(struct of_device *dev,
++static int __devinit ehca_probe(struct ibmebus_dev *dev,
+ 				const struct of_device_id *id)
+ {
+ 	struct ehca_shca *shca;
+@@ -710,16 +710,16 @@ static int __devinit ehca_probe(struct o
+ 	struct ib_pd *ibpd;
+ 	int ret, i, eq_size;
+ 
+-	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
++	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
+ 	if (!handle) {
+ 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+ 	if (!(*handle)) {
+ 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+@@ -734,9 +734,9 @@ static int __devinit ehca_probe(struct o
+ 	for (i = 0; i < ARRAY_SIZE(shca->sport); i++)
+ 		spin_lock_init(&shca->sport[i].mod_sqp_lock);
+ 
+-	shca->ofdev = dev;
++	shca->ibmebus_dev = dev;
+ 	shca->ipz_hca_handle.handle = *handle;
+-	dev->dev.driver_data = shca;
++	dev->ofdev.dev.driver_data = shca;
+ 
+ 	ret = ehca_sense_attributes(shca);
+ 	if (ret < 0) {
+@@ -813,7 +813,7 @@ static int __devinit ehca_probe(struct o
+ 		}
+ 	}
+ 
+-	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 	if (ret) /* only complain; we can live without attributes */
+ 		ehca_err(&shca->ib_device,
+ 			 "Cannot create device attributes  ret=%d", ret);
+@@ -863,12 +863,12 @@ probe1:
+ 	return -EINVAL;
+ }
+ 
+-static int __devexit ehca_remove(struct of_device *dev)
++static int __devexit ehca_remove(struct ibmebus_dev *dev)
+ {
+-	struct ehca_shca *shca = dev->dev.driver_data;
++	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
+ 	int ret;
+ 
+-	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 
+ 	if (ehca_open_aqp1 == 1) {
+ 		int i;
+@@ -919,11 +919,11 @@ static struct of_device_id ehca_device_t
+ 	{},
+ };
+ 
+-static struct of_platform_driver ehca_driver = {
+-	.name        = "ehca",
+-	.match_table = ehca_device_table,
+-	.probe       = ehca_probe,
+-	.remove      = ehca_remove,
++static struct ibmebus_driver ehca_driver = {
++	.name     = "ehca",
++	.id_table = ehca_device_table,
++	.probe    = ehca_probe,
++	.remove   = ehca_remove,
+ };
+ 
+ void ehca_poll_eqs(unsigned long data)
diff --git a/kernel_patches/backport/2.6.16_sles10/ehca_01_ibmebus_loc_code.patch b/kernel_patches/backport/2.6.16_sles10/ehca_01_ibmebus_loc_code.patch
index 40054fa..52a91fa 100644
--- a/kernel_patches/backport/2.6.16_sles10/ehca_01_ibmebus_loc_code.patch
+++ b/kernel_patches/backport/2.6.16_sles10/ehca_01_ibmebus_loc_code.patch
@@ -1,137 +1,148 @@
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 08:51:40.264936336 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 10:39:52.595875776 -0800
-@@ -107,7 +107,7 @@ struct ehca_sport {
- 
- struct ehca_shca {
- 	struct ib_device ib_device;
--	struct of_device *ofdev;
-+	struct ibmebus_dev *ibmebus_dev;
- 	u8 num_ports;
- 	int hw_level;
- 	struct list_head shca_list;
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 08:51:40.265936184 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 10:42:52.454956424 -0800
-@@ -123,7 +123,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 	/* register interrupt handlers and initialize work queues */
- 	if (type == EHCA_EQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
- 					  IRQF_DISABLED, "ehca_eq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -131,7 +131,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
- 	} else if (type == EHCA_NEQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
- 					  IRQF_DISABLED, "ehca_neq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -171,7 +171,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
- 	u64 h_ret;
- 
- 	spin_lock_irqsave(&eq->spinlock, flags);
--	ibmebus_free_irq(eq->ist, (void *)shca);
-+	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
- 
- 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
- 
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 08:51:40.267935880 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 10:58:15.135992904 -0800
-@@ -418,7 +418,7 @@ int ehca_init_device(struct ehca_shca *s
- 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
- 	shca->ib_device.phys_port_cnt       = shca->num_ports;
- 	shca->ib_device.num_comp_vectors    = 1;
--	shca->ib_device.dma_device          = &shca->ofdev->dev;
-+	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
- 	shca->ib_device.query_device        = ehca_query_device;
- 	shca->ib_device.query_port          = ehca_query_port;
- 	shca->ib_device.query_gid           = ehca_query_gid;
-@@ -672,7 +672,7 @@ static struct attribute_group ehca_dev_a
- 	.attrs = ehca_dev_attrs
- };
- 
--static int __devinit ehca_probe(struct of_device *dev,
-+static int __devinit ehca_probe(struct ibmebus_dev *dev,
- 				const struct of_device_id *id)
- {
- 	struct ehca_shca *shca;
-@@ -680,16 +680,16 @@ static int __devinit ehca_probe(struct o
- 	struct ib_pd *ibpd;
- 	int ret;
- 
--	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
-+	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
- 	if (!handle) {
- 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
- 	if (!(*handle)) {
- 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
-@@ -700,9 +700,9 @@ static int __devinit ehca_probe(struct o
- 	}
- 	mutex_init(&shca->modify_mutex);
- 
--	shca->ofdev = dev;
-+	shca->ibmebus_dev = dev;
- 	shca->ipz_hca_handle.handle = *handle;
--	dev->dev.driver_data = shca;
-+	dev->ofdev.dev.driver_data = shca;
- 
- 	ret = ehca_sense_attributes(shca);
- 	if (ret < 0) {
-@@ -778,7 +778,7 @@ static int __devinit ehca_probe(struct o
- 		}
- 	}
- 
--	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 	if (ret) /* only complain; we can live without attributes */
- 		ehca_err(&shca->ib_device,
- 			 "Cannot create device attributes  ret=%d", ret);
-@@ -828,12 +828,12 @@ probe1:
- 	return -EINVAL;
- }
- 
--static int __devexit ehca_remove(struct of_device *dev)
-+static int __devexit ehca_remove(struct ibmebus_dev *dev)
- {
--	struct ehca_shca *shca = dev->dev.driver_data;
-+	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
- 	int ret;
- 
--	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 
- 	if (ehca_open_aqp1 == 1) {
- 		int i;
-@@ -884,11 +884,11 @@ static struct of_device_id ehca_device_t
- 	{},
- };
- 
--static struct of_platform_driver ehca_driver = {
--	.name        = "ehca",
--	.match_table = ehca_device_table,
--	.probe       = ehca_probe,
--	.remove      = ehca_remove,
-+static struct ibmebus_driver ehca_driver = {
-+	.name     = "ehca",
-+	.id_table = ehca_device_table,
-+	.probe    = ehca_probe,
-+	.remove   = ehca_remove,
- };
- 
- void ehca_poll_eqs(unsigned long data)
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:08:21.000000000 +0200
+@@ -112,7 +112,7 @@ struct ehca_sport {
+ 
+ struct ehca_shca {
+ 	struct ib_device ib_device;
+-	struct of_device *ofdev;
++	struct ibmebus_dev *ibmebus_dev;
+ 	u8 num_ports;
+ 	int hw_level;
+ 	struct list_head shca_list;
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:08:21.000000000 +0200
+@@ -122,7 +122,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 	/* register interrupt handlers and initialize work queues */
+ 	if (type == EHCA_EQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
+ 					  IRQF_DISABLED, "ehca_eq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -130,7 +130,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
+ 	} else if (type == EHCA_NEQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
+ 					  IRQF_DISABLED, "ehca_neq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -170,7 +170,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
+ 	u64 h_ret;
+ 
+ 	spin_lock_irqsave(&eq->spinlock, flags);
+-	ibmebus_free_irq(eq->ist, (void *)shca);
++	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
+ 
+ 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
+ 
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:09:18.000000000 +0200
+@@ -289,8 +289,8 @@ static int ehca_sense_attributes(struct 
+ 	};
+ 
+ 	ehca_gen_dbg("Probing adapter %s...",
+-		     shca->ofdev->node->full_name);
+-	loc_code = of_get_property(shca->ofdev->node, "ibm,loc-code", NULL);
++		     shca->ibmebus_dev->ofdev.node->full_name);
++	loc_code = of_get_property(shca->ibmebus_dev->ofdev.node, "ibm,loc-code", NULL);
+ 	if (loc_code)
+ 		ehca_gen_dbg(" ... location lode=%s", loc_code);
+ 
+@@ -458,7 +458,7 @@ static int ehca_init_device(struct ehca_
+ 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
+ 	shca->ib_device.phys_port_cnt       = shca->num_ports;
+ 	shca->ib_device.num_comp_vectors    = 1;
+-	shca->ib_device.dma_device          = &shca->ofdev->dev;
++	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
+ 	shca->ib_device.query_device        = ehca_query_device;
+ 	shca->ib_device.query_port          = ehca_query_port;
+ 	shca->ib_device.query_gid           = ehca_query_gid;
+@@ -702,7 +702,7 @@ static struct attribute_group ehca_dev_a
+ 	.attrs = ehca_dev_attrs
+ };
+ 
+-static int __devinit ehca_probe(struct of_device *dev,
++static int __devinit ehca_probe(struct ibmebus_dev *dev,
+ 				const struct of_device_id *id)
+ {
+ 	struct ehca_shca *shca;
+@@ -710,16 +710,16 @@ static int __devinit ehca_probe(struct o
+ 	struct ib_pd *ibpd;
+ 	int ret, i, eq_size;
+ 
+-	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
++	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
+ 	if (!handle) {
+ 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+ 	if (!(*handle)) {
+ 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+@@ -734,9 +734,9 @@ static int __devinit ehca_probe(struct o
+ 	for (i = 0; i < ARRAY_SIZE(shca->sport); i++)
+ 		spin_lock_init(&shca->sport[i].mod_sqp_lock);
+ 
+-	shca->ofdev = dev;
++	shca->ibmebus_dev = dev;
+ 	shca->ipz_hca_handle.handle = *handle;
+-	dev->dev.driver_data = shca;
++	dev->ofdev.dev.driver_data = shca;
+ 
+ 	ret = ehca_sense_attributes(shca);
+ 	if (ret < 0) {
+@@ -813,7 +813,7 @@ static int __devinit ehca_probe(struct o
+ 		}
+ 	}
+ 
+-	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 	if (ret) /* only complain; we can live without attributes */
+ 		ehca_err(&shca->ib_device,
+ 			 "Cannot create device attributes  ret=%d", ret);
+@@ -863,12 +863,12 @@ probe1:
+ 	return -EINVAL;
+ }
+ 
+-static int __devexit ehca_remove(struct of_device *dev)
++static int __devexit ehca_remove(struct ibmebus_dev *dev)
+ {
+-	struct ehca_shca *shca = dev->dev.driver_data;
++	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
+ 	int ret;
+ 
+-	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 
+ 	if (ehca_open_aqp1 == 1) {
+ 		int i;
+@@ -919,11 +919,11 @@ static struct of_device_id ehca_device_t
+ 	{},
+ };
+ 
+-static struct of_platform_driver ehca_driver = {
+-	.name        = "ehca",
+-	.match_table = ehca_device_table,
+-	.probe       = ehca_probe,
+-	.remove      = ehca_remove,
++static struct ibmebus_driver ehca_driver = {
++	.name     = "ehca",
++	.id_table = ehca_device_table,
++	.probe    = ehca_probe,
++	.remove   = ehca_remove,
+ };
+ 
+ void ehca_poll_eqs(unsigned long data)
diff --git a/kernel_patches/backport/2.6.16_sles10_sp1/ehca_01_ibmebus_loc_code.patch b/kernel_patches/backport/2.6.16_sles10_sp1/ehca_01_ibmebus_loc_code.patch
index 40054fa..52a91fa 100644
--- a/kernel_patches/backport/2.6.16_sles10_sp1/ehca_01_ibmebus_loc_code.patch
+++ b/kernel_patches/backport/2.6.16_sles10_sp1/ehca_01_ibmebus_loc_code.patch
@@ -1,137 +1,148 @@
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 08:51:40.264936336 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 10:39:52.595875776 -0800
-@@ -107,7 +107,7 @@ struct ehca_sport {
- 
- struct ehca_shca {
- 	struct ib_device ib_device;
--	struct of_device *ofdev;
-+	struct ibmebus_dev *ibmebus_dev;
- 	u8 num_ports;
- 	int hw_level;
- 	struct list_head shca_list;
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 08:51:40.265936184 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 10:42:52.454956424 -0800
-@@ -123,7 +123,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 	/* register interrupt handlers and initialize work queues */
- 	if (type == EHCA_EQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
- 					  IRQF_DISABLED, "ehca_eq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -131,7 +131,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
- 	} else if (type == EHCA_NEQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
- 					  IRQF_DISABLED, "ehca_neq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -171,7 +171,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
- 	u64 h_ret;
- 
- 	spin_lock_irqsave(&eq->spinlock, flags);
--	ibmebus_free_irq(eq->ist, (void *)shca);
-+	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
- 
- 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
- 
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 08:51:40.267935880 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 10:58:15.135992904 -0800
-@@ -418,7 +418,7 @@ int ehca_init_device(struct ehca_shca *s
- 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
- 	shca->ib_device.phys_port_cnt       = shca->num_ports;
- 	shca->ib_device.num_comp_vectors    = 1;
--	shca->ib_device.dma_device          = &shca->ofdev->dev;
-+	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
- 	shca->ib_device.query_device        = ehca_query_device;
- 	shca->ib_device.query_port          = ehca_query_port;
- 	shca->ib_device.query_gid           = ehca_query_gid;
-@@ -672,7 +672,7 @@ static struct attribute_group ehca_dev_a
- 	.attrs = ehca_dev_attrs
- };
- 
--static int __devinit ehca_probe(struct of_device *dev,
-+static int __devinit ehca_probe(struct ibmebus_dev *dev,
- 				const struct of_device_id *id)
- {
- 	struct ehca_shca *shca;
-@@ -680,16 +680,16 @@ static int __devinit ehca_probe(struct o
- 	struct ib_pd *ibpd;
- 	int ret;
- 
--	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
-+	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
- 	if (!handle) {
- 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
- 	if (!(*handle)) {
- 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
-@@ -700,9 +700,9 @@ static int __devinit ehca_probe(struct o
- 	}
- 	mutex_init(&shca->modify_mutex);
- 
--	shca->ofdev = dev;
-+	shca->ibmebus_dev = dev;
- 	shca->ipz_hca_handle.handle = *handle;
--	dev->dev.driver_data = shca;
-+	dev->ofdev.dev.driver_data = shca;
- 
- 	ret = ehca_sense_attributes(shca);
- 	if (ret < 0) {
-@@ -778,7 +778,7 @@ static int __devinit ehca_probe(struct o
- 		}
- 	}
- 
--	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 	if (ret) /* only complain; we can live without attributes */
- 		ehca_err(&shca->ib_device,
- 			 "Cannot create device attributes  ret=%d", ret);
-@@ -828,12 +828,12 @@ probe1:
- 	return -EINVAL;
- }
- 
--static int __devexit ehca_remove(struct of_device *dev)
-+static int __devexit ehca_remove(struct ibmebus_dev *dev)
- {
--	struct ehca_shca *shca = dev->dev.driver_data;
-+	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
- 	int ret;
- 
--	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 
- 	if (ehca_open_aqp1 == 1) {
- 		int i;
-@@ -884,11 +884,11 @@ static struct of_device_id ehca_device_t
- 	{},
- };
- 
--static struct of_platform_driver ehca_driver = {
--	.name        = "ehca",
--	.match_table = ehca_device_table,
--	.probe       = ehca_probe,
--	.remove      = ehca_remove,
-+static struct ibmebus_driver ehca_driver = {
-+	.name     = "ehca",
-+	.id_table = ehca_device_table,
-+	.probe    = ehca_probe,
-+	.remove   = ehca_remove,
- };
- 
- void ehca_poll_eqs(unsigned long data)
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:08:21.000000000 +0200
+@@ -112,7 +112,7 @@ struct ehca_sport {
+ 
+ struct ehca_shca {
+ 	struct ib_device ib_device;
+-	struct of_device *ofdev;
++	struct ibmebus_dev *ibmebus_dev;
+ 	u8 num_ports;
+ 	int hw_level;
+ 	struct list_head shca_list;
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:08:21.000000000 +0200
+@@ -122,7 +122,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 	/* register interrupt handlers and initialize work queues */
+ 	if (type == EHCA_EQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
+ 					  IRQF_DISABLED, "ehca_eq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -130,7 +130,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
+ 	} else if (type == EHCA_NEQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
+ 					  IRQF_DISABLED, "ehca_neq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -170,7 +170,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
+ 	u64 h_ret;
+ 
+ 	spin_lock_irqsave(&eq->spinlock, flags);
+-	ibmebus_free_irq(eq->ist, (void *)shca);
++	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
+ 
+ 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
+ 
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:09:18.000000000 +0200
+@@ -289,8 +289,8 @@ static int ehca_sense_attributes(struct 
+ 	};
+ 
+ 	ehca_gen_dbg("Probing adapter %s...",
+-		     shca->ofdev->node->full_name);
+-	loc_code = of_get_property(shca->ofdev->node, "ibm,loc-code", NULL);
++		     shca->ibmebus_dev->ofdev.node->full_name);
++	loc_code = of_get_property(shca->ibmebus_dev->ofdev.node, "ibm,loc-code", NULL);
+ 	if (loc_code)
+ 		ehca_gen_dbg(" ... location lode=%s", loc_code);
+ 
+@@ -458,7 +458,7 @@ static int ehca_init_device(struct ehca_
+ 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
+ 	shca->ib_device.phys_port_cnt       = shca->num_ports;
+ 	shca->ib_device.num_comp_vectors    = 1;
+-	shca->ib_device.dma_device          = &shca->ofdev->dev;
++	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
+ 	shca->ib_device.query_device        = ehca_query_device;
+ 	shca->ib_device.query_port          = ehca_query_port;
+ 	shca->ib_device.query_gid           = ehca_query_gid;
+@@ -702,7 +702,7 @@ static struct attribute_group ehca_dev_a
+ 	.attrs = ehca_dev_attrs
+ };
+ 
+-static int __devinit ehca_probe(struct of_device *dev,
++static int __devinit ehca_probe(struct ibmebus_dev *dev,
+ 				const struct of_device_id *id)
+ {
+ 	struct ehca_shca *shca;
+@@ -710,16 +710,16 @@ static int __devinit ehca_probe(struct o
+ 	struct ib_pd *ibpd;
+ 	int ret, i, eq_size;
+ 
+-	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
++	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
+ 	if (!handle) {
+ 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+ 	if (!(*handle)) {
+ 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+@@ -734,9 +734,9 @@ static int __devinit ehca_probe(struct o
+ 	for (i = 0; i < ARRAY_SIZE(shca->sport); i++)
+ 		spin_lock_init(&shca->sport[i].mod_sqp_lock);
+ 
+-	shca->ofdev = dev;
++	shca->ibmebus_dev = dev;
+ 	shca->ipz_hca_handle.handle = *handle;
+-	dev->dev.driver_data = shca;
++	dev->ofdev.dev.driver_data = shca;
+ 
+ 	ret = ehca_sense_attributes(shca);
+ 	if (ret < 0) {
+@@ -813,7 +813,7 @@ static int __devinit ehca_probe(struct o
+ 		}
+ 	}
+ 
+-	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 	if (ret) /* only complain; we can live without attributes */
+ 		ehca_err(&shca->ib_device,
+ 			 "Cannot create device attributes  ret=%d", ret);
+@@ -863,12 +863,12 @@ probe1:
+ 	return -EINVAL;
+ }
+ 
+-static int __devexit ehca_remove(struct of_device *dev)
++static int __devexit ehca_remove(struct ibmebus_dev *dev)
+ {
+-	struct ehca_shca *shca = dev->dev.driver_data;
++	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
+ 	int ret;
+ 
+-	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 
+ 	if (ehca_open_aqp1 == 1) {
+ 		int i;
+@@ -919,11 +919,11 @@ static struct of_device_id ehca_device_t
+ 	{},
+ };
+ 
+-static struct of_platform_driver ehca_driver = {
+-	.name        = "ehca",
+-	.match_table = ehca_device_table,
+-	.probe       = ehca_probe,
+-	.remove      = ehca_remove,
++static struct ibmebus_driver ehca_driver = {
++	.name     = "ehca",
++	.id_table = ehca_device_table,
++	.probe    = ehca_probe,
++	.remove   = ehca_remove,
+ };
+ 
+ void ehca_poll_eqs(unsigned long data)
diff --git a/kernel_patches/backport/2.6.17/ehca_01_ibmebus_loc_code.patch b/kernel_patches/backport/2.6.17/ehca_01_ibmebus_loc_code.patch
index 40054fa..52a91fa 100644
--- a/kernel_patches/backport/2.6.17/ehca_01_ibmebus_loc_code.patch
+++ b/kernel_patches/backport/2.6.17/ehca_01_ibmebus_loc_code.patch
@@ -1,137 +1,148 @@
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 08:51:40.264936336 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 10:39:52.595875776 -0800
-@@ -107,7 +107,7 @@ struct ehca_sport {
- 
- struct ehca_shca {
- 	struct ib_device ib_device;
--	struct of_device *ofdev;
-+	struct ibmebus_dev *ibmebus_dev;
- 	u8 num_ports;
- 	int hw_level;
- 	struct list_head shca_list;
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 08:51:40.265936184 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 10:42:52.454956424 -0800
-@@ -123,7 +123,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 	/* register interrupt handlers and initialize work queues */
- 	if (type == EHCA_EQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
- 					  IRQF_DISABLED, "ehca_eq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -131,7 +131,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
- 	} else if (type == EHCA_NEQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
- 					  IRQF_DISABLED, "ehca_neq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -171,7 +171,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
- 	u64 h_ret;
- 
- 	spin_lock_irqsave(&eq->spinlock, flags);
--	ibmebus_free_irq(eq->ist, (void *)shca);
-+	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
- 
- 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
- 
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 08:51:40.267935880 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 10:58:15.135992904 -0800
-@@ -418,7 +418,7 @@ int ehca_init_device(struct ehca_shca *s
- 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
- 	shca->ib_device.phys_port_cnt       = shca->num_ports;
- 	shca->ib_device.num_comp_vectors    = 1;
--	shca->ib_device.dma_device          = &shca->ofdev->dev;
-+	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
- 	shca->ib_device.query_device        = ehca_query_device;
- 	shca->ib_device.query_port          = ehca_query_port;
- 	shca->ib_device.query_gid           = ehca_query_gid;
-@@ -672,7 +672,7 @@ static struct attribute_group ehca_dev_a
- 	.attrs = ehca_dev_attrs
- };
- 
--static int __devinit ehca_probe(struct of_device *dev,
-+static int __devinit ehca_probe(struct ibmebus_dev *dev,
- 				const struct of_device_id *id)
- {
- 	struct ehca_shca *shca;
-@@ -680,16 +680,16 @@ static int __devinit ehca_probe(struct o
- 	struct ib_pd *ibpd;
- 	int ret;
- 
--	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
-+	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
- 	if (!handle) {
- 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
- 	if (!(*handle)) {
- 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
-@@ -700,9 +700,9 @@ static int __devinit ehca_probe(struct o
- 	}
- 	mutex_init(&shca->modify_mutex);
- 
--	shca->ofdev = dev;
-+	shca->ibmebus_dev = dev;
- 	shca->ipz_hca_handle.handle = *handle;
--	dev->dev.driver_data = shca;
-+	dev->ofdev.dev.driver_data = shca;
- 
- 	ret = ehca_sense_attributes(shca);
- 	if (ret < 0) {
-@@ -778,7 +778,7 @@ static int __devinit ehca_probe(struct o
- 		}
- 	}
- 
--	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 	if (ret) /* only complain; we can live without attributes */
- 		ehca_err(&shca->ib_device,
- 			 "Cannot create device attributes  ret=%d", ret);
-@@ -828,12 +828,12 @@ probe1:
- 	return -EINVAL;
- }
- 
--static int __devexit ehca_remove(struct of_device *dev)
-+static int __devexit ehca_remove(struct ibmebus_dev *dev)
- {
--	struct ehca_shca *shca = dev->dev.driver_data;
-+	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
- 	int ret;
- 
--	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 
- 	if (ehca_open_aqp1 == 1) {
- 		int i;
-@@ -884,11 +884,11 @@ static struct of_device_id ehca_device_t
- 	{},
- };
- 
--static struct of_platform_driver ehca_driver = {
--	.name        = "ehca",
--	.match_table = ehca_device_table,
--	.probe       = ehca_probe,
--	.remove      = ehca_remove,
-+static struct ibmebus_driver ehca_driver = {
-+	.name     = "ehca",
-+	.id_table = ehca_device_table,
-+	.probe    = ehca_probe,
-+	.remove   = ehca_remove,
- };
- 
- void ehca_poll_eqs(unsigned long data)
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:08:21.000000000 +0200
+@@ -112,7 +112,7 @@ struct ehca_sport {
+ 
+ struct ehca_shca {
+ 	struct ib_device ib_device;
+-	struct of_device *ofdev;
++	struct ibmebus_dev *ibmebus_dev;
+ 	u8 num_ports;
+ 	int hw_level;
+ 	struct list_head shca_list;
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:08:21.000000000 +0200
+@@ -122,7 +122,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 	/* register interrupt handlers and initialize work queues */
+ 	if (type == EHCA_EQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
+ 					  IRQF_DISABLED, "ehca_eq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -130,7 +130,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
+ 	} else if (type == EHCA_NEQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
+ 					  IRQF_DISABLED, "ehca_neq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -170,7 +170,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
+ 	u64 h_ret;
+ 
+ 	spin_lock_irqsave(&eq->spinlock, flags);
+-	ibmebus_free_irq(eq->ist, (void *)shca);
++	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
+ 
+ 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
+ 
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:09:18.000000000 +0200
+@@ -289,8 +289,8 @@ static int ehca_sense_attributes(struct 
+ 	};
+ 
+ 	ehca_gen_dbg("Probing adapter %s...",
+-		     shca->ofdev->node->full_name);
+-	loc_code = of_get_property(shca->ofdev->node, "ibm,loc-code", NULL);
++		     shca->ibmebus_dev->ofdev.node->full_name);
++	loc_code = of_get_property(shca->ibmebus_dev->ofdev.node, "ibm,loc-code", NULL);
+ 	if (loc_code)
+ 		ehca_gen_dbg(" ... location lode=%s", loc_code);
+ 
+@@ -458,7 +458,7 @@ static int ehca_init_device(struct ehca_
+ 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
+ 	shca->ib_device.phys_port_cnt       = shca->num_ports;
+ 	shca->ib_device.num_comp_vectors    = 1;
+-	shca->ib_device.dma_device          = &shca->ofdev->dev;
++	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
+ 	shca->ib_device.query_device        = ehca_query_device;
+ 	shca->ib_device.query_port          = ehca_query_port;
+ 	shca->ib_device.query_gid           = ehca_query_gid;
+@@ -702,7 +702,7 @@ static struct attribute_group ehca_dev_a
+ 	.attrs = ehca_dev_attrs
+ };
+ 
+-static int __devinit ehca_probe(struct of_device *dev,
++static int __devinit ehca_probe(struct ibmebus_dev *dev,
+ 				const struct of_device_id *id)
+ {
+ 	struct ehca_shca *shca;
+@@ -710,16 +710,16 @@ static int __devinit ehca_probe(struct o
+ 	struct ib_pd *ibpd;
+ 	int ret, i, eq_size;
+ 
+-	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
++	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
+ 	if (!handle) {
+ 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+ 	if (!(*handle)) {
+ 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+@@ -734,9 +734,9 @@ static int __devinit ehca_probe(struct o
+ 	for (i = 0; i < ARRAY_SIZE(shca->sport); i++)
+ 		spin_lock_init(&shca->sport[i].mod_sqp_lock);
+ 
+-	shca->ofdev = dev;
++	shca->ibmebus_dev = dev;
+ 	shca->ipz_hca_handle.handle = *handle;
+-	dev->dev.driver_data = shca;
++	dev->ofdev.dev.driver_data = shca;
+ 
+ 	ret = ehca_sense_attributes(shca);
+ 	if (ret < 0) {
+@@ -813,7 +813,7 @@ static int __devinit ehca_probe(struct o
+ 		}
+ 	}
+ 
+-	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 	if (ret) /* only complain; we can live without attributes */
+ 		ehca_err(&shca->ib_device,
+ 			 "Cannot create device attributes  ret=%d", ret);
+@@ -863,12 +863,12 @@ probe1:
+ 	return -EINVAL;
+ }
+ 
+-static int __devexit ehca_remove(struct of_device *dev)
++static int __devexit ehca_remove(struct ibmebus_dev *dev)
+ {
+-	struct ehca_shca *shca = dev->dev.driver_data;
++	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
+ 	int ret;
+ 
+-	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 
+ 	if (ehca_open_aqp1 == 1) {
+ 		int i;
+@@ -919,11 +919,11 @@ static struct of_device_id ehca_device_t
+ 	{},
+ };
+ 
+-static struct of_platform_driver ehca_driver = {
+-	.name        = "ehca",
+-	.match_table = ehca_device_table,
+-	.probe       = ehca_probe,
+-	.remove      = ehca_remove,
++static struct ibmebus_driver ehca_driver = {
++	.name     = "ehca",
++	.id_table = ehca_device_table,
++	.probe    = ehca_probe,
++	.remove   = ehca_remove,
+ };
+ 
+ void ehca_poll_eqs(unsigned long data)
diff --git a/kernel_patches/backport/2.6.18-EL5.1/ehca_01_ibmebus_loc_code.patch b/kernel_patches/backport/2.6.18-EL5.1/ehca_01_ibmebus_loc_code.patch
index 40054fa..52a91fa 100644
--- a/kernel_patches/backport/2.6.18-EL5.1/ehca_01_ibmebus_loc_code.patch
+++ b/kernel_patches/backport/2.6.18-EL5.1/ehca_01_ibmebus_loc_code.patch
@@ -1,137 +1,148 @@
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 08:51:40.264936336 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 10:39:52.595875776 -0800
-@@ -107,7 +107,7 @@ struct ehca_sport {
- 
- struct ehca_shca {
- 	struct ib_device ib_device;
--	struct of_device *ofdev;
-+	struct ibmebus_dev *ibmebus_dev;
- 	u8 num_ports;
- 	int hw_level;
- 	struct list_head shca_list;
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 08:51:40.265936184 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 10:42:52.454956424 -0800
-@@ -123,7 +123,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 	/* register interrupt handlers and initialize work queues */
- 	if (type == EHCA_EQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
- 					  IRQF_DISABLED, "ehca_eq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -131,7 +131,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
- 	} else if (type == EHCA_NEQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
- 					  IRQF_DISABLED, "ehca_neq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -171,7 +171,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
- 	u64 h_ret;
- 
- 	spin_lock_irqsave(&eq->spinlock, flags);
--	ibmebus_free_irq(eq->ist, (void *)shca);
-+	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
- 
- 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
- 
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 08:51:40.267935880 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 10:58:15.135992904 -0800
-@@ -418,7 +418,7 @@ int ehca_init_device(struct ehca_shca *s
- 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
- 	shca->ib_device.phys_port_cnt       = shca->num_ports;
- 	shca->ib_device.num_comp_vectors    = 1;
--	shca->ib_device.dma_device          = &shca->ofdev->dev;
-+	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
- 	shca->ib_device.query_device        = ehca_query_device;
- 	shca->ib_device.query_port          = ehca_query_port;
- 	shca->ib_device.query_gid           = ehca_query_gid;
-@@ -672,7 +672,7 @@ static struct attribute_group ehca_dev_a
- 	.attrs = ehca_dev_attrs
- };
- 
--static int __devinit ehca_probe(struct of_device *dev,
-+static int __devinit ehca_probe(struct ibmebus_dev *dev,
- 				const struct of_device_id *id)
- {
- 	struct ehca_shca *shca;
-@@ -680,16 +680,16 @@ static int __devinit ehca_probe(struct o
- 	struct ib_pd *ibpd;
- 	int ret;
- 
--	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
-+	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
- 	if (!handle) {
- 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
- 	if (!(*handle)) {
- 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
-@@ -700,9 +700,9 @@ static int __devinit ehca_probe(struct o
- 	}
- 	mutex_init(&shca->modify_mutex);
- 
--	shca->ofdev = dev;
-+	shca->ibmebus_dev = dev;
- 	shca->ipz_hca_handle.handle = *handle;
--	dev->dev.driver_data = shca;
-+	dev->ofdev.dev.driver_data = shca;
- 
- 	ret = ehca_sense_attributes(shca);
- 	if (ret < 0) {
-@@ -778,7 +778,7 @@ static int __devinit ehca_probe(struct o
- 		}
- 	}
- 
--	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 	if (ret) /* only complain; we can live without attributes */
- 		ehca_err(&shca->ib_device,
- 			 "Cannot create device attributes  ret=%d", ret);
-@@ -828,12 +828,12 @@ probe1:
- 	return -EINVAL;
- }
- 
--static int __devexit ehca_remove(struct of_device *dev)
-+static int __devexit ehca_remove(struct ibmebus_dev *dev)
- {
--	struct ehca_shca *shca = dev->dev.driver_data;
-+	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
- 	int ret;
- 
--	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 
- 	if (ehca_open_aqp1 == 1) {
- 		int i;
-@@ -884,11 +884,11 @@ static struct of_device_id ehca_device_t
- 	{},
- };
- 
--static struct of_platform_driver ehca_driver = {
--	.name        = "ehca",
--	.match_table = ehca_device_table,
--	.probe       = ehca_probe,
--	.remove      = ehca_remove,
-+static struct ibmebus_driver ehca_driver = {
-+	.name     = "ehca",
-+	.id_table = ehca_device_table,
-+	.probe    = ehca_probe,
-+	.remove   = ehca_remove,
- };
- 
- void ehca_poll_eqs(unsigned long data)
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:08:21.000000000 +0200
+@@ -112,7 +112,7 @@ struct ehca_sport {
+ 
+ struct ehca_shca {
+ 	struct ib_device ib_device;
+-	struct of_device *ofdev;
++	struct ibmebus_dev *ibmebus_dev;
+ 	u8 num_ports;
+ 	int hw_level;
+ 	struct list_head shca_list;
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:08:21.000000000 +0200
+@@ -122,7 +122,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 	/* register interrupt handlers and initialize work queues */
+ 	if (type == EHCA_EQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
+ 					  IRQF_DISABLED, "ehca_eq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -130,7 +130,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
+ 	} else if (type == EHCA_NEQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
+ 					  IRQF_DISABLED, "ehca_neq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -170,7 +170,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
+ 	u64 h_ret;
+ 
+ 	spin_lock_irqsave(&eq->spinlock, flags);
+-	ibmebus_free_irq(eq->ist, (void *)shca);
++	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
+ 
+ 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
+ 
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:09:18.000000000 +0200
+@@ -289,8 +289,8 @@ static int ehca_sense_attributes(struct 
+ 	};
+ 
+ 	ehca_gen_dbg("Probing adapter %s...",
+-		     shca->ofdev->node->full_name);
+-	loc_code = of_get_property(shca->ofdev->node, "ibm,loc-code", NULL);
++		     shca->ibmebus_dev->ofdev.node->full_name);
++	loc_code = of_get_property(shca->ibmebus_dev->ofdev.node, "ibm,loc-code", NULL);
+ 	if (loc_code)
+ 		ehca_gen_dbg(" ... location lode=%s", loc_code);
+ 
+@@ -458,7 +458,7 @@ static int ehca_init_device(struct ehca_
+ 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
+ 	shca->ib_device.phys_port_cnt       = shca->num_ports;
+ 	shca->ib_device.num_comp_vectors    = 1;
+-	shca->ib_device.dma_device          = &shca->ofdev->dev;
++	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
+ 	shca->ib_device.query_device        = ehca_query_device;
+ 	shca->ib_device.query_port          = ehca_query_port;
+ 	shca->ib_device.query_gid           = ehca_query_gid;
+@@ -702,7 +702,7 @@ static struct attribute_group ehca_dev_a
+ 	.attrs = ehca_dev_attrs
+ };
+ 
+-static int __devinit ehca_probe(struct of_device *dev,
++static int __devinit ehca_probe(struct ibmebus_dev *dev,
+ 				const struct of_device_id *id)
+ {
+ 	struct ehca_shca *shca;
+@@ -710,16 +710,16 @@ static int __devinit ehca_probe(struct o
+ 	struct ib_pd *ibpd;
+ 	int ret, i, eq_size;
+ 
+-	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
++	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
+ 	if (!handle) {
+ 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+ 	if (!(*handle)) {
+ 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+@@ -734,9 +734,9 @@ static int __devinit ehca_probe(struct o
+ 	for (i = 0; i < ARRAY_SIZE(shca->sport); i++)
+ 		spin_lock_init(&shca->sport[i].mod_sqp_lock);
+ 
+-	shca->ofdev = dev;
++	shca->ibmebus_dev = dev;
+ 	shca->ipz_hca_handle.handle = *handle;
+-	dev->dev.driver_data = shca;
++	dev->ofdev.dev.driver_data = shca;
+ 
+ 	ret = ehca_sense_attributes(shca);
+ 	if (ret < 0) {
+@@ -813,7 +813,7 @@ static int __devinit ehca_probe(struct o
+ 		}
+ 	}
+ 
+-	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 	if (ret) /* only complain; we can live without attributes */
+ 		ehca_err(&shca->ib_device,
+ 			 "Cannot create device attributes  ret=%d", ret);
+@@ -863,12 +863,12 @@ probe1:
+ 	return -EINVAL;
+ }
+ 
+-static int __devexit ehca_remove(struct of_device *dev)
++static int __devexit ehca_remove(struct ibmebus_dev *dev)
+ {
+-	struct ehca_shca *shca = dev->dev.driver_data;
++	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
+ 	int ret;
+ 
+-	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 
+ 	if (ehca_open_aqp1 == 1) {
+ 		int i;
+@@ -919,11 +919,11 @@ static struct of_device_id ehca_device_t
+ 	{},
+ };
+ 
+-static struct of_platform_driver ehca_driver = {
+-	.name        = "ehca",
+-	.match_table = ehca_device_table,
+-	.probe       = ehca_probe,
+-	.remove      = ehca_remove,
++static struct ibmebus_driver ehca_driver = {
++	.name     = "ehca",
++	.id_table = ehca_device_table,
++	.probe    = ehca_probe,
++	.remove   = ehca_remove,
+ };
+ 
+ void ehca_poll_eqs(unsigned long data)
diff --git a/kernel_patches/backport/2.6.18/ehca_01_ibmebus_loc_code.patch b/kernel_patches/backport/2.6.18/ehca_01_ibmebus_loc_code.patch
index 40054fa..52a91fa 100644
--- a/kernel_patches/backport/2.6.18/ehca_01_ibmebus_loc_code.patch
+++ b/kernel_patches/backport/2.6.18/ehca_01_ibmebus_loc_code.patch
@@ -1,137 +1,148 @@
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 08:51:40.264936336 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 10:39:52.595875776 -0800
-@@ -107,7 +107,7 @@ struct ehca_sport {
- 
- struct ehca_shca {
- 	struct ib_device ib_device;
--	struct of_device *ofdev;
-+	struct ibmebus_dev *ibmebus_dev;
- 	u8 num_ports;
- 	int hw_level;
- 	struct list_head shca_list;
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 08:51:40.265936184 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 10:42:52.454956424 -0800
-@@ -123,7 +123,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 	/* register interrupt handlers and initialize work queues */
- 	if (type == EHCA_EQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
- 					  IRQF_DISABLED, "ehca_eq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -131,7 +131,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
- 	} else if (type == EHCA_NEQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
- 					  IRQF_DISABLED, "ehca_neq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -171,7 +171,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
- 	u64 h_ret;
- 
- 	spin_lock_irqsave(&eq->spinlock, flags);
--	ibmebus_free_irq(eq->ist, (void *)shca);
-+	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
- 
- 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
- 
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 08:51:40.267935880 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 10:58:15.135992904 -0800
-@@ -418,7 +418,7 @@ int ehca_init_device(struct ehca_shca *s
- 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
- 	shca->ib_device.phys_port_cnt       = shca->num_ports;
- 	shca->ib_device.num_comp_vectors    = 1;
--	shca->ib_device.dma_device          = &shca->ofdev->dev;
-+	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
- 	shca->ib_device.query_device        = ehca_query_device;
- 	shca->ib_device.query_port          = ehca_query_port;
- 	shca->ib_device.query_gid           = ehca_query_gid;
-@@ -672,7 +672,7 @@ static struct attribute_group ehca_dev_a
- 	.attrs = ehca_dev_attrs
- };
- 
--static int __devinit ehca_probe(struct of_device *dev,
-+static int __devinit ehca_probe(struct ibmebus_dev *dev,
- 				const struct of_device_id *id)
- {
- 	struct ehca_shca *shca;
-@@ -680,16 +680,16 @@ static int __devinit ehca_probe(struct o
- 	struct ib_pd *ibpd;
- 	int ret;
- 
--	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
-+	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
- 	if (!handle) {
- 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
- 	if (!(*handle)) {
- 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
-@@ -700,9 +700,9 @@ static int __devinit ehca_probe(struct o
- 	}
- 	mutex_init(&shca->modify_mutex);
- 
--	shca->ofdev = dev;
-+	shca->ibmebus_dev = dev;
- 	shca->ipz_hca_handle.handle = *handle;
--	dev->dev.driver_data = shca;
-+	dev->ofdev.dev.driver_data = shca;
- 
- 	ret = ehca_sense_attributes(shca);
- 	if (ret < 0) {
-@@ -778,7 +778,7 @@ static int __devinit ehca_probe(struct o
- 		}
- 	}
- 
--	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 	if (ret) /* only complain; we can live without attributes */
- 		ehca_err(&shca->ib_device,
- 			 "Cannot create device attributes  ret=%d", ret);
-@@ -828,12 +828,12 @@ probe1:
- 	return -EINVAL;
- }
- 
--static int __devexit ehca_remove(struct of_device *dev)
-+static int __devexit ehca_remove(struct ibmebus_dev *dev)
- {
--	struct ehca_shca *shca = dev->dev.driver_data;
-+	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
- 	int ret;
- 
--	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 
- 	if (ehca_open_aqp1 == 1) {
- 		int i;
-@@ -884,11 +884,11 @@ static struct of_device_id ehca_device_t
- 	{},
- };
- 
--static struct of_platform_driver ehca_driver = {
--	.name        = "ehca",
--	.match_table = ehca_device_table,
--	.probe       = ehca_probe,
--	.remove      = ehca_remove,
-+static struct ibmebus_driver ehca_driver = {
-+	.name     = "ehca",
-+	.id_table = ehca_device_table,
-+	.probe    = ehca_probe,
-+	.remove   = ehca_remove,
- };
- 
- void ehca_poll_eqs(unsigned long data)
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:08:21.000000000 +0200
+@@ -112,7 +112,7 @@ struct ehca_sport {
+ 
+ struct ehca_shca {
+ 	struct ib_device ib_device;
+-	struct of_device *ofdev;
++	struct ibmebus_dev *ibmebus_dev;
+ 	u8 num_ports;
+ 	int hw_level;
+ 	struct list_head shca_list;
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:08:21.000000000 +0200
+@@ -122,7 +122,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 	/* register interrupt handlers and initialize work queues */
+ 	if (type == EHCA_EQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
+ 					  IRQF_DISABLED, "ehca_eq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -130,7 +130,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
+ 	} else if (type == EHCA_NEQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
+ 					  IRQF_DISABLED, "ehca_neq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -170,7 +170,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
+ 	u64 h_ret;
+ 
+ 	spin_lock_irqsave(&eq->spinlock, flags);
+-	ibmebus_free_irq(eq->ist, (void *)shca);
++	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
+ 
+ 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
+ 
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:09:18.000000000 +0200
+@@ -289,8 +289,8 @@ static int ehca_sense_attributes(struct 
+ 	};
+ 
+ 	ehca_gen_dbg("Probing adapter %s...",
+-		     shca->ofdev->node->full_name);
+-	loc_code = of_get_property(shca->ofdev->node, "ibm,loc-code", NULL);
++		     shca->ibmebus_dev->ofdev.node->full_name);
++	loc_code = of_get_property(shca->ibmebus_dev->ofdev.node, "ibm,loc-code", NULL);
+ 	if (loc_code)
+ 		ehca_gen_dbg(" ... location lode=%s", loc_code);
+ 
+@@ -458,7 +458,7 @@ static int ehca_init_device(struct ehca_
+ 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
+ 	shca->ib_device.phys_port_cnt       = shca->num_ports;
+ 	shca->ib_device.num_comp_vectors    = 1;
+-	shca->ib_device.dma_device          = &shca->ofdev->dev;
++	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
+ 	shca->ib_device.query_device        = ehca_query_device;
+ 	shca->ib_device.query_port          = ehca_query_port;
+ 	shca->ib_device.query_gid           = ehca_query_gid;
+@@ -702,7 +702,7 @@ static struct attribute_group ehca_dev_a
+ 	.attrs = ehca_dev_attrs
+ };
+ 
+-static int __devinit ehca_probe(struct of_device *dev,
++static int __devinit ehca_probe(struct ibmebus_dev *dev,
+ 				const struct of_device_id *id)
+ {
+ 	struct ehca_shca *shca;
+@@ -710,16 +710,16 @@ static int __devinit ehca_probe(struct o
+ 	struct ib_pd *ibpd;
+ 	int ret, i, eq_size;
+ 
+-	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
++	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
+ 	if (!handle) {
+ 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+ 	if (!(*handle)) {
+ 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+@@ -734,9 +734,9 @@ static int __devinit ehca_probe(struct o
+ 	for (i = 0; i < ARRAY_SIZE(shca->sport); i++)
+ 		spin_lock_init(&shca->sport[i].mod_sqp_lock);
+ 
+-	shca->ofdev = dev;
++	shca->ibmebus_dev = dev;
+ 	shca->ipz_hca_handle.handle = *handle;
+-	dev->dev.driver_data = shca;
++	dev->ofdev.dev.driver_data = shca;
+ 
+ 	ret = ehca_sense_attributes(shca);
+ 	if (ret < 0) {
+@@ -813,7 +813,7 @@ static int __devinit ehca_probe(struct o
+ 		}
+ 	}
+ 
+-	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 	if (ret) /* only complain; we can live without attributes */
+ 		ehca_err(&shca->ib_device,
+ 			 "Cannot create device attributes  ret=%d", ret);
+@@ -863,12 +863,12 @@ probe1:
+ 	return -EINVAL;
+ }
+ 
+-static int __devexit ehca_remove(struct of_device *dev)
++static int __devexit ehca_remove(struct ibmebus_dev *dev)
+ {
+-	struct ehca_shca *shca = dev->dev.driver_data;
++	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
+ 	int ret;
+ 
+-	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 
+ 	if (ehca_open_aqp1 == 1) {
+ 		int i;
+@@ -919,11 +919,11 @@ static struct of_device_id ehca_device_t
+ 	{},
+ };
+ 
+-static struct of_platform_driver ehca_driver = {
+-	.name        = "ehca",
+-	.match_table = ehca_device_table,
+-	.probe       = ehca_probe,
+-	.remove      = ehca_remove,
++static struct ibmebus_driver ehca_driver = {
++	.name     = "ehca",
++	.id_table = ehca_device_table,
++	.probe    = ehca_probe,
++	.remove   = ehca_remove,
+ };
+ 
+ void ehca_poll_eqs(unsigned long data)
diff --git a/kernel_patches/backport/2.6.18_FC6/ehca_01_ibmebus_loc_code.patch b/kernel_patches/backport/2.6.18_FC6/ehca_01_ibmebus_loc_code.patch
index 40054fa..52a91fa 100644
--- a/kernel_patches/backport/2.6.18_FC6/ehca_01_ibmebus_loc_code.patch
+++ b/kernel_patches/backport/2.6.18_FC6/ehca_01_ibmebus_loc_code.patch
@@ -1,137 +1,148 @@
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 08:51:40.264936336 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 10:39:52.595875776 -0800
-@@ -107,7 +107,7 @@ struct ehca_sport {
- 
- struct ehca_shca {
- 	struct ib_device ib_device;
--	struct of_device *ofdev;
-+	struct ibmebus_dev *ibmebus_dev;
- 	u8 num_ports;
- 	int hw_level;
- 	struct list_head shca_list;
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 08:51:40.265936184 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 10:42:52.454956424 -0800
-@@ -123,7 +123,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 	/* register interrupt handlers and initialize work queues */
- 	if (type == EHCA_EQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
- 					  IRQF_DISABLED, "ehca_eq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -131,7 +131,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
- 	} else if (type == EHCA_NEQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
- 					  IRQF_DISABLED, "ehca_neq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -171,7 +171,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
- 	u64 h_ret;
- 
- 	spin_lock_irqsave(&eq->spinlock, flags);
--	ibmebus_free_irq(eq->ist, (void *)shca);
-+	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
- 
- 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
- 
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 08:51:40.267935880 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 10:58:15.135992904 -0800
-@@ -418,7 +418,7 @@ int ehca_init_device(struct ehca_shca *s
- 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
- 	shca->ib_device.phys_port_cnt       = shca->num_ports;
- 	shca->ib_device.num_comp_vectors    = 1;
--	shca->ib_device.dma_device          = &shca->ofdev->dev;
-+	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
- 	shca->ib_device.query_device        = ehca_query_device;
- 	shca->ib_device.query_port          = ehca_query_port;
- 	shca->ib_device.query_gid           = ehca_query_gid;
-@@ -672,7 +672,7 @@ static struct attribute_group ehca_dev_a
- 	.attrs = ehca_dev_attrs
- };
- 
--static int __devinit ehca_probe(struct of_device *dev,
-+static int __devinit ehca_probe(struct ibmebus_dev *dev,
- 				const struct of_device_id *id)
- {
- 	struct ehca_shca *shca;
-@@ -680,16 +680,16 @@ static int __devinit ehca_probe(struct o
- 	struct ib_pd *ibpd;
- 	int ret;
- 
--	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
-+	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
- 	if (!handle) {
- 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
- 	if (!(*handle)) {
- 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
-@@ -700,9 +700,9 @@ static int __devinit ehca_probe(struct o
- 	}
- 	mutex_init(&shca->modify_mutex);
- 
--	shca->ofdev = dev;
-+	shca->ibmebus_dev = dev;
- 	shca->ipz_hca_handle.handle = *handle;
--	dev->dev.driver_data = shca;
-+	dev->ofdev.dev.driver_data = shca;
- 
- 	ret = ehca_sense_attributes(shca);
- 	if (ret < 0) {
-@@ -778,7 +778,7 @@ static int __devinit ehca_probe(struct o
- 		}
- 	}
- 
--	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 	if (ret) /* only complain; we can live without attributes */
- 		ehca_err(&shca->ib_device,
- 			 "Cannot create device attributes  ret=%d", ret);
-@@ -828,12 +828,12 @@ probe1:
- 	return -EINVAL;
- }
- 
--static int __devexit ehca_remove(struct of_device *dev)
-+static int __devexit ehca_remove(struct ibmebus_dev *dev)
- {
--	struct ehca_shca *shca = dev->dev.driver_data;
-+	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
- 	int ret;
- 
--	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 
- 	if (ehca_open_aqp1 == 1) {
- 		int i;
-@@ -884,11 +884,11 @@ static struct of_device_id ehca_device_t
- 	{},
- };
- 
--static struct of_platform_driver ehca_driver = {
--	.name        = "ehca",
--	.match_table = ehca_device_table,
--	.probe       = ehca_probe,
--	.remove      = ehca_remove,
-+static struct ibmebus_driver ehca_driver = {
-+	.name     = "ehca",
-+	.id_table = ehca_device_table,
-+	.probe    = ehca_probe,
-+	.remove   = ehca_remove,
- };
- 
- void ehca_poll_eqs(unsigned long data)
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:08:21.000000000 +0200
+@@ -112,7 +112,7 @@ struct ehca_sport {
+ 
+ struct ehca_shca {
+ 	struct ib_device ib_device;
+-	struct of_device *ofdev;
++	struct ibmebus_dev *ibmebus_dev;
+ 	u8 num_ports;
+ 	int hw_level;
+ 	struct list_head shca_list;
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:08:21.000000000 +0200
+@@ -122,7 +122,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 	/* register interrupt handlers and initialize work queues */
+ 	if (type == EHCA_EQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
+ 					  IRQF_DISABLED, "ehca_eq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -130,7 +130,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
+ 	} else if (type == EHCA_NEQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
+ 					  IRQF_DISABLED, "ehca_neq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -170,7 +170,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
+ 	u64 h_ret;
+ 
+ 	spin_lock_irqsave(&eq->spinlock, flags);
+-	ibmebus_free_irq(eq->ist, (void *)shca);
++	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
+ 
+ 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
+ 
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:09:18.000000000 +0200
+@@ -289,8 +289,8 @@ static int ehca_sense_attributes(struct 
+ 	};
+ 
+ 	ehca_gen_dbg("Probing adapter %s...",
+-		     shca->ofdev->node->full_name);
+-	loc_code = of_get_property(shca->ofdev->node, "ibm,loc-code", NULL);
++		     shca->ibmebus_dev->ofdev.node->full_name);
++	loc_code = of_get_property(shca->ibmebus_dev->ofdev.node, "ibm,loc-code", NULL);
+ 	if (loc_code)
+ 		ehca_gen_dbg(" ... location lode=%s", loc_code);
+ 
+@@ -458,7 +458,7 @@ static int ehca_init_device(struct ehca_
+ 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
+ 	shca->ib_device.phys_port_cnt       = shca->num_ports;
+ 	shca->ib_device.num_comp_vectors    = 1;
+-	shca->ib_device.dma_device          = &shca->ofdev->dev;
++	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
+ 	shca->ib_device.query_device        = ehca_query_device;
+ 	shca->ib_device.query_port          = ehca_query_port;
+ 	shca->ib_device.query_gid           = ehca_query_gid;
+@@ -702,7 +702,7 @@ static struct attribute_group ehca_dev_a
+ 	.attrs = ehca_dev_attrs
+ };
+ 
+-static int __devinit ehca_probe(struct of_device *dev,
++static int __devinit ehca_probe(struct ibmebus_dev *dev,
+ 				const struct of_device_id *id)
+ {
+ 	struct ehca_shca *shca;
+@@ -710,16 +710,16 @@ static int __devinit ehca_probe(struct o
+ 	struct ib_pd *ibpd;
+ 	int ret, i, eq_size;
+ 
+-	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
++	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
+ 	if (!handle) {
+ 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+ 	if (!(*handle)) {
+ 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+@@ -734,9 +734,9 @@ static int __devinit ehca_probe(struct o
+ 	for (i = 0; i < ARRAY_SIZE(shca->sport); i++)
+ 		spin_lock_init(&shca->sport[i].mod_sqp_lock);
+ 
+-	shca->ofdev = dev;
++	shca->ibmebus_dev = dev;
+ 	shca->ipz_hca_handle.handle = *handle;
+-	dev->dev.driver_data = shca;
++	dev->ofdev.dev.driver_data = shca;
+ 
+ 	ret = ehca_sense_attributes(shca);
+ 	if (ret < 0) {
+@@ -813,7 +813,7 @@ static int __devinit ehca_probe(struct o
+ 		}
+ 	}
+ 
+-	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 	if (ret) /* only complain; we can live without attributes */
+ 		ehca_err(&shca->ib_device,
+ 			 "Cannot create device attributes  ret=%d", ret);
+@@ -863,12 +863,12 @@ probe1:
+ 	return -EINVAL;
+ }
+ 
+-static int __devexit ehca_remove(struct of_device *dev)
++static int __devexit ehca_remove(struct ibmebus_dev *dev)
+ {
+-	struct ehca_shca *shca = dev->dev.driver_data;
++	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
+ 	int ret;
+ 
+-	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 
+ 	if (ehca_open_aqp1 == 1) {
+ 		int i;
+@@ -919,11 +919,11 @@ static struct of_device_id ehca_device_t
+ 	{},
+ };
+ 
+-static struct of_platform_driver ehca_driver = {
+-	.name        = "ehca",
+-	.match_table = ehca_device_table,
+-	.probe       = ehca_probe,
+-	.remove      = ehca_remove,
++static struct ibmebus_driver ehca_driver = {
++	.name     = "ehca",
++	.id_table = ehca_device_table,
++	.probe    = ehca_probe,
++	.remove   = ehca_remove,
+ };
+ 
+ void ehca_poll_eqs(unsigned long data)
diff --git a/kernel_patches/backport/2.6.19/ehca_01_ibmebus_loc_code.patch b/kernel_patches/backport/2.6.19/ehca_01_ibmebus_loc_code.patch
index 40054fa..52a91fa 100644
--- a/kernel_patches/backport/2.6.19/ehca_01_ibmebus_loc_code.patch
+++ b/kernel_patches/backport/2.6.19/ehca_01_ibmebus_loc_code.patch
@@ -1,137 +1,148 @@
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 08:51:40.264936336 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 10:39:52.595875776 -0800
-@@ -107,7 +107,7 @@ struct ehca_sport {
- 
- struct ehca_shca {
- 	struct ib_device ib_device;
--	struct of_device *ofdev;
-+	struct ibmebus_dev *ibmebus_dev;
- 	u8 num_ports;
- 	int hw_level;
- 	struct list_head shca_list;
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 08:51:40.265936184 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 10:42:52.454956424 -0800
-@@ -123,7 +123,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 	/* register interrupt handlers and initialize work queues */
- 	if (type == EHCA_EQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
- 					  IRQF_DISABLED, "ehca_eq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -131,7 +131,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
- 	} else if (type == EHCA_NEQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
- 					  IRQF_DISABLED, "ehca_neq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -171,7 +171,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
- 	u64 h_ret;
- 
- 	spin_lock_irqsave(&eq->spinlock, flags);
--	ibmebus_free_irq(eq->ist, (void *)shca);
-+	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
- 
- 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
- 
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 08:51:40.267935880 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 10:58:15.135992904 -0800
-@@ -418,7 +418,7 @@ int ehca_init_device(struct ehca_shca *s
- 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
- 	shca->ib_device.phys_port_cnt       = shca->num_ports;
- 	shca->ib_device.num_comp_vectors    = 1;
--	shca->ib_device.dma_device          = &shca->ofdev->dev;
-+	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
- 	shca->ib_device.query_device        = ehca_query_device;
- 	shca->ib_device.query_port          = ehca_query_port;
- 	shca->ib_device.query_gid           = ehca_query_gid;
-@@ -672,7 +672,7 @@ static struct attribute_group ehca_dev_a
- 	.attrs = ehca_dev_attrs
- };
- 
--static int __devinit ehca_probe(struct of_device *dev,
-+static int __devinit ehca_probe(struct ibmebus_dev *dev,
- 				const struct of_device_id *id)
- {
- 	struct ehca_shca *shca;
-@@ -680,16 +680,16 @@ static int __devinit ehca_probe(struct o
- 	struct ib_pd *ibpd;
- 	int ret;
- 
--	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
-+	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
- 	if (!handle) {
- 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
- 	if (!(*handle)) {
- 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
-@@ -700,9 +700,9 @@ static int __devinit ehca_probe(struct o
- 	}
- 	mutex_init(&shca->modify_mutex);
- 
--	shca->ofdev = dev;
-+	shca->ibmebus_dev = dev;
- 	shca->ipz_hca_handle.handle = *handle;
--	dev->dev.driver_data = shca;
-+	dev->ofdev.dev.driver_data = shca;
- 
- 	ret = ehca_sense_attributes(shca);
- 	if (ret < 0) {
-@@ -778,7 +778,7 @@ static int __devinit ehca_probe(struct o
- 		}
- 	}
- 
--	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 	if (ret) /* only complain; we can live without attributes */
- 		ehca_err(&shca->ib_device,
- 			 "Cannot create device attributes  ret=%d", ret);
-@@ -828,12 +828,12 @@ probe1:
- 	return -EINVAL;
- }
- 
--static int __devexit ehca_remove(struct of_device *dev)
-+static int __devexit ehca_remove(struct ibmebus_dev *dev)
- {
--	struct ehca_shca *shca = dev->dev.driver_data;
-+	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
- 	int ret;
- 
--	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 
- 	if (ehca_open_aqp1 == 1) {
- 		int i;
-@@ -884,11 +884,11 @@ static struct of_device_id ehca_device_t
- 	{},
- };
- 
--static struct of_platform_driver ehca_driver = {
--	.name        = "ehca",
--	.match_table = ehca_device_table,
--	.probe       = ehca_probe,
--	.remove      = ehca_remove,
-+static struct ibmebus_driver ehca_driver = {
-+	.name     = "ehca",
-+	.id_table = ehca_device_table,
-+	.probe    = ehca_probe,
-+	.remove   = ehca_remove,
- };
- 
- void ehca_poll_eqs(unsigned long data)
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:08:21.000000000 +0200
+@@ -112,7 +112,7 @@ struct ehca_sport {
+ 
+ struct ehca_shca {
+ 	struct ib_device ib_device;
+-	struct of_device *ofdev;
++	struct ibmebus_dev *ibmebus_dev;
+ 	u8 num_ports;
+ 	int hw_level;
+ 	struct list_head shca_list;
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:08:21.000000000 +0200
+@@ -122,7 +122,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 	/* register interrupt handlers and initialize work queues */
+ 	if (type == EHCA_EQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
+ 					  IRQF_DISABLED, "ehca_eq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -130,7 +130,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
+ 	} else if (type == EHCA_NEQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
+ 					  IRQF_DISABLED, "ehca_neq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -170,7 +170,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
+ 	u64 h_ret;
+ 
+ 	spin_lock_irqsave(&eq->spinlock, flags);
+-	ibmebus_free_irq(eq->ist, (void *)shca);
++	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
+ 
+ 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
+ 
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:09:18.000000000 +0200
+@@ -289,8 +289,8 @@ static int ehca_sense_attributes(struct 
+ 	};
+ 
+ 	ehca_gen_dbg("Probing adapter %s...",
+-		     shca->ofdev->node->full_name);
+-	loc_code = of_get_property(shca->ofdev->node, "ibm,loc-code", NULL);
++		     shca->ibmebus_dev->ofdev.node->full_name);
++	loc_code = of_get_property(shca->ibmebus_dev->ofdev.node, "ibm,loc-code", NULL);
+ 	if (loc_code)
+ 		ehca_gen_dbg(" ... location lode=%s", loc_code);
+ 
+@@ -458,7 +458,7 @@ static int ehca_init_device(struct ehca_
+ 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
+ 	shca->ib_device.phys_port_cnt       = shca->num_ports;
+ 	shca->ib_device.num_comp_vectors    = 1;
+-	shca->ib_device.dma_device          = &shca->ofdev->dev;
++	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
+ 	shca->ib_device.query_device        = ehca_query_device;
+ 	shca->ib_device.query_port          = ehca_query_port;
+ 	shca->ib_device.query_gid           = ehca_query_gid;
+@@ -702,7 +702,7 @@ static struct attribute_group ehca_dev_a
+ 	.attrs = ehca_dev_attrs
+ };
+ 
+-static int __devinit ehca_probe(struct of_device *dev,
++static int __devinit ehca_probe(struct ibmebus_dev *dev,
+ 				const struct of_device_id *id)
+ {
+ 	struct ehca_shca *shca;
+@@ -710,16 +710,16 @@ static int __devinit ehca_probe(struct o
+ 	struct ib_pd *ibpd;
+ 	int ret, i, eq_size;
+ 
+-	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
++	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
+ 	if (!handle) {
+ 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+ 	if (!(*handle)) {
+ 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+@@ -734,9 +734,9 @@ static int __devinit ehca_probe(struct o
+ 	for (i = 0; i < ARRAY_SIZE(shca->sport); i++)
+ 		spin_lock_init(&shca->sport[i].mod_sqp_lock);
+ 
+-	shca->ofdev = dev;
++	shca->ibmebus_dev = dev;
+ 	shca->ipz_hca_handle.handle = *handle;
+-	dev->dev.driver_data = shca;
++	dev->ofdev.dev.driver_data = shca;
+ 
+ 	ret = ehca_sense_attributes(shca);
+ 	if (ret < 0) {
+@@ -813,7 +813,7 @@ static int __devinit ehca_probe(struct o
+ 		}
+ 	}
+ 
+-	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 	if (ret) /* only complain; we can live without attributes */
+ 		ehca_err(&shca->ib_device,
+ 			 "Cannot create device attributes  ret=%d", ret);
+@@ -863,12 +863,12 @@ probe1:
+ 	return -EINVAL;
+ }
+ 
+-static int __devexit ehca_remove(struct of_device *dev)
++static int __devexit ehca_remove(struct ibmebus_dev *dev)
+ {
+-	struct ehca_shca *shca = dev->dev.driver_data;
++	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
+ 	int ret;
+ 
+-	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 
+ 	if (ehca_open_aqp1 == 1) {
+ 		int i;
+@@ -919,11 +919,11 @@ static struct of_device_id ehca_device_t
+ 	{},
+ };
+ 
+-static struct of_platform_driver ehca_driver = {
+-	.name        = "ehca",
+-	.match_table = ehca_device_table,
+-	.probe       = ehca_probe,
+-	.remove      = ehca_remove,
++static struct ibmebus_driver ehca_driver = {
++	.name     = "ehca",
++	.id_table = ehca_device_table,
++	.probe    = ehca_probe,
++	.remove   = ehca_remove,
+ };
+ 
+ void ehca_poll_eqs(unsigned long data)
diff --git a/kernel_patches/backport/2.6.20/ehca_01_ibmebus_loc_code.patch b/kernel_patches/backport/2.6.20/ehca_01_ibmebus_loc_code.patch
index 40054fa..52a91fa 100644
--- a/kernel_patches/backport/2.6.20/ehca_01_ibmebus_loc_code.patch
+++ b/kernel_patches/backport/2.6.20/ehca_01_ibmebus_loc_code.patch
@@ -1,137 +1,148 @@
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 08:51:40.264936336 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 10:39:52.595875776 -0800
-@@ -107,7 +107,7 @@ struct ehca_sport {
- 
- struct ehca_shca {
- 	struct ib_device ib_device;
--	struct of_device *ofdev;
-+	struct ibmebus_dev *ibmebus_dev;
- 	u8 num_ports;
- 	int hw_level;
- 	struct list_head shca_list;
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 08:51:40.265936184 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 10:42:52.454956424 -0800
-@@ -123,7 +123,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 	/* register interrupt handlers and initialize work queues */
- 	if (type == EHCA_EQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
- 					  IRQF_DISABLED, "ehca_eq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -131,7 +131,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
- 	} else if (type == EHCA_NEQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
- 					  IRQF_DISABLED, "ehca_neq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -171,7 +171,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
- 	u64 h_ret;
- 
- 	spin_lock_irqsave(&eq->spinlock, flags);
--	ibmebus_free_irq(eq->ist, (void *)shca);
-+	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
- 
- 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
- 
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 08:51:40.267935880 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 10:58:15.135992904 -0800
-@@ -418,7 +418,7 @@ int ehca_init_device(struct ehca_shca *s
- 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
- 	shca->ib_device.phys_port_cnt       = shca->num_ports;
- 	shca->ib_device.num_comp_vectors    = 1;
--	shca->ib_device.dma_device          = &shca->ofdev->dev;
-+	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
- 	shca->ib_device.query_device        = ehca_query_device;
- 	shca->ib_device.query_port          = ehca_query_port;
- 	shca->ib_device.query_gid           = ehca_query_gid;
-@@ -672,7 +672,7 @@ static struct attribute_group ehca_dev_a
- 	.attrs = ehca_dev_attrs
- };
- 
--static int __devinit ehca_probe(struct of_device *dev,
-+static int __devinit ehca_probe(struct ibmebus_dev *dev,
- 				const struct of_device_id *id)
- {
- 	struct ehca_shca *shca;
-@@ -680,16 +680,16 @@ static int __devinit ehca_probe(struct o
- 	struct ib_pd *ibpd;
- 	int ret;
- 
--	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
-+	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
- 	if (!handle) {
- 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
- 	if (!(*handle)) {
- 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
-@@ -700,9 +700,9 @@ static int __devinit ehca_probe(struct o
- 	}
- 	mutex_init(&shca->modify_mutex);
- 
--	shca->ofdev = dev;
-+	shca->ibmebus_dev = dev;
- 	shca->ipz_hca_handle.handle = *handle;
--	dev->dev.driver_data = shca;
-+	dev->ofdev.dev.driver_data = shca;
- 
- 	ret = ehca_sense_attributes(shca);
- 	if (ret < 0) {
-@@ -778,7 +778,7 @@ static int __devinit ehca_probe(struct o
- 		}
- 	}
- 
--	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 	if (ret) /* only complain; we can live without attributes */
- 		ehca_err(&shca->ib_device,
- 			 "Cannot create device attributes  ret=%d", ret);
-@@ -828,12 +828,12 @@ probe1:
- 	return -EINVAL;
- }
- 
--static int __devexit ehca_remove(struct of_device *dev)
-+static int __devexit ehca_remove(struct ibmebus_dev *dev)
- {
--	struct ehca_shca *shca = dev->dev.driver_data;
-+	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
- 	int ret;
- 
--	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 
- 	if (ehca_open_aqp1 == 1) {
- 		int i;
-@@ -884,11 +884,11 @@ static struct of_device_id ehca_device_t
- 	{},
- };
- 
--static struct of_platform_driver ehca_driver = {
--	.name        = "ehca",
--	.match_table = ehca_device_table,
--	.probe       = ehca_probe,
--	.remove      = ehca_remove,
-+static struct ibmebus_driver ehca_driver = {
-+	.name     = "ehca",
-+	.id_table = ehca_device_table,
-+	.probe    = ehca_probe,
-+	.remove   = ehca_remove,
- };
- 
- void ehca_poll_eqs(unsigned long data)
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:08:21.000000000 +0200
+@@ -112,7 +112,7 @@ struct ehca_sport {
+ 
+ struct ehca_shca {
+ 	struct ib_device ib_device;
+-	struct of_device *ofdev;
++	struct ibmebus_dev *ibmebus_dev;
+ 	u8 num_ports;
+ 	int hw_level;
+ 	struct list_head shca_list;
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:08:21.000000000 +0200
+@@ -122,7 +122,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 	/* register interrupt handlers and initialize work queues */
+ 	if (type == EHCA_EQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
+ 					  IRQF_DISABLED, "ehca_eq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -130,7 +130,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
+ 	} else if (type == EHCA_NEQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
+ 					  IRQF_DISABLED, "ehca_neq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -170,7 +170,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
+ 	u64 h_ret;
+ 
+ 	spin_lock_irqsave(&eq->spinlock, flags);
+-	ibmebus_free_irq(eq->ist, (void *)shca);
++	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
+ 
+ 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
+ 
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:09:18.000000000 +0200
+@@ -289,8 +289,8 @@ static int ehca_sense_attributes(struct 
+ 	};
+ 
+ 	ehca_gen_dbg("Probing adapter %s...",
+-		     shca->ofdev->node->full_name);
+-	loc_code = of_get_property(shca->ofdev->node, "ibm,loc-code", NULL);
++		     shca->ibmebus_dev->ofdev.node->full_name);
++	loc_code = of_get_property(shca->ibmebus_dev->ofdev.node, "ibm,loc-code", NULL);
+ 	if (loc_code)
+ 		ehca_gen_dbg(" ... location lode=%s", loc_code);
+ 
+@@ -458,7 +458,7 @@ static int ehca_init_device(struct ehca_
+ 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
+ 	shca->ib_device.phys_port_cnt       = shca->num_ports;
+ 	shca->ib_device.num_comp_vectors    = 1;
+-	shca->ib_device.dma_device          = &shca->ofdev->dev;
++	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
+ 	shca->ib_device.query_device        = ehca_query_device;
+ 	shca->ib_device.query_port          = ehca_query_port;
+ 	shca->ib_device.query_gid           = ehca_query_gid;
+@@ -702,7 +702,7 @@ static struct attribute_group ehca_dev_a
+ 	.attrs = ehca_dev_attrs
+ };
+ 
+-static int __devinit ehca_probe(struct of_device *dev,
++static int __devinit ehca_probe(struct ibmebus_dev *dev,
+ 				const struct of_device_id *id)
+ {
+ 	struct ehca_shca *shca;
+@@ -710,16 +710,16 @@ static int __devinit ehca_probe(struct o
+ 	struct ib_pd *ibpd;
+ 	int ret, i, eq_size;
+ 
+-	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
++	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
+ 	if (!handle) {
+ 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+ 	if (!(*handle)) {
+ 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+@@ -734,9 +734,9 @@ static int __devinit ehca_probe(struct o
+ 	for (i = 0; i < ARRAY_SIZE(shca->sport); i++)
+ 		spin_lock_init(&shca->sport[i].mod_sqp_lock);
+ 
+-	shca->ofdev = dev;
++	shca->ibmebus_dev = dev;
+ 	shca->ipz_hca_handle.handle = *handle;
+-	dev->dev.driver_data = shca;
++	dev->ofdev.dev.driver_data = shca;
+ 
+ 	ret = ehca_sense_attributes(shca);
+ 	if (ret < 0) {
+@@ -813,7 +813,7 @@ static int __devinit ehca_probe(struct o
+ 		}
+ 	}
+ 
+-	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 	if (ret) /* only complain; we can live without attributes */
+ 		ehca_err(&shca->ib_device,
+ 			 "Cannot create device attributes  ret=%d", ret);
+@@ -863,12 +863,12 @@ probe1:
+ 	return -EINVAL;
+ }
+ 
+-static int __devexit ehca_remove(struct of_device *dev)
++static int __devexit ehca_remove(struct ibmebus_dev *dev)
+ {
+-	struct ehca_shca *shca = dev->dev.driver_data;
++	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
+ 	int ret;
+ 
+-	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 
+ 	if (ehca_open_aqp1 == 1) {
+ 		int i;
+@@ -919,11 +919,11 @@ static struct of_device_id ehca_device_t
+ 	{},
+ };
+ 
+-static struct of_platform_driver ehca_driver = {
+-	.name        = "ehca",
+-	.match_table = ehca_device_table,
+-	.probe       = ehca_probe,
+-	.remove      = ehca_remove,
++static struct ibmebus_driver ehca_driver = {
++	.name     = "ehca",
++	.id_table = ehca_device_table,
++	.probe    = ehca_probe,
++	.remove   = ehca_remove,
+ };
+ 
+ void ehca_poll_eqs(unsigned long data)
diff --git a/kernel_patches/backport/2.6.21/ehca_01_ibmebus_loc_code.patch b/kernel_patches/backport/2.6.21/ehca_01_ibmebus_loc_code.patch
index 40054fa..52a91fa 100644
--- a/kernel_patches/backport/2.6.21/ehca_01_ibmebus_loc_code.patch
+++ b/kernel_patches/backport/2.6.21/ehca_01_ibmebus_loc_code.patch
@@ -1,137 +1,148 @@
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 08:51:40.264936336 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 10:39:52.595875776 -0800
-@@ -107,7 +107,7 @@ struct ehca_sport {
- 
- struct ehca_shca {
- 	struct ib_device ib_device;
--	struct of_device *ofdev;
-+	struct ibmebus_dev *ibmebus_dev;
- 	u8 num_ports;
- 	int hw_level;
- 	struct list_head shca_list;
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 08:51:40.265936184 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 10:42:52.454956424 -0800
-@@ -123,7 +123,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 	/* register interrupt handlers and initialize work queues */
- 	if (type == EHCA_EQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
- 					  IRQF_DISABLED, "ehca_eq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -131,7 +131,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
- 	} else if (type == EHCA_NEQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
- 					  IRQF_DISABLED, "ehca_neq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -171,7 +171,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
- 	u64 h_ret;
- 
- 	spin_lock_irqsave(&eq->spinlock, flags);
--	ibmebus_free_irq(eq->ist, (void *)shca);
-+	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
- 
- 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
- 
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 08:51:40.267935880 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 10:58:15.135992904 -0800
-@@ -418,7 +418,7 @@ int ehca_init_device(struct ehca_shca *s
- 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
- 	shca->ib_device.phys_port_cnt       = shca->num_ports;
- 	shca->ib_device.num_comp_vectors    = 1;
--	shca->ib_device.dma_device          = &shca->ofdev->dev;
-+	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
- 	shca->ib_device.query_device        = ehca_query_device;
- 	shca->ib_device.query_port          = ehca_query_port;
- 	shca->ib_device.query_gid           = ehca_query_gid;
-@@ -672,7 +672,7 @@ static struct attribute_group ehca_dev_a
- 	.attrs = ehca_dev_attrs
- };
- 
--static int __devinit ehca_probe(struct of_device *dev,
-+static int __devinit ehca_probe(struct ibmebus_dev *dev,
- 				const struct of_device_id *id)
- {
- 	struct ehca_shca *shca;
-@@ -680,16 +680,16 @@ static int __devinit ehca_probe(struct o
- 	struct ib_pd *ibpd;
- 	int ret;
- 
--	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
-+	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
- 	if (!handle) {
- 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
- 	if (!(*handle)) {
- 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
-@@ -700,9 +700,9 @@ static int __devinit ehca_probe(struct o
- 	}
- 	mutex_init(&shca->modify_mutex);
- 
--	shca->ofdev = dev;
-+	shca->ibmebus_dev = dev;
- 	shca->ipz_hca_handle.handle = *handle;
--	dev->dev.driver_data = shca;
-+	dev->ofdev.dev.driver_data = shca;
- 
- 	ret = ehca_sense_attributes(shca);
- 	if (ret < 0) {
-@@ -778,7 +778,7 @@ static int __devinit ehca_probe(struct o
- 		}
- 	}
- 
--	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 	if (ret) /* only complain; we can live without attributes */
- 		ehca_err(&shca->ib_device,
- 			 "Cannot create device attributes  ret=%d", ret);
-@@ -828,12 +828,12 @@ probe1:
- 	return -EINVAL;
- }
- 
--static int __devexit ehca_remove(struct of_device *dev)
-+static int __devexit ehca_remove(struct ibmebus_dev *dev)
- {
--	struct ehca_shca *shca = dev->dev.driver_data;
-+	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
- 	int ret;
- 
--	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 
- 	if (ehca_open_aqp1 == 1) {
- 		int i;
-@@ -884,11 +884,11 @@ static struct of_device_id ehca_device_t
- 	{},
- };
- 
--static struct of_platform_driver ehca_driver = {
--	.name        = "ehca",
--	.match_table = ehca_device_table,
--	.probe       = ehca_probe,
--	.remove      = ehca_remove,
-+static struct ibmebus_driver ehca_driver = {
-+	.name     = "ehca",
-+	.id_table = ehca_device_table,
-+	.probe    = ehca_probe,
-+	.remove   = ehca_remove,
- };
- 
- void ehca_poll_eqs(unsigned long data)
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:08:21.000000000 +0200
+@@ -112,7 +112,7 @@ struct ehca_sport {
+ 
+ struct ehca_shca {
+ 	struct ib_device ib_device;
+-	struct of_device *ofdev;
++	struct ibmebus_dev *ibmebus_dev;
+ 	u8 num_ports;
+ 	int hw_level;
+ 	struct list_head shca_list;
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:08:21.000000000 +0200
+@@ -122,7 +122,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 	/* register interrupt handlers and initialize work queues */
+ 	if (type == EHCA_EQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
+ 					  IRQF_DISABLED, "ehca_eq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -130,7 +130,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
+ 	} else if (type == EHCA_NEQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
+ 					  IRQF_DISABLED, "ehca_neq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -170,7 +170,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
+ 	u64 h_ret;
+ 
+ 	spin_lock_irqsave(&eq->spinlock, flags);
+-	ibmebus_free_irq(eq->ist, (void *)shca);
++	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
+ 
+ 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
+ 
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:09:18.000000000 +0200
+@@ -289,8 +289,8 @@ static int ehca_sense_attributes(struct 
+ 	};
+ 
+ 	ehca_gen_dbg("Probing adapter %s...",
+-		     shca->ofdev->node->full_name);
+-	loc_code = of_get_property(shca->ofdev->node, "ibm,loc-code", NULL);
++		     shca->ibmebus_dev->ofdev.node->full_name);
++	loc_code = of_get_property(shca->ibmebus_dev->ofdev.node, "ibm,loc-code", NULL);
+ 	if (loc_code)
+ 		ehca_gen_dbg(" ... location lode=%s", loc_code);
+ 
+@@ -458,7 +458,7 @@ static int ehca_init_device(struct ehca_
+ 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
+ 	shca->ib_device.phys_port_cnt       = shca->num_ports;
+ 	shca->ib_device.num_comp_vectors    = 1;
+-	shca->ib_device.dma_device          = &shca->ofdev->dev;
++	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
+ 	shca->ib_device.query_device        = ehca_query_device;
+ 	shca->ib_device.query_port          = ehca_query_port;
+ 	shca->ib_device.query_gid           = ehca_query_gid;
+@@ -702,7 +702,7 @@ static struct attribute_group ehca_dev_a
+ 	.attrs = ehca_dev_attrs
+ };
+ 
+-static int __devinit ehca_probe(struct of_device *dev,
++static int __devinit ehca_probe(struct ibmebus_dev *dev,
+ 				const struct of_device_id *id)
+ {
+ 	struct ehca_shca *shca;
+@@ -710,16 +710,16 @@ static int __devinit ehca_probe(struct o
+ 	struct ib_pd *ibpd;
+ 	int ret, i, eq_size;
+ 
+-	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
++	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
+ 	if (!handle) {
+ 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+ 	if (!(*handle)) {
+ 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+@@ -734,9 +734,9 @@ static int __devinit ehca_probe(struct o
+ 	for (i = 0; i < ARRAY_SIZE(shca->sport); i++)
+ 		spin_lock_init(&shca->sport[i].mod_sqp_lock);
+ 
+-	shca->ofdev = dev;
++	shca->ibmebus_dev = dev;
+ 	shca->ipz_hca_handle.handle = *handle;
+-	dev->dev.driver_data = shca;
++	dev->ofdev.dev.driver_data = shca;
+ 
+ 	ret = ehca_sense_attributes(shca);
+ 	if (ret < 0) {
+@@ -813,7 +813,7 @@ static int __devinit ehca_probe(struct o
+ 		}
+ 	}
+ 
+-	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 	if (ret) /* only complain; we can live without attributes */
+ 		ehca_err(&shca->ib_device,
+ 			 "Cannot create device attributes  ret=%d", ret);
+@@ -863,12 +863,12 @@ probe1:
+ 	return -EINVAL;
+ }
+ 
+-static int __devexit ehca_remove(struct of_device *dev)
++static int __devexit ehca_remove(struct ibmebus_dev *dev)
+ {
+-	struct ehca_shca *shca = dev->dev.driver_data;
++	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
+ 	int ret;
+ 
+-	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 
+ 	if (ehca_open_aqp1 == 1) {
+ 		int i;
+@@ -919,11 +919,11 @@ static struct of_device_id ehca_device_t
+ 	{},
+ };
+ 
+-static struct of_platform_driver ehca_driver = {
+-	.name        = "ehca",
+-	.match_table = ehca_device_table,
+-	.probe       = ehca_probe,
+-	.remove      = ehca_remove,
++static struct ibmebus_driver ehca_driver = {
++	.name     = "ehca",
++	.id_table = ehca_device_table,
++	.probe    = ehca_probe,
++	.remove   = ehca_remove,
+ };
+ 
+ void ehca_poll_eqs(unsigned long data)
diff --git a/kernel_patches/backport/2.6.22/ehca_01_ibmebus_loc_code.patch b/kernel_patches/backport/2.6.22/ehca_01_ibmebus_loc_code.patch
index 40054fa..52a91fa 100644
--- a/kernel_patches/backport/2.6.22/ehca_01_ibmebus_loc_code.patch
+++ b/kernel_patches/backport/2.6.22/ehca_01_ibmebus_loc_code.patch
@@ -1,137 +1,148 @@
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 08:51:40.264936336 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 10:39:52.595875776 -0800
-@@ -107,7 +107,7 @@ struct ehca_sport {
- 
- struct ehca_shca {
- 	struct ib_device ib_device;
--	struct of_device *ofdev;
-+	struct ibmebus_dev *ibmebus_dev;
- 	u8 num_ports;
- 	int hw_level;
- 	struct list_head shca_list;
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 08:51:40.265936184 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 10:42:52.454956424 -0800
-@@ -123,7 +123,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 	/* register interrupt handlers and initialize work queues */
- 	if (type == EHCA_EQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
- 					  IRQF_DISABLED, "ehca_eq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -131,7 +131,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
- 	} else if (type == EHCA_NEQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
- 					  IRQF_DISABLED, "ehca_neq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -171,7 +171,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
- 	u64 h_ret;
- 
- 	spin_lock_irqsave(&eq->spinlock, flags);
--	ibmebus_free_irq(eq->ist, (void *)shca);
-+	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
- 
- 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
- 
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 08:51:40.267935880 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 10:58:15.135992904 -0800
-@@ -418,7 +418,7 @@ int ehca_init_device(struct ehca_shca *s
- 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
- 	shca->ib_device.phys_port_cnt       = shca->num_ports;
- 	shca->ib_device.num_comp_vectors    = 1;
--	shca->ib_device.dma_device          = &shca->ofdev->dev;
-+	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
- 	shca->ib_device.query_device        = ehca_query_device;
- 	shca->ib_device.query_port          = ehca_query_port;
- 	shca->ib_device.query_gid           = ehca_query_gid;
-@@ -672,7 +672,7 @@ static struct attribute_group ehca_dev_a
- 	.attrs = ehca_dev_attrs
- };
- 
--static int __devinit ehca_probe(struct of_device *dev,
-+static int __devinit ehca_probe(struct ibmebus_dev *dev,
- 				const struct of_device_id *id)
- {
- 	struct ehca_shca *shca;
-@@ -680,16 +680,16 @@ static int __devinit ehca_probe(struct o
- 	struct ib_pd *ibpd;
- 	int ret;
- 
--	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
-+	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
- 	if (!handle) {
- 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
- 	if (!(*handle)) {
- 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
-@@ -700,9 +700,9 @@ static int __devinit ehca_probe(struct o
- 	}
- 	mutex_init(&shca->modify_mutex);
- 
--	shca->ofdev = dev;
-+	shca->ibmebus_dev = dev;
- 	shca->ipz_hca_handle.handle = *handle;
--	dev->dev.driver_data = shca;
-+	dev->ofdev.dev.driver_data = shca;
- 
- 	ret = ehca_sense_attributes(shca);
- 	if (ret < 0) {
-@@ -778,7 +778,7 @@ static int __devinit ehca_probe(struct o
- 		}
- 	}
- 
--	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 	if (ret) /* only complain; we can live without attributes */
- 		ehca_err(&shca->ib_device,
- 			 "Cannot create device attributes  ret=%d", ret);
-@@ -828,12 +828,12 @@ probe1:
- 	return -EINVAL;
- }
- 
--static int __devexit ehca_remove(struct of_device *dev)
-+static int __devexit ehca_remove(struct ibmebus_dev *dev)
- {
--	struct ehca_shca *shca = dev->dev.driver_data;
-+	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
- 	int ret;
- 
--	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 
- 	if (ehca_open_aqp1 == 1) {
- 		int i;
-@@ -884,11 +884,11 @@ static struct of_device_id ehca_device_t
- 	{},
- };
- 
--static struct of_platform_driver ehca_driver = {
--	.name        = "ehca",
--	.match_table = ehca_device_table,
--	.probe       = ehca_probe,
--	.remove      = ehca_remove,
-+static struct ibmebus_driver ehca_driver = {
-+	.name     = "ehca",
-+	.id_table = ehca_device_table,
-+	.probe    = ehca_probe,
-+	.remove   = ehca_remove,
- };
- 
- void ehca_poll_eqs(unsigned long data)
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:08:21.000000000 +0200
+@@ -112,7 +112,7 @@ struct ehca_sport {
+ 
+ struct ehca_shca {
+ 	struct ib_device ib_device;
+-	struct of_device *ofdev;
++	struct ibmebus_dev *ibmebus_dev;
+ 	u8 num_ports;
+ 	int hw_level;
+ 	struct list_head shca_list;
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:08:21.000000000 +0200
+@@ -122,7 +122,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 	/* register interrupt handlers and initialize work queues */
+ 	if (type == EHCA_EQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
+ 					  IRQF_DISABLED, "ehca_eq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -130,7 +130,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
+ 	} else if (type == EHCA_NEQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
+ 					  IRQF_DISABLED, "ehca_neq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -170,7 +170,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
+ 	u64 h_ret;
+ 
+ 	spin_lock_irqsave(&eq->spinlock, flags);
+-	ibmebus_free_irq(eq->ist, (void *)shca);
++	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
+ 
+ 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
+ 
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:09:18.000000000 +0200
+@@ -289,8 +289,8 @@ static int ehca_sense_attributes(struct 
+ 	};
+ 
+ 	ehca_gen_dbg("Probing adapter %s...",
+-		     shca->ofdev->node->full_name);
+-	loc_code = of_get_property(shca->ofdev->node, "ibm,loc-code", NULL);
++		     shca->ibmebus_dev->ofdev.node->full_name);
++	loc_code = of_get_property(shca->ibmebus_dev->ofdev.node, "ibm,loc-code", NULL);
+ 	if (loc_code)
+ 		ehca_gen_dbg(" ... location lode=%s", loc_code);
+ 
+@@ -458,7 +458,7 @@ static int ehca_init_device(struct ehca_
+ 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
+ 	shca->ib_device.phys_port_cnt       = shca->num_ports;
+ 	shca->ib_device.num_comp_vectors    = 1;
+-	shca->ib_device.dma_device          = &shca->ofdev->dev;
++	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
+ 	shca->ib_device.query_device        = ehca_query_device;
+ 	shca->ib_device.query_port          = ehca_query_port;
+ 	shca->ib_device.query_gid           = ehca_query_gid;
+@@ -702,7 +702,7 @@ static struct attribute_group ehca_dev_a
+ 	.attrs = ehca_dev_attrs
+ };
+ 
+-static int __devinit ehca_probe(struct of_device *dev,
++static int __devinit ehca_probe(struct ibmebus_dev *dev,
+ 				const struct of_device_id *id)
+ {
+ 	struct ehca_shca *shca;
+@@ -710,16 +710,16 @@ static int __devinit ehca_probe(struct o
+ 	struct ib_pd *ibpd;
+ 	int ret, i, eq_size;
+ 
+-	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
++	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
+ 	if (!handle) {
+ 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+ 	if (!(*handle)) {
+ 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+@@ -734,9 +734,9 @@ static int __devinit ehca_probe(struct o
+ 	for (i = 0; i < ARRAY_SIZE(shca->sport); i++)
+ 		spin_lock_init(&shca->sport[i].mod_sqp_lock);
+ 
+-	shca->ofdev = dev;
++	shca->ibmebus_dev = dev;
+ 	shca->ipz_hca_handle.handle = *handle;
+-	dev->dev.driver_data = shca;
++	dev->ofdev.dev.driver_data = shca;
+ 
+ 	ret = ehca_sense_attributes(shca);
+ 	if (ret < 0) {
+@@ -813,7 +813,7 @@ static int __devinit ehca_probe(struct o
+ 		}
+ 	}
+ 
+-	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 	if (ret) /* only complain; we can live without attributes */
+ 		ehca_err(&shca->ib_device,
+ 			 "Cannot create device attributes  ret=%d", ret);
+@@ -863,12 +863,12 @@ probe1:
+ 	return -EINVAL;
+ }
+ 
+-static int __devexit ehca_remove(struct of_device *dev)
++static int __devexit ehca_remove(struct ibmebus_dev *dev)
+ {
+-	struct ehca_shca *shca = dev->dev.driver_data;
++	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
+ 	int ret;
+ 
+-	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 
+ 	if (ehca_open_aqp1 == 1) {
+ 		int i;
+@@ -919,11 +919,11 @@ static struct of_device_id ehca_device_t
+ 	{},
+ };
+ 
+-static struct of_platform_driver ehca_driver = {
+-	.name        = "ehca",
+-	.match_table = ehca_device_table,
+-	.probe       = ehca_probe,
+-	.remove      = ehca_remove,
++static struct ibmebus_driver ehca_driver = {
++	.name     = "ehca",
++	.id_table = ehca_device_table,
++	.probe    = ehca_probe,
++	.remove   = ehca_remove,
+ };
+ 
+ void ehca_poll_eqs(unsigned long data)
diff --git a/kernel_patches/backport/2.6.23/ehca_01_ibmebus_loc_code.patch b/kernel_patches/backport/2.6.23/ehca_01_ibmebus_loc_code.patch
index 40054fa..52a91fa 100644
--- a/kernel_patches/backport/2.6.23/ehca_01_ibmebus_loc_code.patch
+++ b/kernel_patches/backport/2.6.23/ehca_01_ibmebus_loc_code.patch
@@ -1,137 +1,148 @@
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 08:51:40.264936336 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 10:39:52.595875776 -0800
-@@ -107,7 +107,7 @@ struct ehca_sport {
- 
- struct ehca_shca {
- 	struct ib_device ib_device;
--	struct of_device *ofdev;
-+	struct ibmebus_dev *ibmebus_dev;
- 	u8 num_ports;
- 	int hw_level;
- 	struct list_head shca_list;
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 08:51:40.265936184 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 10:42:52.454956424 -0800
-@@ -123,7 +123,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 	/* register interrupt handlers and initialize work queues */
- 	if (type == EHCA_EQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
- 					  IRQF_DISABLED, "ehca_eq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -131,7 +131,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
- 	} else if (type == EHCA_NEQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
- 					  IRQF_DISABLED, "ehca_neq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -171,7 +171,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
- 	u64 h_ret;
- 
- 	spin_lock_irqsave(&eq->spinlock, flags);
--	ibmebus_free_irq(eq->ist, (void *)shca);
-+	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
- 
- 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
- 
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 08:51:40.267935880 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 10:58:15.135992904 -0800
-@@ -418,7 +418,7 @@ int ehca_init_device(struct ehca_shca *s
- 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
- 	shca->ib_device.phys_port_cnt       = shca->num_ports;
- 	shca->ib_device.num_comp_vectors    = 1;
--	shca->ib_device.dma_device          = &shca->ofdev->dev;
-+	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
- 	shca->ib_device.query_device        = ehca_query_device;
- 	shca->ib_device.query_port          = ehca_query_port;
- 	shca->ib_device.query_gid           = ehca_query_gid;
-@@ -672,7 +672,7 @@ static struct attribute_group ehca_dev_a
- 	.attrs = ehca_dev_attrs
- };
- 
--static int __devinit ehca_probe(struct of_device *dev,
-+static int __devinit ehca_probe(struct ibmebus_dev *dev,
- 				const struct of_device_id *id)
- {
- 	struct ehca_shca *shca;
-@@ -680,16 +680,16 @@ static int __devinit ehca_probe(struct o
- 	struct ib_pd *ibpd;
- 	int ret;
- 
--	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
-+	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
- 	if (!handle) {
- 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
- 	if (!(*handle)) {
- 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
-@@ -700,9 +700,9 @@ static int __devinit ehca_probe(struct o
- 	}
- 	mutex_init(&shca->modify_mutex);
- 
--	shca->ofdev = dev;
-+	shca->ibmebus_dev = dev;
- 	shca->ipz_hca_handle.handle = *handle;
--	dev->dev.driver_data = shca;
-+	dev->ofdev.dev.driver_data = shca;
- 
- 	ret = ehca_sense_attributes(shca);
- 	if (ret < 0) {
-@@ -778,7 +778,7 @@ static int __devinit ehca_probe(struct o
- 		}
- 	}
- 
--	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 	if (ret) /* only complain; we can live without attributes */
- 		ehca_err(&shca->ib_device,
- 			 "Cannot create device attributes  ret=%d", ret);
-@@ -828,12 +828,12 @@ probe1:
- 	return -EINVAL;
- }
- 
--static int __devexit ehca_remove(struct of_device *dev)
-+static int __devexit ehca_remove(struct ibmebus_dev *dev)
- {
--	struct ehca_shca *shca = dev->dev.driver_data;
-+	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
- 	int ret;
- 
--	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 
- 	if (ehca_open_aqp1 == 1) {
- 		int i;
-@@ -884,11 +884,11 @@ static struct of_device_id ehca_device_t
- 	{},
- };
- 
--static struct of_platform_driver ehca_driver = {
--	.name        = "ehca",
--	.match_table = ehca_device_table,
--	.probe       = ehca_probe,
--	.remove      = ehca_remove,
-+static struct ibmebus_driver ehca_driver = {
-+	.name     = "ehca",
-+	.id_table = ehca_device_table,
-+	.probe    = ehca_probe,
-+	.remove   = ehca_remove,
- };
- 
- void ehca_poll_eqs(unsigned long data)
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:08:21.000000000 +0200
+@@ -112,7 +112,7 @@ struct ehca_sport {
+ 
+ struct ehca_shca {
+ 	struct ib_device ib_device;
+-	struct of_device *ofdev;
++	struct ibmebus_dev *ibmebus_dev;
+ 	u8 num_ports;
+ 	int hw_level;
+ 	struct list_head shca_list;
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:08:21.000000000 +0200
+@@ -122,7 +122,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 	/* register interrupt handlers and initialize work queues */
+ 	if (type == EHCA_EQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
+ 					  IRQF_DISABLED, "ehca_eq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -130,7 +130,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
+ 	} else if (type == EHCA_NEQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
+ 					  IRQF_DISABLED, "ehca_neq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -170,7 +170,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
+ 	u64 h_ret;
+ 
+ 	spin_lock_irqsave(&eq->spinlock, flags);
+-	ibmebus_free_irq(eq->ist, (void *)shca);
++	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
+ 
+ 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
+ 
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:09:18.000000000 +0200
+@@ -289,8 +289,8 @@ static int ehca_sense_attributes(struct 
+ 	};
+ 
+ 	ehca_gen_dbg("Probing adapter %s...",
+-		     shca->ofdev->node->full_name);
+-	loc_code = of_get_property(shca->ofdev->node, "ibm,loc-code", NULL);
++		     shca->ibmebus_dev->ofdev.node->full_name);
++	loc_code = of_get_property(shca->ibmebus_dev->ofdev.node, "ibm,loc-code", NULL);
+ 	if (loc_code)
+ 		ehca_gen_dbg(" ... location lode=%s", loc_code);
+ 
+@@ -458,7 +458,7 @@ static int ehca_init_device(struct ehca_
+ 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
+ 	shca->ib_device.phys_port_cnt       = shca->num_ports;
+ 	shca->ib_device.num_comp_vectors    = 1;
+-	shca->ib_device.dma_device          = &shca->ofdev->dev;
++	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
+ 	shca->ib_device.query_device        = ehca_query_device;
+ 	shca->ib_device.query_port          = ehca_query_port;
+ 	shca->ib_device.query_gid           = ehca_query_gid;
+@@ -702,7 +702,7 @@ static struct attribute_group ehca_dev_a
+ 	.attrs = ehca_dev_attrs
+ };
+ 
+-static int __devinit ehca_probe(struct of_device *dev,
++static int __devinit ehca_probe(struct ibmebus_dev *dev,
+ 				const struct of_device_id *id)
+ {
+ 	struct ehca_shca *shca;
+@@ -710,16 +710,16 @@ static int __devinit ehca_probe(struct o
+ 	struct ib_pd *ibpd;
+ 	int ret, i, eq_size;
+ 
+-	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
++	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
+ 	if (!handle) {
+ 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+ 	if (!(*handle)) {
+ 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+@@ -734,9 +734,9 @@ static int __devinit ehca_probe(struct o
+ 	for (i = 0; i < ARRAY_SIZE(shca->sport); i++)
+ 		spin_lock_init(&shca->sport[i].mod_sqp_lock);
+ 
+-	shca->ofdev = dev;
++	shca->ibmebus_dev = dev;
+ 	shca->ipz_hca_handle.handle = *handle;
+-	dev->dev.driver_data = shca;
++	dev->ofdev.dev.driver_data = shca;
+ 
+ 	ret = ehca_sense_attributes(shca);
+ 	if (ret < 0) {
+@@ -813,7 +813,7 @@ static int __devinit ehca_probe(struct o
+ 		}
+ 	}
+ 
+-	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 	if (ret) /* only complain; we can live without attributes */
+ 		ehca_err(&shca->ib_device,
+ 			 "Cannot create device attributes  ret=%d", ret);
+@@ -863,12 +863,12 @@ probe1:
+ 	return -EINVAL;
+ }
+ 
+-static int __devexit ehca_remove(struct of_device *dev)
++static int __devexit ehca_remove(struct ibmebus_dev *dev)
+ {
+-	struct ehca_shca *shca = dev->dev.driver_data;
++	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
+ 	int ret;
+ 
+-	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 
+ 	if (ehca_open_aqp1 == 1) {
+ 		int i;
+@@ -919,11 +919,11 @@ static struct of_device_id ehca_device_t
+ 	{},
+ };
+ 
+-static struct of_platform_driver ehca_driver = {
+-	.name        = "ehca",
+-	.match_table = ehca_device_table,
+-	.probe       = ehca_probe,
+-	.remove      = ehca_remove,
++static struct ibmebus_driver ehca_driver = {
++	.name     = "ehca",
++	.id_table = ehca_device_table,
++	.probe    = ehca_probe,
++	.remove   = ehca_remove,
+ };
+ 
+ void ehca_poll_eqs(unsigned long data)
diff --git a/kernel_patches/backport/2.6.9_U5/backport_ehca_2_rhel45_umap.patch b/kernel_patches/backport/2.6.9_U5/backport_ehca_2_rhel45_umap.patch
index ff9b9e3..0f07b47 100644
--- a/kernel_patches/backport/2.6.9_U5/backport_ehca_2_rhel45_umap.patch
+++ b/kernel_patches/backport/2.6.9_U5/backport_ehca_2_rhel45_umap.patch
@@ -1,7 +1,7 @@
-diff -Nurp a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/ehca/ehca_classes.h
---- a/drivers/infiniband/hw/ehca/ehca_classes.h	2008-01-23 15:30:42.000000000 +0100
-+++ b/drivers/infiniband/hw/ehca/ehca_classes.h	2008-01-23 15:38:37.000000000 +0100
-@@ -179,10 +179,10 @@ struct ehca_qp {
+diff -Nurp ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_classes.h ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h
+--- ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:21:15.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:20:12.000000000 +0200
+@@ -183,10 +183,10 @@ struct ehca_qp {
  	/* array to cache modify_qp()'s parms for GSI/SMI qp */
  	struct ehca_mod_qp_parm *mod_qp_parm;
  	int mod_qp_parm_idx;
@@ -16,7 +16,7 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/e
  	/* unsolicited ack circumvention */
  	int unsol_ack_circ;
  	int mtu_shift;
-@@ -208,6 +208,8 @@ struct ehca_cq {
+@@ -212,15 +212,14 @@ struct ehca_cq {
  	struct ipz_cq_handle ipz_cq_handle;
  	struct ehca_pfcq pf;
  	spinlock_t cb_lock;
@@ -25,17 +25,16 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/e
  	struct hlist_head qp_hashtab[QP_HASHTAB_LEN];
  	struct list_head entry;
  	u32 nr_callbacks;   /* #events assigned to cpu by scaling code */
-@@ -215,9 +217,6 @@ struct ehca_cq {
+ 	atomic_t nr_events; /* #events seen */
  	wait_queue_head_t wait_completion;
  	spinlock_t task_lock;
- 	u32 ownpid;
 -	/* mmap counter for resources mapped into user space */
 -	u32 mm_count_queue;
 -	u32 mm_count_galpa;
  };
  
  enum ehca_mr_flag {
-@@ -320,6 +319,20 @@ struct ehca_ucontext {
+@@ -323,6 +322,20 @@ struct ehca_ucontext {
  	struct ib_ucontext ib_ucontext;
  };
  
@@ -56,15 +55,15 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/e
  int ehca_init_pd_cache(void);
  void ehca_cleanup_pd_cache(void);
  int ehca_init_cq_cache(void);
-@@ -345,6 +358,7 @@ extern int ehca_scaling_code;
- extern int ehca_nr_ports;
+@@ -351,6 +364,7 @@ extern int ehca_max_cq;
+ extern int ehca_max_qp;
  
  struct ipzu_queue_resp {
 +	u64 queue;        /* points to first queue entry */
  	u32 qe_size;      /* queue entry size */
  	u32 act_nr_of_sg;
  	u32 queue_length; /* queue length allocated in bytes */
-@@ -357,6 +371,7 @@ struct ehca_create_cq_resp {
+@@ -363,6 +377,7 @@ struct ehca_create_cq_resp {
  	u32 cq_number;
  	u32 token;
  	struct ipzu_queue_resp ipz_queue;
@@ -72,7 +71,7 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/e
  	u32 fw_handle_ofs;
  	u32 dummy;
  };
-@@ -373,6 +388,7 @@ struct ehca_create_qp_resp {
+@@ -379,6 +394,7 @@ struct ehca_create_qp_resp {
  	u32 dummy;
  	struct ipzu_queue_resp ipz_squeue;
  	struct ipzu_queue_resp ipz_rqueue;
@@ -80,10 +79,10 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/e
  };
  
  struct ehca_alloc_cq_parms {
-diff -Nurp a/drivers/infiniband/hw/ehca/ehca_cq.c b/drivers/infiniband/hw/ehca/ehca_cq.c
---- a/drivers/infiniband/hw/ehca/ehca_cq.c	2008-01-23 15:30:42.000000000 +0100
-+++ b/drivers/infiniband/hw/ehca/ehca_cq.c	2008-01-23 15:38:37.000000000 +0100
-@@ -273,6 +273,7 @@ struct ib_cq *ehca_create_cq(struct ib_d
+diff -Nurp ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_cq.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_cq.c
+--- ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_cq.c	2008-05-02 22:21:16.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_cq.c	2008-05-02 22:20:12.000000000 +0200
+@@ -279,6 +279,7 @@ struct ib_cq *ehca_create_cq(struct ib_d
  	if (context) {
  		struct ipz_queue *ipz_queue = &my_cq->ipz_queue;
  		struct ehca_create_cq_resp resp;
@@ -91,7 +90,7 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_cq.c b/drivers/infiniband/hw/ehca/e
  		memset(&resp, 0, sizeof(resp));
  		resp.cq_number = my_cq->cq_number;
  		resp.token = my_cq->token;
-@@ -281,16 +282,42 @@ struct ib_cq *ehca_create_cq(struct ib_d
+@@ -287,16 +288,42 @@ struct ib_cq *ehca_create_cq(struct ib_d
  		resp.ipz_queue.queue_length = ipz_queue->queue_length;
  		resp.ipz_queue.pagesize = ipz_queue->pagesize;
  		resp.ipz_queue.toggle_state = ipz_queue->toggle_state;
@@ -135,7 +134,7 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_cq.c b/drivers/infiniband/hw/ehca/e
  create_cq_exit4:
  	ipz_queue_dtor(NULL, &my_cq->ipz_queue);
  
-@@ -314,6 +341,7 @@ create_cq_exit1:
+@@ -321,6 +348,7 @@ create_cq_exit1:
  int ehca_destroy_cq(struct ib_cq *cq)
  {
  	u64 h_ret;
@@ -143,8 +142,8 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_cq.c b/drivers/infiniband/hw/ehca/e
  	struct ehca_cq *my_cq = container_of(cq, struct ehca_cq, ib_cq);
  	int cq_num = my_cq->cq_number;
  	struct ib_device *device = cq->device;
-@@ -323,20 +351,6 @@ int ehca_destroy_cq(struct ib_cq *cq)
- 	u32 cur_pid = current->tgid;
+@@ -329,14 +357,6 @@ int ehca_destroy_cq(struct ib_cq *cq)
+ 	struct ipz_adapter_handle adapter_handle = shca->ipz_hca_handle;
  	unsigned long flags;
  
 -	if (cq->uobject) {
@@ -153,28 +152,16 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_cq.c b/drivers/infiniband/hw/ehca/e
 -				 "user space cq_num=%x", my_cq->cq_number);
 -			return -EINVAL;
 -		}
--		if (my_cq->ownpid != cur_pid) {
--			ehca_err(device, "Invalid caller pid=%x ownpid=%x "
--				 "cq_num=%x",
--				 cur_pid, my_cq->ownpid, my_cq->cq_number);
--			return -EINVAL;
--		}
 -	}
 -
  	/*
  	 * remove the CQ from the idr first to make sure
  	 * no more interrupt tasklets will touch this CQ
-@@ -349,6 +363,26 @@ int ehca_destroy_cq(struct ib_cq *cq)
+@@ -349,6 +369,20 @@ int ehca_destroy_cq(struct ib_cq *cq)
  	wait_event(my_cq->wait_completion, !atomic_read(&my_cq->nr_events));
  
  	/* nobody's using our CQ any longer -- we can destroy it */
 +
-+	if (my_cq->uspace_queue && my_cq->ownpid != cur_pid) {
-+		ehca_err(device, "Invalid caller pid=%x ownpid=%x",
-+			 cur_pid, my_cq->ownpid);
-+		return -EINVAL;
-+	}
-+
 +	/* un-mmap if vma alloc */
 +	if (my_cq->uspace_queue ) {
 +		ret = ehca_munmap(my_cq->uspace_queue,
@@ -191,19 +178,10 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_cq.c b/drivers/infiniband/hw/ehca/e
  	h_ret = hipz_h_destroy_cq(adapter_handle, my_cq, 0);
  	if (h_ret == H_R_STATE) {
  		/* cq in err: read err data and destroy it forcibly */
-@@ -377,7 +411,7 @@ int ehca_resize_cq(struct ib_cq *cq, int
- 	struct ehca_cq *my_cq = container_of(cq, struct ehca_cq, ib_cq);
- 	u32 cur_pid = current->tgid;
- 
--	if (cq->uobject && my_cq->ownpid != cur_pid) {
-+	if (my_cq->uspace_queue && my_cq->ownpid != cur_pid) {
- 		ehca_err(cq->device, "Invalid caller pid=%x ownpid=%x",
- 			 cur_pid, my_cq->ownpid);
- 		return -EINVAL;
-diff -Nurp a/drivers/infiniband/hw/ehca/ehca_iverbs.h b/drivers/infiniband/hw/ehca/ehca_iverbs.h
---- a/drivers/infiniband/hw/ehca/ehca_iverbs.h	2008-01-23 15:30:42.000000000 +0100
-+++ b/drivers/infiniband/hw/ehca/ehca_iverbs.h	2008-01-23 15:38:37.000000000 +0100
-@@ -192,6 +192,14 @@ void ehca_poll_eqs(unsigned long data);
+diff -Nurp ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_iverbs.h ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_iverbs.h
+--- ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_iverbs.h	2008-05-02 22:21:15.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_iverbs.h	2008-05-02 22:20:12.000000000 +0200
+@@ -197,6 +197,14 @@ void ehca_poll_eqs(unsigned long data);
  int ehca_calc_ipd(struct ehca_shca *shca, int port,
  		  enum ib_rate path_rate, u32 *ipd);
  
@@ -218,10 +196,10 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_iverbs.h b/drivers/infiniband/hw/eh
  #ifdef CONFIG_PPC_64K_PAGES
  void *ehca_alloc_fw_ctrlblock(gfp_t flags);
  void ehca_free_fw_ctrlblock(void *ptr);
-diff -Nurp a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c
---- a/drivers/infiniband/hw/ehca/ehca_main.c	2008-01-23 15:30:42.000000000 +0100
-+++ b/drivers/infiniband/hw/ehca/ehca_main.c	2008-01-23 15:38:37.000000000 +0100
-@@ -394,7 +394,7 @@ int ehca_init_device(struct ehca_shca *s
+diff -Nurp ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_main.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c
+--- ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:21:16.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:20:12.000000000 +0200
+@@ -436,7 +436,7 @@ static int ehca_init_device(struct ehca_
  	strlcpy(shca->ib_device.name, "ehca%d", IB_DEVICE_NAME_MAX);
  	shca->ib_device.owner               = THIS_MODULE;
  
@@ -230,10 +208,10 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca
  	shca->ib_device.uverbs_cmd_mask	    =
  		(1ull << IB_USER_VERBS_CMD_GET_CONTEXT)		|
  		(1ull << IB_USER_VERBS_CMD_QUERY_DEVICE)	|
-diff -Nurp a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c
---- a/drivers/infiniband/hw/ehca/ehca_qp.c	2008-01-23 15:30:42.000000000 +0100
-+++ b/drivers/infiniband/hw/ehca/ehca_qp.c	2008-01-23 15:38:37.000000000 +0100
-@@ -265,15 +265,19 @@ static inline int ibqptype2servicetype(e
+diff -Nurp ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_qp.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_qp.c
+--- ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_qp.c	2008-05-02 22:21:16.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_qp.c	2008-05-02 22:20:12.000000000 +0200
+@@ -262,15 +262,19 @@ static inline int ibqptype2servicetype(e
  /*
   * init userspace queue info from ipz_queue data
   */
@@ -255,7 +233,7 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/e
  }
  
  /*
-@@ -773,6 +777,7 @@ static struct ehca_qp *internal_create_q
+@@ -789,6 +793,7 @@ static struct ehca_qp *internal_create_q
  	/* copy queues, galpa data to user space */
  	if (context && udata) {
  		struct ehca_create_qp_resp resp;
@@ -263,7 +241,7 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/e
  		memset(&resp, 0, sizeof(resp));
  
  		resp.qp_num = my_qp->real_qp_num;
-@@ -782,22 +787,55 @@ static struct ehca_qp *internal_create_q
+@@ -798,22 +803,55 @@ static struct ehca_qp *internal_create_q
  		resp.qkey = my_qp->qkey;
  		resp.real_qp_num = my_qp->real_qp_num;
  
@@ -326,7 +304,7 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/e
  create_qp_exit6:
  	ehca_cq_unassign_qp(my_qp->send_cq, my_qp->real_qp_num);
  
-@@ -1157,7 +1195,7 @@ static int internal_modify_qp(struct ib_
+@@ -1174,7 +1212,7 @@ static int internal_modify_qp(struct ib_
  	     my_qp->qp_type == IB_QPT_SMI) &&
  	    statetrans == IB_QPST_SQE2RTS) {
  		/* mark next free wqe if kernel */
@@ -335,7 +313,7 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/e
  			struct ehca_wqe *wqe;
  			/* lock send queue */
  			spin_lock_irqsave(&my_qp->spinlock_s, flags);
-@@ -1927,18 +1965,11 @@ static int internal_destroy_qp(struct ib
+@@ -1906,15 +1944,6 @@ static int internal_destroy_qp(struct ib
  	enum ib_qp_type	qp_type;
  	unsigned long flags;
  
@@ -346,20 +324,12 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/e
 -				 "user space qp_num=%x", qp_num);
 -			return -EINVAL;
 -		}
--		if (my_pd->ownpid != cur_pid) {
--			ehca_err(dev, "Invalid caller pid=%x ownpid=%x",
--				 cur_pid, my_pd->ownpid);
--			return -EINVAL;
--		}
-+	if (my_pd->ib_pd.uobject && my_pd->ib_pd.uobject->context &&
-+	    my_pd->ownpid != cur_pid) {
-+		ehca_err(dev, "Invalid caller pid=%x ownpid=%x",
-+			 cur_pid, my_pd->ownpid);
-+		return -EINVAL;
- 	}
- 
+-	}
+-
  	if (my_qp->send_cq) {
-@@ -1955,6 +1986,24 @@ static int internal_destroy_qp(struct ib
+ 		ret = ehca_cq_unassign_qp(my_qp->send_cq, qp_num);
+ 		if (ret) {
+@@ -1929,6 +1958,24 @@ static int internal_destroy_qp(struct ib
  	idr_remove(&ehca_qp_idr, my_qp->token);
  	write_unlock_irqrestore(&ehca_qp_idr_lock, flags);
  
@@ -384,10 +354,10 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/e
  	h_ret = hipz_h_destroy_qp(shca->ipz_hca_handle, my_qp);
  	if (h_ret != H_SUCCESS) {
  		ehca_err(dev, "hipz_h_destroy_qp() failed h_ret=%li "
-diff -Nurp a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/ehca/ehca_uverbs.c
---- a/drivers/infiniband/hw/ehca/ehca_uverbs.c	2008-01-23 15:30:42.000000000 +0100
-+++ b/drivers/infiniband/hw/ehca/ehca_uverbs.c	2008-01-23 15:38:37.000000000 +0100
-@@ -68,184 +68,104 @@ int ehca_dealloc_ucontext(struct ib_ucon
+diff -Nurp ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_uverbs.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_uverbs.c
+--- ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_uverbs.c	2008-05-02 22:21:15.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_uverbs.c	2008-05-02 22:23:06.000000000 +0200
+@@ -66,183 +66,88 @@ int ehca_dealloc_ucontext(struct ib_ucon
  	return 0;
  }
  
@@ -420,13 +390,89 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/eh
 -	(*count)--;
 -	ehca_gen_dbg("vm_start=%lx vm_end=%lx count=%x",
 -		     vma->vm_start, vma->vm_end, *count);
--}
++	struct page *mypage = NULL;
++	u64 fileoffset = vma->vm_pgoff << PAGE_SHIFT;
++	u32 idr_handle = fileoffset >> 32;
++	u32 q_type = (fileoffset >> 28) & 0xF;	  /* CQ, QP,...        */
++	u32 rsrc_type = (fileoffset >> 24) & 0xF; /* sq,rq,cmnd_window */
++	unsigned long flags;
++	struct ehca_cq *cq;
++	struct ehca_qp *qp;
++	u64 offset;
++	void *vaddr;
++  
++	switch (q_type) {
++	case 1: /* CQ */
++		spin_lock_irqsave(&ehca_cq_idr_lock, flags);
++		cq = idr_find(&ehca_cq_idr, idr_handle);
++		spin_unlock_irqrestore(&ehca_cq_idr_lock, flags);
++  
++		/* make sure this mmap really belongs to the authorized user */
++		if (!cq) {
++			ehca_gen_err("cq is NULL ret=NOPAGE_SIGBUS");
++			return NOPAGE_SIGBUS;
++  		}
++    
++		if (rsrc_type == 2) {
++			ehca_dbg(cq->ib_cq.device, "cq=%p cq queuearea", cq);
++			offset = address - vma->vm_start;
++			vaddr = ipz_qeit_calc(&cq->ipz_queue, offset);
++			ehca_dbg(cq->ib_cq.device, "offset=%lx vaddr=%p",
++				 offset, vaddr);
++			mypage = virt_to_page(vaddr);
++  		}
++  		break;
++  
++	case 2: /* QP */
++		spin_lock_irqsave(&ehca_qp_idr_lock, flags);
++		qp = idr_find(&ehca_qp_idr, idr_handle);
++		spin_unlock_irqrestore(&ehca_qp_idr_lock, flags);
++  
++		/* make sure this mmap really belongs to the authorized user */
++		if (!qp) {
++			ehca_gen_err("qp is NULL ret=NOPAGE_SIGBUS");
++			return NOPAGE_SIGBUS;
++  		}
++  
++		if (rsrc_type == 2) {	/* rqueue */
++			ehca_dbg(qp->ib_qp.device, "qp=%p qp rqueuearea", qp);
++			offset = address - vma->vm_start;
++			vaddr = ipz_qeit_calc(&qp->ipz_rqueue, offset);
++			ehca_dbg(qp->ib_qp.device, "offset=%lx vaddr=%p",
++				 offset, vaddr);
++			mypage = virt_to_page(vaddr);
++		} else if (rsrc_type == 3) {	/* squeue */
++			ehca_dbg(qp->ib_qp.device, "qp=%p qp squeuearea", qp);
++			offset = address - vma->vm_start;
++			vaddr = ipz_qeit_calc(&qp->ipz_squeue, offset);
++			ehca_dbg(qp->ib_qp.device, "offset=%lx vaddr=%p",
++				 offset, vaddr);
++			mypage = virt_to_page(vaddr);
++  		}
++  		break;
++  
++  	default:
++		ehca_gen_err("bad queue type %x", q_type);
++		return NOPAGE_SIGBUS;
++  	}
++  
++	if (!mypage) {
++		ehca_gen_err("Invalid page adr==NULL ret=NOPAGE_SIGBUS");
++		return NOPAGE_SIGBUS;
++  	}
++	get_page(mypage);
++  
++	return mypage;
+ }
 -
 -static struct vm_operations_struct vm_ops = {
 -	.open =	ehca_mm_open,
 -	.close = ehca_mm_close,
--};
--
++  
++static struct vm_operations_struct ehcau_vm_ops = {
++	.nopage = ehca_nopage,
+ };
+ 
 -static int ehca_mmap_fw(struct vm_area_struct *vma, struct h_galpas *galpas,
 -			u32 *mm_count)
 -{
@@ -479,37 +525,15 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/eh
 -	vma->vm_private_data = mm_count;
 -	(*mm_count)++;
 -	vma->vm_ops = &vm_ops;
-+	struct page *mypage = NULL;
-+	u64 fileoffset = vma->vm_pgoff << PAGE_SHIFT;
-+	u32 idr_handle = fileoffset >> 32;
-+	u32 q_type = (fileoffset >> 28) & 0xF;	  /* CQ, QP,...        */
-+	u32 rsrc_type = (fileoffset >> 24) & 0xF; /* sq,rq,cmnd_window */
-+	u32 cur_pid = current->tgid;
-+	unsigned long flags;
-+	struct ehca_cq *cq;
-+	struct ehca_qp *qp;
-+	struct ehca_pd *pd;
-+	u64 offset;
-+	void *vaddr;
- 
+-
 -	return 0;
 -}
-+	switch (q_type) {
-+	case 1: /* CQ */
-+		spin_lock_irqsave(&ehca_cq_idr_lock, flags);
-+		cq = idr_find(&ehca_cq_idr, idr_handle);
-+		spin_unlock_irqrestore(&ehca_cq_idr_lock, flags);
- 
+-
 -static int ehca_mmap_cq(struct vm_area_struct *vma, struct ehca_cq *cq,
 -			u32 rsrc_type)
 -{
 -	int ret;
-+		/* make sure this mmap really belongs to the authorized user */
-+		if (!cq) {
-+			ehca_gen_err("cq is NULL ret=NOPAGE_SIGBUS");
-+			return NOPAGE_SIGBUS;
-+  		}
- 
+-
 -	switch (rsrc_type) {
 -	case 0: /* galpa fw handle */
 -		ehca_dbg(cq->ib_cq.device, "cq_num=%x fw", cq->cq_number);
@@ -521,13 +545,7 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/eh
 -			return ret;
 -		}
 -		break;
-+		if (cq->ownpid != cur_pid) {
-+  			ehca_err(cq->ib_cq.device,
-+				 "Invalid caller pid=%x ownpid=%x",
-+				 cur_pid, cq->ownpid);
-+			return NOPAGE_SIGBUS;
-+  		}
- 
+-
 -	case 1: /* cq queue_addr */
 -		ehca_dbg(cq->ib_cq.device, "cq_num=%x queue", cq->cq_number);
 -		ret = ehca_mmap_queue(vma, &cq->ipz_queue, &cq->mm_count_queue);
@@ -538,46 +556,21 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/eh
 -			return ret;
 -		}
 -		break;
-+		if (rsrc_type == 2) {
-+			ehca_dbg(cq->ib_cq.device, "cq=%p cq queuearea", cq);
-+			offset = address - vma->vm_start;
-+			vaddr = ipz_qeit_calc(&cq->ipz_queue, offset);
-+			ehca_dbg(cq->ib_cq.device, "offset=%lx vaddr=%p",
-+				 offset, vaddr);
-+			mypage = virt_to_page(vaddr);
-+  		}
-+  		break;
- 
+-
 -	default:
 -		ehca_err(cq->ib_cq.device, "bad resource type=%x cq_num=%x",
 -			 rsrc_type, cq->cq_number);
 -		return -EINVAL;
 -	}
-+	case 2: /* QP */
-+		spin_lock_irqsave(&ehca_qp_idr_lock, flags);
-+		qp = idr_find(&ehca_qp_idr, idr_handle);
-+		spin_unlock_irqrestore(&ehca_qp_idr_lock, flags);
- 
+-
 -	return 0;
 -}
-+		/* make sure this mmap really belongs to the authorized user */
-+		if (!qp) {
-+			ehca_gen_err("qp is NULL ret=NOPAGE_SIGBUS");
-+			return NOPAGE_SIGBUS;
-+  		}
- 
+-
 -static int ehca_mmap_qp(struct vm_area_struct *vma, struct ehca_qp *qp,
 -			u32 rsrc_type)
 -{
 -	int ret;
-+		pd = container_of(qp->ib_qp.pd, struct ehca_pd, ib_pd);
-+		if (pd->ownpid != cur_pid) {
-+  			ehca_err(qp->ib_qp.device,
-+				 "Invalid caller pid=%x ownpid=%x",
-+				 cur_pid, pd->ownpid);
-+			return NOPAGE_SIGBUS;
-+  		}
- 
+-
 -	switch (rsrc_type) {
 -	case 0: /* galpa fw handle */
 -		ehca_dbg(qp->ib_qp.device, "qp_num=%x fw", qp->ib_qp.qp_num);
@@ -589,26 +582,9 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/eh
 -			return -ENOMEM;
 -		}
 -		break;
-+		if (rsrc_type == 2) {	/* rqueue */
-+			ehca_dbg(qp->ib_qp.device, "qp=%p qp rqueuearea", qp);
-+			offset = address - vma->vm_start;
-+			vaddr = ipz_qeit_calc(&qp->ipz_rqueue, offset);
-+			ehca_dbg(qp->ib_qp.device, "offset=%lx vaddr=%p",
-+				 offset, vaddr);
-+			mypage = virt_to_page(vaddr);
-+		} else if (rsrc_type == 3) {	/* squeue */
-+			ehca_dbg(qp->ib_qp.device, "qp=%p qp squeuearea", qp);
-+			offset = address - vma->vm_start;
-+			vaddr = ipz_qeit_calc(&qp->ipz_squeue, offset);
-+			ehca_dbg(qp->ib_qp.device, "offset=%lx vaddr=%p",
-+				 offset, vaddr);
-+			mypage = virt_to_page(vaddr);
-+  		}
-+  		break;
- 
+-
 -	case 1: /* qp rqueue_addr */
--		ehca_dbg(qp->ib_qp.device, "qp_num=%x rqueue",
--			 qp->ib_qp.qp_num);
+-		ehca_dbg(qp->ib_qp.device, "qp_num=%x rq", qp->ib_qp.qp_num);
 -		ret = ehca_mmap_queue(vma, &qp->ipz_rqueue,
 -				      &qp->mm_count_rqueue);
 -		if (unlikely(ret)) {
@@ -618,14 +594,9 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/eh
 -			return ret;
 -		}
 -		break;
-+  	default:
-+		ehca_gen_err("bad queue type %x", q_type);
-+		return NOPAGE_SIGBUS;
-+  	}
- 
+-
 -	case 2: /* qp squeue_addr */
--		ehca_dbg(qp->ib_qp.device, "qp_num=%x squeue",
--			 qp->ib_qp.qp_num);
+-		ehca_dbg(qp->ib_qp.device, "qp_num=%x sq", qp->ib_qp.qp_num);
 -		ret = ehca_mmap_queue(vma, &qp->ipz_squeue,
 -				      &qp->mm_count_squeue);
 -		if (unlikely(ret)) {
@@ -635,37 +606,28 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/eh
 -			return ret;
 -		}
 -		break;
-+	if (!mypage) {
-+		ehca_gen_err("Invalid page adr==NULL ret=NOPAGE_SIGBUS");
-+		return NOPAGE_SIGBUS;
-+  	}
-+	get_page(mypage);
- 
+-
 -	default:
 -		ehca_err(qp->ib_qp.device, "bad resource type=%x qp=num=%x",
 -			 rsrc_type, qp->ib_qp.qp_num);
 -		return -EINVAL;
 -	}
-+	return mypage;
-+  }
- 
+-
 -	return 0;
 -}
-+static struct vm_operations_struct ehcau_vm_ops = {
-+	.nopage = ehca_nopage,
-+};
- 
+-
  int ehca_mmap(struct ib_ucontext *context, struct vm_area_struct *vma)
  {
-@@ -255,6 +175,7 @@ int ehca_mmap(struct ib_ucontext *contex
+ 	u64 fileoffset = vma->vm_pgoff;
+@@ -250,6 +155,7 @@ int ehca_mmap(struct ib_ucontext *contex
+ 	u32 q_type = (fileoffset >> 27) & 0x1;	  /* CQ, QP,...        */
  	u32 rsrc_type = (fileoffset >> 25) & 0x3; /* sq,rq,cmnd_window */
- 	u32 cur_pid = current->tgid;
  	u32 ret;
 + 	u64 vsize, physical;
  	struct ehca_cq *cq;
  	struct ehca_qp *qp;
- 	struct ehca_pd *pd;
-@@ -280,12 +201,44 @@ int ehca_mmap(struct ib_ucontext *contex
+ 	struct ib_uobject *uobject;
+@@ -267,12 +173,44 @@ int ehca_mmap(struct ib_ucontext *contex
  		if (!cq->ib_cq.uobject || cq->ib_cq.uobject->context != context)
  			return -EINVAL;
  
@@ -716,7 +678,7 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/eh
  		}
  		break;
  
-@@ -310,12 +263,50 @@ int ehca_mmap(struct ib_ucontext *contex
+@@ -289,12 +227,50 @@ int ehca_mmap(struct ib_ucontext *contex
  		if (!uobject || uobject->context != context)
  			return -EINVAL;
  
@@ -773,7 +735,7 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/eh
  		}
  		break;
  
-@@ -326,3 +317,77 @@ int ehca_mmap(struct ib_ucontext *contex
+@@ -305,3 +281,77 @@ int ehca_mmap(struct ib_ucontext *contex
  
  	return 0;
  }
diff --git a/kernel_patches/backport/2.6.9_U5/backport_ehca_3_rhel45_dma.patch b/kernel_patches/backport/2.6.9_U5/backport_ehca_3_rhel45_dma.patch
index ce76861..39c0ebd 100644
--- a/kernel_patches/backport/2.6.9_U5/backport_ehca_3_rhel45_dma.patch
+++ b/kernel_patches/backport/2.6.9_U5/backport_ehca_3_rhel45_dma.patch
@@ -1,6 +1,6 @@
-diff -Nurp ofa_kernel-1.2_orig/drivers/infiniband/hw/ehca/ehca_dma.c ofa_kernel-1.2_new/drivers/infiniband/hw/ehca/ehca_dma.c
---- ofa_kernel-1.2_orig/drivers/infiniband/hw/ehca/ehca_dma.c	1970-01-01 01:00:00.000000000 +0100
-+++ ofa_kernel-1.2_new/drivers/infiniband/hw/ehca/ehca_dma.c	2007-05-03 16:25:30.000000000 +0200
+diff -Nurp ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_dma.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_dma.c
+--- ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_dma.c	1970-01-01 01:00:00.000000000 +0100
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_dma.c	2008-05-02 22:07:06.000000000 +0200
 @@ -0,0 +1,194 @@
 +/*
 + *  IBM eServer eHCA Infiniband device driver for Linux on POWER
@@ -196,31 +196,32 @@ diff -Nurp ofa_kernel-1.2_orig/drivers/infiniband/hw/ehca/ehca_dma.c ofa_kernel-
 +{
 +	ibmebus_free_coherent(dev, size, cpu_addr, dma_handle);
 +}
-diff -Nurp ofa_kernel-1.2_orig/drivers/infiniband/hw/ehca/ehca_main.c ofa_kernel-1.2_new/drivers/infiniband/hw/ehca/ehca_main.c
---- ofa_kernel-1.2_orig/drivers/infiniband/hw/ehca/ehca_main.c	2007-04-29 15:10:56.000000000 +0200
-+++ ofa_kernel-1.2_new/drivers/infiniband/hw/ehca/ehca_main.c	2007-05-03 16:19:28.000000000 +0200
-@@ -279,6 +279,7 @@ init_node_guid1:
+diff -Nurp ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_main.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c
+--- ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:11:30.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:07:49.000000000 +0200
+@@ -427,6 +427,7 @@ init_node_guid1:
  
- int ehca_init_device(struct ehca_shca *shca)
+ static int ehca_init_device(struct ehca_shca *shca)
  {
 +	extern struct ib_dma_mapping_ops ehca_dma_mapping_ops;
  	int ret;
  
  	ret = init_node_guid(shca);
-@@ -354,6 +355,7 @@ int ehca_init_device(struct ehca_shca *s
+@@ -503,6 +504,7 @@ static int ehca_init_device(struct ehca_
  	shca->ib_device.detach_mcast	    = ehca_detach_mcast;
- 	/* shca->ib_device.process_mad	    = ehca_process_mad;	    */
+ 	shca->ib_device.process_mad	    = ehca_process_mad;
  	shca->ib_device.mmap		    = ehca_mmap;
 +	shca->ib_device.dma_ops             = &ehca_dma_mapping_ops;
  
- 	return ret;
- }
-diff -Nurp ofa_kernel-1.2_orig/drivers/infiniband/hw/ehca/Makefile ofa_kernel-1.2_new/drivers/infiniband/hw/ehca/Makefile
---- ofa_kernel-1.2_orig/drivers/infiniband/hw/ehca/Makefile	2007-04-29 15:10:56.000000000 +0200
-+++ ofa_kernel-1.2_new/drivers/infiniband/hw/ehca/Makefile	2007-05-03 16:26:13.000000000 +0200
+ 	if (EHCA_BMASK_GET(HCA_CAP_SRQ, shca->hca_cap)) {
+ 		shca->ib_device.uverbs_cmd_mask |=
+diff -Nurp ofa_kernel-1.3/drivers/infiniband/hw/ehca/Makefile ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/Makefile
+--- ofa_kernel-1.3/drivers/infiniband/hw/ehca/Makefile	2008-05-02 15:01:48.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/Makefile	2008-05-02 22:07:06.000000000 +0200
 @@ -12,5 +12,5 @@ obj-$(CONFIG_INFINIBAND_EHCA) += ib_ehca
  
  ib_ehca-objs  = ehca_main.o ehca_hca.o ehca_mcast.o ehca_pd.o ehca_av.o ehca_eq.o \
  		ehca_cq.o ehca_qp.o ehca_sqp.o ehca_mrmw.o ehca_reqs.o ehca_irq.o \
 -		ehca_uverbs.o ipz_pt_fn.o hcp_if.o hcp_phyp.o
 +		ehca_uverbs.o ehca_dma.o ipz_pt_fn.o hcp_if.o hcp_phyp.o
+ 
diff --git a/kernel_patches/backport/2.6.9_U5/ehca_01_ibmebus_loc_code.patch b/kernel_patches/backport/2.6.9_U5/ehca_01_ibmebus_loc_code.patch
index 40054fa..52a91fa 100644
--- a/kernel_patches/backport/2.6.9_U5/ehca_01_ibmebus_loc_code.patch
+++ b/kernel_patches/backport/2.6.9_U5/ehca_01_ibmebus_loc_code.patch
@@ -1,137 +1,148 @@
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 08:51:40.264936336 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 10:39:52.595875776 -0800
-@@ -107,7 +107,7 @@ struct ehca_sport {
- 
- struct ehca_shca {
- 	struct ib_device ib_device;
--	struct of_device *ofdev;
-+	struct ibmebus_dev *ibmebus_dev;
- 	u8 num_ports;
- 	int hw_level;
- 	struct list_head shca_list;
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 08:51:40.265936184 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 10:42:52.454956424 -0800
-@@ -123,7 +123,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 	/* register interrupt handlers and initialize work queues */
- 	if (type == EHCA_EQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
- 					  IRQF_DISABLED, "ehca_eq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -131,7 +131,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
- 	} else if (type == EHCA_NEQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
- 					  IRQF_DISABLED, "ehca_neq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -171,7 +171,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
- 	u64 h_ret;
- 
- 	spin_lock_irqsave(&eq->spinlock, flags);
--	ibmebus_free_irq(eq->ist, (void *)shca);
-+	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
- 
- 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
- 
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 08:51:40.267935880 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 10:58:15.135992904 -0800
-@@ -418,7 +418,7 @@ int ehca_init_device(struct ehca_shca *s
- 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
- 	shca->ib_device.phys_port_cnt       = shca->num_ports;
- 	shca->ib_device.num_comp_vectors    = 1;
--	shca->ib_device.dma_device          = &shca->ofdev->dev;
-+	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
- 	shca->ib_device.query_device        = ehca_query_device;
- 	shca->ib_device.query_port          = ehca_query_port;
- 	shca->ib_device.query_gid           = ehca_query_gid;
-@@ -672,7 +672,7 @@ static struct attribute_group ehca_dev_a
- 	.attrs = ehca_dev_attrs
- };
- 
--static int __devinit ehca_probe(struct of_device *dev,
-+static int __devinit ehca_probe(struct ibmebus_dev *dev,
- 				const struct of_device_id *id)
- {
- 	struct ehca_shca *shca;
-@@ -680,16 +680,16 @@ static int __devinit ehca_probe(struct o
- 	struct ib_pd *ibpd;
- 	int ret;
- 
--	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
-+	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
- 	if (!handle) {
- 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
- 	if (!(*handle)) {
- 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
-@@ -700,9 +700,9 @@ static int __devinit ehca_probe(struct o
- 	}
- 	mutex_init(&shca->modify_mutex);
- 
--	shca->ofdev = dev;
-+	shca->ibmebus_dev = dev;
- 	shca->ipz_hca_handle.handle = *handle;
--	dev->dev.driver_data = shca;
-+	dev->ofdev.dev.driver_data = shca;
- 
- 	ret = ehca_sense_attributes(shca);
- 	if (ret < 0) {
-@@ -778,7 +778,7 @@ static int __devinit ehca_probe(struct o
- 		}
- 	}
- 
--	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 	if (ret) /* only complain; we can live without attributes */
- 		ehca_err(&shca->ib_device,
- 			 "Cannot create device attributes  ret=%d", ret);
-@@ -828,12 +828,12 @@ probe1:
- 	return -EINVAL;
- }
- 
--static int __devexit ehca_remove(struct of_device *dev)
-+static int __devexit ehca_remove(struct ibmebus_dev *dev)
- {
--	struct ehca_shca *shca = dev->dev.driver_data;
-+	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
- 	int ret;
- 
--	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 
- 	if (ehca_open_aqp1 == 1) {
- 		int i;
-@@ -884,11 +884,11 @@ static struct of_device_id ehca_device_t
- 	{},
- };
- 
--static struct of_platform_driver ehca_driver = {
--	.name        = "ehca",
--	.match_table = ehca_device_table,
--	.probe       = ehca_probe,
--	.remove      = ehca_remove,
-+static struct ibmebus_driver ehca_driver = {
-+	.name     = "ehca",
-+	.id_table = ehca_device_table,
-+	.probe    = ehca_probe,
-+	.remove   = ehca_remove,
- };
- 
- void ehca_poll_eqs(unsigned long data)
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:08:21.000000000 +0200
+@@ -112,7 +112,7 @@ struct ehca_sport {
+ 
+ struct ehca_shca {
+ 	struct ib_device ib_device;
+-	struct of_device *ofdev;
++	struct ibmebus_dev *ibmebus_dev;
+ 	u8 num_ports;
+ 	int hw_level;
+ 	struct list_head shca_list;
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:08:21.000000000 +0200
+@@ -122,7 +122,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 	/* register interrupt handlers and initialize work queues */
+ 	if (type == EHCA_EQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
+ 					  IRQF_DISABLED, "ehca_eq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -130,7 +130,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
+ 	} else if (type == EHCA_NEQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
+ 					  IRQF_DISABLED, "ehca_neq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -170,7 +170,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
+ 	u64 h_ret;
+ 
+ 	spin_lock_irqsave(&eq->spinlock, flags);
+-	ibmebus_free_irq(eq->ist, (void *)shca);
++	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
+ 
+ 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
+ 
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:09:18.000000000 +0200
+@@ -289,8 +289,8 @@ static int ehca_sense_attributes(struct 
+ 	};
+ 
+ 	ehca_gen_dbg("Probing adapter %s...",
+-		     shca->ofdev->node->full_name);
+-	loc_code = of_get_property(shca->ofdev->node, "ibm,loc-code", NULL);
++		     shca->ibmebus_dev->ofdev.node->full_name);
++	loc_code = of_get_property(shca->ibmebus_dev->ofdev.node, "ibm,loc-code", NULL);
+ 	if (loc_code)
+ 		ehca_gen_dbg(" ... location lode=%s", loc_code);
+ 
+@@ -458,7 +458,7 @@ static int ehca_init_device(struct ehca_
+ 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
+ 	shca->ib_device.phys_port_cnt       = shca->num_ports;
+ 	shca->ib_device.num_comp_vectors    = 1;
+-	shca->ib_device.dma_device          = &shca->ofdev->dev;
++	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
+ 	shca->ib_device.query_device        = ehca_query_device;
+ 	shca->ib_device.query_port          = ehca_query_port;
+ 	shca->ib_device.query_gid           = ehca_query_gid;
+@@ -702,7 +702,7 @@ static struct attribute_group ehca_dev_a
+ 	.attrs = ehca_dev_attrs
+ };
+ 
+-static int __devinit ehca_probe(struct of_device *dev,
++static int __devinit ehca_probe(struct ibmebus_dev *dev,
+ 				const struct of_device_id *id)
+ {
+ 	struct ehca_shca *shca;
+@@ -710,16 +710,16 @@ static int __devinit ehca_probe(struct o
+ 	struct ib_pd *ibpd;
+ 	int ret, i, eq_size;
+ 
+-	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
++	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
+ 	if (!handle) {
+ 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+ 	if (!(*handle)) {
+ 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+@@ -734,9 +734,9 @@ static int __devinit ehca_probe(struct o
+ 	for (i = 0; i < ARRAY_SIZE(shca->sport); i++)
+ 		spin_lock_init(&shca->sport[i].mod_sqp_lock);
+ 
+-	shca->ofdev = dev;
++	shca->ibmebus_dev = dev;
+ 	shca->ipz_hca_handle.handle = *handle;
+-	dev->dev.driver_data = shca;
++	dev->ofdev.dev.driver_data = shca;
+ 
+ 	ret = ehca_sense_attributes(shca);
+ 	if (ret < 0) {
+@@ -813,7 +813,7 @@ static int __devinit ehca_probe(struct o
+ 		}
+ 	}
+ 
+-	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 	if (ret) /* only complain; we can live without attributes */
+ 		ehca_err(&shca->ib_device,
+ 			 "Cannot create device attributes  ret=%d", ret);
+@@ -863,12 +863,12 @@ probe1:
+ 	return -EINVAL;
+ }
+ 
+-static int __devexit ehca_remove(struct of_device *dev)
++static int __devexit ehca_remove(struct ibmebus_dev *dev)
+ {
+-	struct ehca_shca *shca = dev->dev.driver_data;
++	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
+ 	int ret;
+ 
+-	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 
+ 	if (ehca_open_aqp1 == 1) {
+ 		int i;
+@@ -919,11 +919,11 @@ static struct of_device_id ehca_device_t
+ 	{},
+ };
+ 
+-static struct of_platform_driver ehca_driver = {
+-	.name        = "ehca",
+-	.match_table = ehca_device_table,
+-	.probe       = ehca_probe,
+-	.remove      = ehca_remove,
++static struct ibmebus_driver ehca_driver = {
++	.name     = "ehca",
++	.id_table = ehca_device_table,
++	.probe    = ehca_probe,
++	.remove   = ehca_remove,
+ };
+ 
+ void ehca_poll_eqs(unsigned long data)
diff --git a/kernel_patches/backport/2.6.9_U6/backport_ehca_2_rhel45_umap.patch b/kernel_patches/backport/2.6.9_U6/backport_ehca_2_rhel45_umap.patch
index ff9b9e3..0f07b47 100644
--- a/kernel_patches/backport/2.6.9_U6/backport_ehca_2_rhel45_umap.patch
+++ b/kernel_patches/backport/2.6.9_U6/backport_ehca_2_rhel45_umap.patch
@@ -1,7 +1,7 @@
-diff -Nurp a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/ehca/ehca_classes.h
---- a/drivers/infiniband/hw/ehca/ehca_classes.h	2008-01-23 15:30:42.000000000 +0100
-+++ b/drivers/infiniband/hw/ehca/ehca_classes.h	2008-01-23 15:38:37.000000000 +0100
-@@ -179,10 +179,10 @@ struct ehca_qp {
+diff -Nurp ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_classes.h ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h
+--- ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:21:15.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:20:12.000000000 +0200
+@@ -183,10 +183,10 @@ struct ehca_qp {
  	/* array to cache modify_qp()'s parms for GSI/SMI qp */
  	struct ehca_mod_qp_parm *mod_qp_parm;
  	int mod_qp_parm_idx;
@@ -16,7 +16,7 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/e
  	/* unsolicited ack circumvention */
  	int unsol_ack_circ;
  	int mtu_shift;
-@@ -208,6 +208,8 @@ struct ehca_cq {
+@@ -212,15 +212,14 @@ struct ehca_cq {
  	struct ipz_cq_handle ipz_cq_handle;
  	struct ehca_pfcq pf;
  	spinlock_t cb_lock;
@@ -25,17 +25,16 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/e
  	struct hlist_head qp_hashtab[QP_HASHTAB_LEN];
  	struct list_head entry;
  	u32 nr_callbacks;   /* #events assigned to cpu by scaling code */
-@@ -215,9 +217,6 @@ struct ehca_cq {
+ 	atomic_t nr_events; /* #events seen */
  	wait_queue_head_t wait_completion;
  	spinlock_t task_lock;
- 	u32 ownpid;
 -	/* mmap counter for resources mapped into user space */
 -	u32 mm_count_queue;
 -	u32 mm_count_galpa;
  };
  
  enum ehca_mr_flag {
-@@ -320,6 +319,20 @@ struct ehca_ucontext {
+@@ -323,6 +322,20 @@ struct ehca_ucontext {
  	struct ib_ucontext ib_ucontext;
  };
  
@@ -56,15 +55,15 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/e
  int ehca_init_pd_cache(void);
  void ehca_cleanup_pd_cache(void);
  int ehca_init_cq_cache(void);
-@@ -345,6 +358,7 @@ extern int ehca_scaling_code;
- extern int ehca_nr_ports;
+@@ -351,6 +364,7 @@ extern int ehca_max_cq;
+ extern int ehca_max_qp;
  
  struct ipzu_queue_resp {
 +	u64 queue;        /* points to first queue entry */
  	u32 qe_size;      /* queue entry size */
  	u32 act_nr_of_sg;
  	u32 queue_length; /* queue length allocated in bytes */
-@@ -357,6 +371,7 @@ struct ehca_create_cq_resp {
+@@ -363,6 +377,7 @@ struct ehca_create_cq_resp {
  	u32 cq_number;
  	u32 token;
  	struct ipzu_queue_resp ipz_queue;
@@ -72,7 +71,7 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/e
  	u32 fw_handle_ofs;
  	u32 dummy;
  };
-@@ -373,6 +388,7 @@ struct ehca_create_qp_resp {
+@@ -379,6 +394,7 @@ struct ehca_create_qp_resp {
  	u32 dummy;
  	struct ipzu_queue_resp ipz_squeue;
  	struct ipzu_queue_resp ipz_rqueue;
@@ -80,10 +79,10 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/e
  };
  
  struct ehca_alloc_cq_parms {
-diff -Nurp a/drivers/infiniband/hw/ehca/ehca_cq.c b/drivers/infiniband/hw/ehca/ehca_cq.c
---- a/drivers/infiniband/hw/ehca/ehca_cq.c	2008-01-23 15:30:42.000000000 +0100
-+++ b/drivers/infiniband/hw/ehca/ehca_cq.c	2008-01-23 15:38:37.000000000 +0100
-@@ -273,6 +273,7 @@ struct ib_cq *ehca_create_cq(struct ib_d
+diff -Nurp ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_cq.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_cq.c
+--- ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_cq.c	2008-05-02 22:21:16.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_cq.c	2008-05-02 22:20:12.000000000 +0200
+@@ -279,6 +279,7 @@ struct ib_cq *ehca_create_cq(struct ib_d
  	if (context) {
  		struct ipz_queue *ipz_queue = &my_cq->ipz_queue;
  		struct ehca_create_cq_resp resp;
@@ -91,7 +90,7 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_cq.c b/drivers/infiniband/hw/ehca/e
  		memset(&resp, 0, sizeof(resp));
  		resp.cq_number = my_cq->cq_number;
  		resp.token = my_cq->token;
-@@ -281,16 +282,42 @@ struct ib_cq *ehca_create_cq(struct ib_d
+@@ -287,16 +288,42 @@ struct ib_cq *ehca_create_cq(struct ib_d
  		resp.ipz_queue.queue_length = ipz_queue->queue_length;
  		resp.ipz_queue.pagesize = ipz_queue->pagesize;
  		resp.ipz_queue.toggle_state = ipz_queue->toggle_state;
@@ -135,7 +134,7 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_cq.c b/drivers/infiniband/hw/ehca/e
  create_cq_exit4:
  	ipz_queue_dtor(NULL, &my_cq->ipz_queue);
  
-@@ -314,6 +341,7 @@ create_cq_exit1:
+@@ -321,6 +348,7 @@ create_cq_exit1:
  int ehca_destroy_cq(struct ib_cq *cq)
  {
  	u64 h_ret;
@@ -143,8 +142,8 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_cq.c b/drivers/infiniband/hw/ehca/e
  	struct ehca_cq *my_cq = container_of(cq, struct ehca_cq, ib_cq);
  	int cq_num = my_cq->cq_number;
  	struct ib_device *device = cq->device;
-@@ -323,20 +351,6 @@ int ehca_destroy_cq(struct ib_cq *cq)
- 	u32 cur_pid = current->tgid;
+@@ -329,14 +357,6 @@ int ehca_destroy_cq(struct ib_cq *cq)
+ 	struct ipz_adapter_handle adapter_handle = shca->ipz_hca_handle;
  	unsigned long flags;
  
 -	if (cq->uobject) {
@@ -153,28 +152,16 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_cq.c b/drivers/infiniband/hw/ehca/e
 -				 "user space cq_num=%x", my_cq->cq_number);
 -			return -EINVAL;
 -		}
--		if (my_cq->ownpid != cur_pid) {
--			ehca_err(device, "Invalid caller pid=%x ownpid=%x "
--				 "cq_num=%x",
--				 cur_pid, my_cq->ownpid, my_cq->cq_number);
--			return -EINVAL;
--		}
 -	}
 -
  	/*
  	 * remove the CQ from the idr first to make sure
  	 * no more interrupt tasklets will touch this CQ
-@@ -349,6 +363,26 @@ int ehca_destroy_cq(struct ib_cq *cq)
+@@ -349,6 +369,20 @@ int ehca_destroy_cq(struct ib_cq *cq)
  	wait_event(my_cq->wait_completion, !atomic_read(&my_cq->nr_events));
  
  	/* nobody's using our CQ any longer -- we can destroy it */
 +
-+	if (my_cq->uspace_queue && my_cq->ownpid != cur_pid) {
-+		ehca_err(device, "Invalid caller pid=%x ownpid=%x",
-+			 cur_pid, my_cq->ownpid);
-+		return -EINVAL;
-+	}
-+
 +	/* un-mmap if vma alloc */
 +	if (my_cq->uspace_queue ) {
 +		ret = ehca_munmap(my_cq->uspace_queue,
@@ -191,19 +178,10 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_cq.c b/drivers/infiniband/hw/ehca/e
  	h_ret = hipz_h_destroy_cq(adapter_handle, my_cq, 0);
  	if (h_ret == H_R_STATE) {
  		/* cq in err: read err data and destroy it forcibly */
-@@ -377,7 +411,7 @@ int ehca_resize_cq(struct ib_cq *cq, int
- 	struct ehca_cq *my_cq = container_of(cq, struct ehca_cq, ib_cq);
- 	u32 cur_pid = current->tgid;
- 
--	if (cq->uobject && my_cq->ownpid != cur_pid) {
-+	if (my_cq->uspace_queue && my_cq->ownpid != cur_pid) {
- 		ehca_err(cq->device, "Invalid caller pid=%x ownpid=%x",
- 			 cur_pid, my_cq->ownpid);
- 		return -EINVAL;
-diff -Nurp a/drivers/infiniband/hw/ehca/ehca_iverbs.h b/drivers/infiniband/hw/ehca/ehca_iverbs.h
---- a/drivers/infiniband/hw/ehca/ehca_iverbs.h	2008-01-23 15:30:42.000000000 +0100
-+++ b/drivers/infiniband/hw/ehca/ehca_iverbs.h	2008-01-23 15:38:37.000000000 +0100
-@@ -192,6 +192,14 @@ void ehca_poll_eqs(unsigned long data);
+diff -Nurp ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_iverbs.h ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_iverbs.h
+--- ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_iverbs.h	2008-05-02 22:21:15.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_iverbs.h	2008-05-02 22:20:12.000000000 +0200
+@@ -197,6 +197,14 @@ void ehca_poll_eqs(unsigned long data);
  int ehca_calc_ipd(struct ehca_shca *shca, int port,
  		  enum ib_rate path_rate, u32 *ipd);
  
@@ -218,10 +196,10 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_iverbs.h b/drivers/infiniband/hw/eh
  #ifdef CONFIG_PPC_64K_PAGES
  void *ehca_alloc_fw_ctrlblock(gfp_t flags);
  void ehca_free_fw_ctrlblock(void *ptr);
-diff -Nurp a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c
---- a/drivers/infiniband/hw/ehca/ehca_main.c	2008-01-23 15:30:42.000000000 +0100
-+++ b/drivers/infiniband/hw/ehca/ehca_main.c	2008-01-23 15:38:37.000000000 +0100
-@@ -394,7 +394,7 @@ int ehca_init_device(struct ehca_shca *s
+diff -Nurp ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_main.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c
+--- ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:21:16.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:20:12.000000000 +0200
+@@ -436,7 +436,7 @@ static int ehca_init_device(struct ehca_
  	strlcpy(shca->ib_device.name, "ehca%d", IB_DEVICE_NAME_MAX);
  	shca->ib_device.owner               = THIS_MODULE;
  
@@ -230,10 +208,10 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca
  	shca->ib_device.uverbs_cmd_mask	    =
  		(1ull << IB_USER_VERBS_CMD_GET_CONTEXT)		|
  		(1ull << IB_USER_VERBS_CMD_QUERY_DEVICE)	|
-diff -Nurp a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/ehca_qp.c
---- a/drivers/infiniband/hw/ehca/ehca_qp.c	2008-01-23 15:30:42.000000000 +0100
-+++ b/drivers/infiniband/hw/ehca/ehca_qp.c	2008-01-23 15:38:37.000000000 +0100
-@@ -265,15 +265,19 @@ static inline int ibqptype2servicetype(e
+diff -Nurp ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_qp.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_qp.c
+--- ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_qp.c	2008-05-02 22:21:16.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_qp.c	2008-05-02 22:20:12.000000000 +0200
+@@ -262,15 +262,19 @@ static inline int ibqptype2servicetype(e
  /*
   * init userspace queue info from ipz_queue data
   */
@@ -255,7 +233,7 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/e
  }
  
  /*
-@@ -773,6 +777,7 @@ static struct ehca_qp *internal_create_q
+@@ -789,6 +793,7 @@ static struct ehca_qp *internal_create_q
  	/* copy queues, galpa data to user space */
  	if (context && udata) {
  		struct ehca_create_qp_resp resp;
@@ -263,7 +241,7 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/e
  		memset(&resp, 0, sizeof(resp));
  
  		resp.qp_num = my_qp->real_qp_num;
-@@ -782,22 +787,55 @@ static struct ehca_qp *internal_create_q
+@@ -798,22 +803,55 @@ static struct ehca_qp *internal_create_q
  		resp.qkey = my_qp->qkey;
  		resp.real_qp_num = my_qp->real_qp_num;
  
@@ -326,7 +304,7 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/e
  create_qp_exit6:
  	ehca_cq_unassign_qp(my_qp->send_cq, my_qp->real_qp_num);
  
-@@ -1157,7 +1195,7 @@ static int internal_modify_qp(struct ib_
+@@ -1174,7 +1212,7 @@ static int internal_modify_qp(struct ib_
  	     my_qp->qp_type == IB_QPT_SMI) &&
  	    statetrans == IB_QPST_SQE2RTS) {
  		/* mark next free wqe if kernel */
@@ -335,7 +313,7 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/e
  			struct ehca_wqe *wqe;
  			/* lock send queue */
  			spin_lock_irqsave(&my_qp->spinlock_s, flags);
-@@ -1927,18 +1965,11 @@ static int internal_destroy_qp(struct ib
+@@ -1906,15 +1944,6 @@ static int internal_destroy_qp(struct ib
  	enum ib_qp_type	qp_type;
  	unsigned long flags;
  
@@ -346,20 +324,12 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/e
 -				 "user space qp_num=%x", qp_num);
 -			return -EINVAL;
 -		}
--		if (my_pd->ownpid != cur_pid) {
--			ehca_err(dev, "Invalid caller pid=%x ownpid=%x",
--				 cur_pid, my_pd->ownpid);
--			return -EINVAL;
--		}
-+	if (my_pd->ib_pd.uobject && my_pd->ib_pd.uobject->context &&
-+	    my_pd->ownpid != cur_pid) {
-+		ehca_err(dev, "Invalid caller pid=%x ownpid=%x",
-+			 cur_pid, my_pd->ownpid);
-+		return -EINVAL;
- 	}
- 
+-	}
+-
  	if (my_qp->send_cq) {
-@@ -1955,6 +1986,24 @@ static int internal_destroy_qp(struct ib
+ 		ret = ehca_cq_unassign_qp(my_qp->send_cq, qp_num);
+ 		if (ret) {
+@@ -1929,6 +1958,24 @@ static int internal_destroy_qp(struct ib
  	idr_remove(&ehca_qp_idr, my_qp->token);
  	write_unlock_irqrestore(&ehca_qp_idr_lock, flags);
  
@@ -384,10 +354,10 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_qp.c b/drivers/infiniband/hw/ehca/e
  	h_ret = hipz_h_destroy_qp(shca->ipz_hca_handle, my_qp);
  	if (h_ret != H_SUCCESS) {
  		ehca_err(dev, "hipz_h_destroy_qp() failed h_ret=%li "
-diff -Nurp a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/ehca/ehca_uverbs.c
---- a/drivers/infiniband/hw/ehca/ehca_uverbs.c	2008-01-23 15:30:42.000000000 +0100
-+++ b/drivers/infiniband/hw/ehca/ehca_uverbs.c	2008-01-23 15:38:37.000000000 +0100
-@@ -68,184 +68,104 @@ int ehca_dealloc_ucontext(struct ib_ucon
+diff -Nurp ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_uverbs.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_uverbs.c
+--- ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_uverbs.c	2008-05-02 22:21:15.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_uverbs.c	2008-05-02 22:23:06.000000000 +0200
+@@ -66,183 +66,88 @@ int ehca_dealloc_ucontext(struct ib_ucon
  	return 0;
  }
  
@@ -420,13 +390,89 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/eh
 -	(*count)--;
 -	ehca_gen_dbg("vm_start=%lx vm_end=%lx count=%x",
 -		     vma->vm_start, vma->vm_end, *count);
--}
++	struct page *mypage = NULL;
++	u64 fileoffset = vma->vm_pgoff << PAGE_SHIFT;
++	u32 idr_handle = fileoffset >> 32;
++	u32 q_type = (fileoffset >> 28) & 0xF;	  /* CQ, QP,...        */
++	u32 rsrc_type = (fileoffset >> 24) & 0xF; /* sq,rq,cmnd_window */
++	unsigned long flags;
++	struct ehca_cq *cq;
++	struct ehca_qp *qp;
++	u64 offset;
++	void *vaddr;
++  
++	switch (q_type) {
++	case 1: /* CQ */
++		spin_lock_irqsave(&ehca_cq_idr_lock, flags);
++		cq = idr_find(&ehca_cq_idr, idr_handle);
++		spin_unlock_irqrestore(&ehca_cq_idr_lock, flags);
++  
++		/* make sure this mmap really belongs to the authorized user */
++		if (!cq) {
++			ehca_gen_err("cq is NULL ret=NOPAGE_SIGBUS");
++			return NOPAGE_SIGBUS;
++  		}
++    
++		if (rsrc_type == 2) {
++			ehca_dbg(cq->ib_cq.device, "cq=%p cq queuearea", cq);
++			offset = address - vma->vm_start;
++			vaddr = ipz_qeit_calc(&cq->ipz_queue, offset);
++			ehca_dbg(cq->ib_cq.device, "offset=%lx vaddr=%p",
++				 offset, vaddr);
++			mypage = virt_to_page(vaddr);
++  		}
++  		break;
++  
++	case 2: /* QP */
++		spin_lock_irqsave(&ehca_qp_idr_lock, flags);
++		qp = idr_find(&ehca_qp_idr, idr_handle);
++		spin_unlock_irqrestore(&ehca_qp_idr_lock, flags);
++  
++		/* make sure this mmap really belongs to the authorized user */
++		if (!qp) {
++			ehca_gen_err("qp is NULL ret=NOPAGE_SIGBUS");
++			return NOPAGE_SIGBUS;
++  		}
++  
++		if (rsrc_type == 2) {	/* rqueue */
++			ehca_dbg(qp->ib_qp.device, "qp=%p qp rqueuearea", qp);
++			offset = address - vma->vm_start;
++			vaddr = ipz_qeit_calc(&qp->ipz_rqueue, offset);
++			ehca_dbg(qp->ib_qp.device, "offset=%lx vaddr=%p",
++				 offset, vaddr);
++			mypage = virt_to_page(vaddr);
++		} else if (rsrc_type == 3) {	/* squeue */
++			ehca_dbg(qp->ib_qp.device, "qp=%p qp squeuearea", qp);
++			offset = address - vma->vm_start;
++			vaddr = ipz_qeit_calc(&qp->ipz_squeue, offset);
++			ehca_dbg(qp->ib_qp.device, "offset=%lx vaddr=%p",
++				 offset, vaddr);
++			mypage = virt_to_page(vaddr);
++  		}
++  		break;
++  
++  	default:
++		ehca_gen_err("bad queue type %x", q_type);
++		return NOPAGE_SIGBUS;
++  	}
++  
++	if (!mypage) {
++		ehca_gen_err("Invalid page adr==NULL ret=NOPAGE_SIGBUS");
++		return NOPAGE_SIGBUS;
++  	}
++	get_page(mypage);
++  
++	return mypage;
+ }
 -
 -static struct vm_operations_struct vm_ops = {
 -	.open =	ehca_mm_open,
 -	.close = ehca_mm_close,
--};
--
++  
++static struct vm_operations_struct ehcau_vm_ops = {
++	.nopage = ehca_nopage,
+ };
+ 
 -static int ehca_mmap_fw(struct vm_area_struct *vma, struct h_galpas *galpas,
 -			u32 *mm_count)
 -{
@@ -479,37 +525,15 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/eh
 -	vma->vm_private_data = mm_count;
 -	(*mm_count)++;
 -	vma->vm_ops = &vm_ops;
-+	struct page *mypage = NULL;
-+	u64 fileoffset = vma->vm_pgoff << PAGE_SHIFT;
-+	u32 idr_handle = fileoffset >> 32;
-+	u32 q_type = (fileoffset >> 28) & 0xF;	  /* CQ, QP,...        */
-+	u32 rsrc_type = (fileoffset >> 24) & 0xF; /* sq,rq,cmnd_window */
-+	u32 cur_pid = current->tgid;
-+	unsigned long flags;
-+	struct ehca_cq *cq;
-+	struct ehca_qp *qp;
-+	struct ehca_pd *pd;
-+	u64 offset;
-+	void *vaddr;
- 
+-
 -	return 0;
 -}
-+	switch (q_type) {
-+	case 1: /* CQ */
-+		spin_lock_irqsave(&ehca_cq_idr_lock, flags);
-+		cq = idr_find(&ehca_cq_idr, idr_handle);
-+		spin_unlock_irqrestore(&ehca_cq_idr_lock, flags);
- 
+-
 -static int ehca_mmap_cq(struct vm_area_struct *vma, struct ehca_cq *cq,
 -			u32 rsrc_type)
 -{
 -	int ret;
-+		/* make sure this mmap really belongs to the authorized user */
-+		if (!cq) {
-+			ehca_gen_err("cq is NULL ret=NOPAGE_SIGBUS");
-+			return NOPAGE_SIGBUS;
-+  		}
- 
+-
 -	switch (rsrc_type) {
 -	case 0: /* galpa fw handle */
 -		ehca_dbg(cq->ib_cq.device, "cq_num=%x fw", cq->cq_number);
@@ -521,13 +545,7 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/eh
 -			return ret;
 -		}
 -		break;
-+		if (cq->ownpid != cur_pid) {
-+  			ehca_err(cq->ib_cq.device,
-+				 "Invalid caller pid=%x ownpid=%x",
-+				 cur_pid, cq->ownpid);
-+			return NOPAGE_SIGBUS;
-+  		}
- 
+-
 -	case 1: /* cq queue_addr */
 -		ehca_dbg(cq->ib_cq.device, "cq_num=%x queue", cq->cq_number);
 -		ret = ehca_mmap_queue(vma, &cq->ipz_queue, &cq->mm_count_queue);
@@ -538,46 +556,21 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/eh
 -			return ret;
 -		}
 -		break;
-+		if (rsrc_type == 2) {
-+			ehca_dbg(cq->ib_cq.device, "cq=%p cq queuearea", cq);
-+			offset = address - vma->vm_start;
-+			vaddr = ipz_qeit_calc(&cq->ipz_queue, offset);
-+			ehca_dbg(cq->ib_cq.device, "offset=%lx vaddr=%p",
-+				 offset, vaddr);
-+			mypage = virt_to_page(vaddr);
-+  		}
-+  		break;
- 
+-
 -	default:
 -		ehca_err(cq->ib_cq.device, "bad resource type=%x cq_num=%x",
 -			 rsrc_type, cq->cq_number);
 -		return -EINVAL;
 -	}
-+	case 2: /* QP */
-+		spin_lock_irqsave(&ehca_qp_idr_lock, flags);
-+		qp = idr_find(&ehca_qp_idr, idr_handle);
-+		spin_unlock_irqrestore(&ehca_qp_idr_lock, flags);
- 
+-
 -	return 0;
 -}
-+		/* make sure this mmap really belongs to the authorized user */
-+		if (!qp) {
-+			ehca_gen_err("qp is NULL ret=NOPAGE_SIGBUS");
-+			return NOPAGE_SIGBUS;
-+  		}
- 
+-
 -static int ehca_mmap_qp(struct vm_area_struct *vma, struct ehca_qp *qp,
 -			u32 rsrc_type)
 -{
 -	int ret;
-+		pd = container_of(qp->ib_qp.pd, struct ehca_pd, ib_pd);
-+		if (pd->ownpid != cur_pid) {
-+  			ehca_err(qp->ib_qp.device,
-+				 "Invalid caller pid=%x ownpid=%x",
-+				 cur_pid, pd->ownpid);
-+			return NOPAGE_SIGBUS;
-+  		}
- 
+-
 -	switch (rsrc_type) {
 -	case 0: /* galpa fw handle */
 -		ehca_dbg(qp->ib_qp.device, "qp_num=%x fw", qp->ib_qp.qp_num);
@@ -589,26 +582,9 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/eh
 -			return -ENOMEM;
 -		}
 -		break;
-+		if (rsrc_type == 2) {	/* rqueue */
-+			ehca_dbg(qp->ib_qp.device, "qp=%p qp rqueuearea", qp);
-+			offset = address - vma->vm_start;
-+			vaddr = ipz_qeit_calc(&qp->ipz_rqueue, offset);
-+			ehca_dbg(qp->ib_qp.device, "offset=%lx vaddr=%p",
-+				 offset, vaddr);
-+			mypage = virt_to_page(vaddr);
-+		} else if (rsrc_type == 3) {	/* squeue */
-+			ehca_dbg(qp->ib_qp.device, "qp=%p qp squeuearea", qp);
-+			offset = address - vma->vm_start;
-+			vaddr = ipz_qeit_calc(&qp->ipz_squeue, offset);
-+			ehca_dbg(qp->ib_qp.device, "offset=%lx vaddr=%p",
-+				 offset, vaddr);
-+			mypage = virt_to_page(vaddr);
-+  		}
-+  		break;
- 
+-
 -	case 1: /* qp rqueue_addr */
--		ehca_dbg(qp->ib_qp.device, "qp_num=%x rqueue",
--			 qp->ib_qp.qp_num);
+-		ehca_dbg(qp->ib_qp.device, "qp_num=%x rq", qp->ib_qp.qp_num);
 -		ret = ehca_mmap_queue(vma, &qp->ipz_rqueue,
 -				      &qp->mm_count_rqueue);
 -		if (unlikely(ret)) {
@@ -618,14 +594,9 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/eh
 -			return ret;
 -		}
 -		break;
-+  	default:
-+		ehca_gen_err("bad queue type %x", q_type);
-+		return NOPAGE_SIGBUS;
-+  	}
- 
+-
 -	case 2: /* qp squeue_addr */
--		ehca_dbg(qp->ib_qp.device, "qp_num=%x squeue",
--			 qp->ib_qp.qp_num);
+-		ehca_dbg(qp->ib_qp.device, "qp_num=%x sq", qp->ib_qp.qp_num);
 -		ret = ehca_mmap_queue(vma, &qp->ipz_squeue,
 -				      &qp->mm_count_squeue);
 -		if (unlikely(ret)) {
@@ -635,37 +606,28 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/eh
 -			return ret;
 -		}
 -		break;
-+	if (!mypage) {
-+		ehca_gen_err("Invalid page adr==NULL ret=NOPAGE_SIGBUS");
-+		return NOPAGE_SIGBUS;
-+  	}
-+	get_page(mypage);
- 
+-
 -	default:
 -		ehca_err(qp->ib_qp.device, "bad resource type=%x qp=num=%x",
 -			 rsrc_type, qp->ib_qp.qp_num);
 -		return -EINVAL;
 -	}
-+	return mypage;
-+  }
- 
+-
 -	return 0;
 -}
-+static struct vm_operations_struct ehcau_vm_ops = {
-+	.nopage = ehca_nopage,
-+};
- 
+-
  int ehca_mmap(struct ib_ucontext *context, struct vm_area_struct *vma)
  {
-@@ -255,6 +175,7 @@ int ehca_mmap(struct ib_ucontext *contex
+ 	u64 fileoffset = vma->vm_pgoff;
+@@ -250,6 +155,7 @@ int ehca_mmap(struct ib_ucontext *contex
+ 	u32 q_type = (fileoffset >> 27) & 0x1;	  /* CQ, QP,...        */
  	u32 rsrc_type = (fileoffset >> 25) & 0x3; /* sq,rq,cmnd_window */
- 	u32 cur_pid = current->tgid;
  	u32 ret;
 + 	u64 vsize, physical;
  	struct ehca_cq *cq;
  	struct ehca_qp *qp;
- 	struct ehca_pd *pd;
-@@ -280,12 +201,44 @@ int ehca_mmap(struct ib_ucontext *contex
+ 	struct ib_uobject *uobject;
+@@ -267,12 +173,44 @@ int ehca_mmap(struct ib_ucontext *contex
  		if (!cq->ib_cq.uobject || cq->ib_cq.uobject->context != context)
  			return -EINVAL;
  
@@ -716,7 +678,7 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/eh
  		}
  		break;
  
-@@ -310,12 +263,50 @@ int ehca_mmap(struct ib_ucontext *contex
+@@ -289,12 +227,50 @@ int ehca_mmap(struct ib_ucontext *contex
  		if (!uobject || uobject->context != context)
  			return -EINVAL;
  
@@ -773,7 +735,7 @@ diff -Nurp a/drivers/infiniband/hw/ehca/ehca_uverbs.c b/drivers/infiniband/hw/eh
  		}
  		break;
  
-@@ -326,3 +317,77 @@ int ehca_mmap(struct ib_ucontext *contex
+@@ -305,3 +281,77 @@ int ehca_mmap(struct ib_ucontext *contex
  
  	return 0;
  }
diff --git a/kernel_patches/backport/2.6.9_U6/backport_ehca_3_rhel45_dma.patch b/kernel_patches/backport/2.6.9_U6/backport_ehca_3_rhel45_dma.patch
index ce76861..39c0ebd 100644
--- a/kernel_patches/backport/2.6.9_U6/backport_ehca_3_rhel45_dma.patch
+++ b/kernel_patches/backport/2.6.9_U6/backport_ehca_3_rhel45_dma.patch
@@ -1,6 +1,6 @@
-diff -Nurp ofa_kernel-1.2_orig/drivers/infiniband/hw/ehca/ehca_dma.c ofa_kernel-1.2_new/drivers/infiniband/hw/ehca/ehca_dma.c
---- ofa_kernel-1.2_orig/drivers/infiniband/hw/ehca/ehca_dma.c	1970-01-01 01:00:00.000000000 +0100
-+++ ofa_kernel-1.2_new/drivers/infiniband/hw/ehca/ehca_dma.c	2007-05-03 16:25:30.000000000 +0200
+diff -Nurp ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_dma.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_dma.c
+--- ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_dma.c	1970-01-01 01:00:00.000000000 +0100
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_dma.c	2008-05-02 22:07:06.000000000 +0200
 @@ -0,0 +1,194 @@
 +/*
 + *  IBM eServer eHCA Infiniband device driver for Linux on POWER
@@ -196,31 +196,32 @@ diff -Nurp ofa_kernel-1.2_orig/drivers/infiniband/hw/ehca/ehca_dma.c ofa_kernel-
 +{
 +	ibmebus_free_coherent(dev, size, cpu_addr, dma_handle);
 +}
-diff -Nurp ofa_kernel-1.2_orig/drivers/infiniband/hw/ehca/ehca_main.c ofa_kernel-1.2_new/drivers/infiniband/hw/ehca/ehca_main.c
---- ofa_kernel-1.2_orig/drivers/infiniband/hw/ehca/ehca_main.c	2007-04-29 15:10:56.000000000 +0200
-+++ ofa_kernel-1.2_new/drivers/infiniband/hw/ehca/ehca_main.c	2007-05-03 16:19:28.000000000 +0200
-@@ -279,6 +279,7 @@ init_node_guid1:
+diff -Nurp ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_main.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c
+--- ofa_kernel-1.3/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:11:30.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:07:49.000000000 +0200
+@@ -427,6 +427,7 @@ init_node_guid1:
  
- int ehca_init_device(struct ehca_shca *shca)
+ static int ehca_init_device(struct ehca_shca *shca)
  {
 +	extern struct ib_dma_mapping_ops ehca_dma_mapping_ops;
  	int ret;
  
  	ret = init_node_guid(shca);
-@@ -354,6 +355,7 @@ int ehca_init_device(struct ehca_shca *s
+@@ -503,6 +504,7 @@ static int ehca_init_device(struct ehca_
  	shca->ib_device.detach_mcast	    = ehca_detach_mcast;
- 	/* shca->ib_device.process_mad	    = ehca_process_mad;	    */
+ 	shca->ib_device.process_mad	    = ehca_process_mad;
  	shca->ib_device.mmap		    = ehca_mmap;
 +	shca->ib_device.dma_ops             = &ehca_dma_mapping_ops;
  
- 	return ret;
- }
-diff -Nurp ofa_kernel-1.2_orig/drivers/infiniband/hw/ehca/Makefile ofa_kernel-1.2_new/drivers/infiniband/hw/ehca/Makefile
---- ofa_kernel-1.2_orig/drivers/infiniband/hw/ehca/Makefile	2007-04-29 15:10:56.000000000 +0200
-+++ ofa_kernel-1.2_new/drivers/infiniband/hw/ehca/Makefile	2007-05-03 16:26:13.000000000 +0200
+ 	if (EHCA_BMASK_GET(HCA_CAP_SRQ, shca->hca_cap)) {
+ 		shca->ib_device.uverbs_cmd_mask |=
+diff -Nurp ofa_kernel-1.3/drivers/infiniband/hw/ehca/Makefile ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/Makefile
+--- ofa_kernel-1.3/drivers/infiniband/hw/ehca/Makefile	2008-05-02 15:01:48.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/Makefile	2008-05-02 22:07:06.000000000 +0200
 @@ -12,5 +12,5 @@ obj-$(CONFIG_INFINIBAND_EHCA) += ib_ehca
  
  ib_ehca-objs  = ehca_main.o ehca_hca.o ehca_mcast.o ehca_pd.o ehca_av.o ehca_eq.o \
  		ehca_cq.o ehca_qp.o ehca_sqp.o ehca_mrmw.o ehca_reqs.o ehca_irq.o \
 -		ehca_uverbs.o ipz_pt_fn.o hcp_if.o hcp_phyp.o
 +		ehca_uverbs.o ehca_dma.o ipz_pt_fn.o hcp_if.o hcp_phyp.o
+ 
diff --git a/kernel_patches/backport/2.6.9_U6/ehca_01_ibmebus_loc_code.patch b/kernel_patches/backport/2.6.9_U6/ehca_01_ibmebus_loc_code.patch
index 40054fa..52a91fa 100644
--- a/kernel_patches/backport/2.6.9_U6/ehca_01_ibmebus_loc_code.patch
+++ b/kernel_patches/backport/2.6.9_U6/ehca_01_ibmebus_loc_code.patch
@@ -1,137 +1,148 @@
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 08:51:40.264936336 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_classes.h	2007-10-30 10:39:52.595875776 -0800
-@@ -107,7 +107,7 @@ struct ehca_sport {
- 
- struct ehca_shca {
- 	struct ib_device ib_device;
--	struct of_device *ofdev;
-+	struct ibmebus_dev *ibmebus_dev;
- 	u8 num_ports;
- 	int hw_level;
- 	struct list_head shca_list;
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 08:51:40.265936184 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_eq.c	2007-10-30 10:42:52.454956424 -0800
-@@ -123,7 +123,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 	/* register interrupt handlers and initialize work queues */
- 	if (type == EHCA_EQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
- 					  IRQF_DISABLED, "ehca_eq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -131,7 +131,7 @@ int ehca_create_eq(struct ehca_shca *shc
- 
- 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
- 	} else if (type == EHCA_NEQ) {
--		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
-+		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
- 					  IRQF_DISABLED, "ehca_neq",
- 					  (void *)shca);
- 		if (ret < 0)
-@@ -171,7 +171,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
- 	u64 h_ret;
- 
- 	spin_lock_irqsave(&eq->spinlock, flags);
--	ibmebus_free_irq(eq->ist, (void *)shca);
-+	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
- 
- 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
- 
-diff -Nurp linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c
---- linux-2.6_old/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 08:51:40.267935880 -0800
-+++ linux-2.6_new/drivers/infiniband/hw/ehca/ehca_main.c	2007-10-30 10:58:15.135992904 -0800
-@@ -418,7 +418,7 @@ int ehca_init_device(struct ehca_shca *s
- 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
- 	shca->ib_device.phys_port_cnt       = shca->num_ports;
- 	shca->ib_device.num_comp_vectors    = 1;
--	shca->ib_device.dma_device          = &shca->ofdev->dev;
-+	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
- 	shca->ib_device.query_device        = ehca_query_device;
- 	shca->ib_device.query_port          = ehca_query_port;
- 	shca->ib_device.query_gid           = ehca_query_gid;
-@@ -672,7 +672,7 @@ static struct attribute_group ehca_dev_a
- 	.attrs = ehca_dev_attrs
- };
- 
--static int __devinit ehca_probe(struct of_device *dev,
-+static int __devinit ehca_probe(struct ibmebus_dev *dev,
- 				const struct of_device_id *id)
- {
- 	struct ehca_shca *shca;
-@@ -680,16 +680,16 @@ static int __devinit ehca_probe(struct o
- 	struct ib_pd *ibpd;
- 	int ret;
- 
--	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
-+	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
- 	if (!handle) {
- 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
- 	if (!(*handle)) {
- 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
--			     dev->node->full_name);
-+			     dev->ofdev.node->full_name);
- 		return -ENODEV;
- 	}
- 
-@@ -700,9 +700,9 @@ static int __devinit ehca_probe(struct o
- 	}
- 	mutex_init(&shca->modify_mutex);
- 
--	shca->ofdev = dev;
-+	shca->ibmebus_dev = dev;
- 	shca->ipz_hca_handle.handle = *handle;
--	dev->dev.driver_data = shca;
-+	dev->ofdev.dev.driver_data = shca;
- 
- 	ret = ehca_sense_attributes(shca);
- 	if (ret < 0) {
-@@ -778,7 +778,7 @@ static int __devinit ehca_probe(struct o
- 		}
- 	}
- 
--	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 	if (ret) /* only complain; we can live without attributes */
- 		ehca_err(&shca->ib_device,
- 			 "Cannot create device attributes  ret=%d", ret);
-@@ -828,12 +828,12 @@ probe1:
- 	return -EINVAL;
- }
- 
--static int __devexit ehca_remove(struct of_device *dev)
-+static int __devexit ehca_remove(struct ibmebus_dev *dev)
- {
--	struct ehca_shca *shca = dev->dev.driver_data;
-+	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
- 	int ret;
- 
--	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
-+	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
- 
- 	if (ehca_open_aqp1 == 1) {
- 		int i;
-@@ -884,11 +884,11 @@ static struct of_device_id ehca_device_t
- 	{},
- };
- 
--static struct of_platform_driver ehca_driver = {
--	.name        = "ehca",
--	.match_table = ehca_device_table,
--	.probe       = ehca_probe,
--	.remove      = ehca_remove,
-+static struct ibmebus_driver ehca_driver = {
-+	.name     = "ehca",
-+	.id_table = ehca_device_table,
-+	.probe    = ehca_probe,
-+	.remove   = ehca_remove,
- };
- 
- void ehca_poll_eqs(unsigned long data)
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_classes.h	2008-05-02 22:08:21.000000000 +0200
+@@ -112,7 +112,7 @@ struct ehca_sport {
+ 
+ struct ehca_shca {
+ 	struct ib_device ib_device;
+-	struct of_device *ofdev;
++	struct ibmebus_dev *ibmebus_dev;
+ 	u8 num_ports;
+ 	int hw_level;
+ 	struct list_head shca_list;
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_eq.c	2008-05-02 22:08:21.000000000 +0200
+@@ -122,7 +122,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 	/* register interrupt handlers and initialize work queues */
+ 	if (type == EHCA_EQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_eq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_eq,
+ 					  IRQF_DISABLED, "ehca_eq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -130,7 +130,7 @@ int ehca_create_eq(struct ehca_shca *shc
+ 
+ 		tasklet_init(&eq->interrupt_task, ehca_tasklet_eq, (long)shca);
+ 	} else if (type == EHCA_NEQ) {
+-		ret = ibmebus_request_irq(eq->ist, ehca_interrupt_neq,
++		ret = ibmebus_request_irq(NULL, eq->ist, ehca_interrupt_neq,
+ 					  IRQF_DISABLED, "ehca_neq",
+ 					  (void *)shca);
+ 		if (ret < 0)
+@@ -170,7 +170,7 @@ int ehca_destroy_eq(struct ehca_shca *sh
+ 	u64 h_ret;
+ 
+ 	spin_lock_irqsave(&eq->spinlock, flags);
+-	ibmebus_free_irq(eq->ist, (void *)shca);
++	ibmebus_free_irq(NULL, eq->ist, (void *)shca);
+ 
+ 	h_ret = hipz_h_destroy_eq(shca->ipz_hca_handle, eq);
+ 
+diff -Nurp ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c
+--- ofa_kernel-1.3_old/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:07:59.000000000 +0200
++++ ofa_kernel-1.3_new/drivers/infiniband/hw/ehca/ehca_main.c	2008-05-02 22:09:18.000000000 +0200
+@@ -289,8 +289,8 @@ static int ehca_sense_attributes(struct 
+ 	};
+ 
+ 	ehca_gen_dbg("Probing adapter %s...",
+-		     shca->ofdev->node->full_name);
+-	loc_code = of_get_property(shca->ofdev->node, "ibm,loc-code", NULL);
++		     shca->ibmebus_dev->ofdev.node->full_name);
++	loc_code = of_get_property(shca->ibmebus_dev->ofdev.node, "ibm,loc-code", NULL);
+ 	if (loc_code)
+ 		ehca_gen_dbg(" ... location lode=%s", loc_code);
+ 
+@@ -458,7 +458,7 @@ static int ehca_init_device(struct ehca_
+ 	shca->ib_device.node_type           = RDMA_NODE_IB_CA;
+ 	shca->ib_device.phys_port_cnt       = shca->num_ports;
+ 	shca->ib_device.num_comp_vectors    = 1;
+-	shca->ib_device.dma_device          = &shca->ofdev->dev;
++	shca->ib_device.dma_device          = &shca->ibmebus_dev->ofdev.dev;
+ 	shca->ib_device.query_device        = ehca_query_device;
+ 	shca->ib_device.query_port          = ehca_query_port;
+ 	shca->ib_device.query_gid           = ehca_query_gid;
+@@ -702,7 +702,7 @@ static struct attribute_group ehca_dev_a
+ 	.attrs = ehca_dev_attrs
+ };
+ 
+-static int __devinit ehca_probe(struct of_device *dev,
++static int __devinit ehca_probe(struct ibmebus_dev *dev,
+ 				const struct of_device_id *id)
+ {
+ 	struct ehca_shca *shca;
+@@ -710,16 +710,16 @@ static int __devinit ehca_probe(struct o
+ 	struct ib_pd *ibpd;
+ 	int ret, i, eq_size;
+ 
+-	handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
++	handle = of_get_property(dev->ofdev.node, "ibm,hca-handle", NULL);
+ 	if (!handle) {
+ 		ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+ 	if (!(*handle)) {
+ 		ehca_gen_err("Wrong eHCA handle for adapter: %s.",
+-			     dev->node->full_name);
++			     dev->ofdev.node->full_name);
+ 		return -ENODEV;
+ 	}
+ 
+@@ -734,9 +734,9 @@ static int __devinit ehca_probe(struct o
+ 	for (i = 0; i < ARRAY_SIZE(shca->sport); i++)
+ 		spin_lock_init(&shca->sport[i].mod_sqp_lock);
+ 
+-	shca->ofdev = dev;
++	shca->ibmebus_dev = dev;
+ 	shca->ipz_hca_handle.handle = *handle;
+-	dev->dev.driver_data = shca;
++	dev->ofdev.dev.driver_data = shca;
+ 
+ 	ret = ehca_sense_attributes(shca);
+ 	if (ret < 0) {
+@@ -813,7 +813,7 @@ static int __devinit ehca_probe(struct o
+ 		}
+ 	}
+ 
+-	ret = sysfs_create_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	ret = sysfs_create_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 	if (ret) /* only complain; we can live without attributes */
+ 		ehca_err(&shca->ib_device,
+ 			 "Cannot create device attributes  ret=%d", ret);
+@@ -863,12 +863,12 @@ probe1:
+ 	return -EINVAL;
+ }
+ 
+-static int __devexit ehca_remove(struct of_device *dev)
++static int __devexit ehca_remove(struct ibmebus_dev *dev)
+ {
+-	struct ehca_shca *shca = dev->dev.driver_data;
++	struct ehca_shca *shca = dev->ofdev.dev.driver_data;
+ 	int ret;
+ 
+-	sysfs_remove_group(&dev->dev.kobj, &ehca_dev_attr_grp);
++	sysfs_remove_group(&dev->ofdev.dev.kobj, &ehca_dev_attr_grp);
+ 
+ 	if (ehca_open_aqp1 == 1) {
+ 		int i;
+@@ -919,11 +919,11 @@ static struct of_device_id ehca_device_t
+ 	{},
+ };
+ 
+-static struct of_platform_driver ehca_driver = {
+-	.name        = "ehca",
+-	.match_table = ehca_device_table,
+-	.probe       = ehca_probe,
+-	.remove      = ehca_remove,
++static struct ibmebus_driver ehca_driver = {
++	.name     = "ehca",
++	.id_table = ehca_device_table,
++	.probe    = ehca_probe,
++	.remove   = ehca_remove,
+ };
+ 
+ void ehca_poll_eqs(unsigned long data)
-- 
1.5.5






More information about the ewg mailing list