[ofa-general] [Patch 3/3]ehca: Patchset to backport 2.6.24-rc1 kernel base

Stefan Roscher ossrosch at linux.vnet.ibm.com
Wed Oct 31 09:07:29 PDT 2007


This patch replaces the new ibmebus location code in ehca with the old one for older
kernels.

Signed-off-by: Stefan Roscher <stefan.roscher at de.ibm.com>
---

 2.6.16/ehca_01_ibmebus_loc_code.patch            |  137 +++++++++++++++++++++++
 2.6.16_sles10/ehca_01_ibmebus_loc_code.patch     |  137 +++++++++++++++++++++++
 2.6.16_sles10_sp1/ehca_01_ibmebus_loc_code.patch |  137 +++++++++++++++++++++++
 2.6.17/ehca_01_ibmebus_loc_code.patch            |  137 +++++++++++++++++++++++
 2.6.18-EL5.1/ehca_01_ibmebus_loc_code.patch      |  137 +++++++++++++++++++++++
 2.6.18/ehca_01_ibmebus_loc_code.patch            |  137 +++++++++++++++++++++++
 2.6.19/ehca_01_ibmebus_loc_code.patch            |  137 +++++++++++++++++++++++
 2.6.20/ehca_01_ibmebus_loc_code.patch            |  137 +++++++++++++++++++++++
 2.6.21/ehca_01_ibmebus_loc_code.patch            |  137 +++++++++++++++++++++++
 2.6.22/ehca_01_ibmebus_loc_code.patch            |  137 +++++++++++++++++++++++
 2.6.23/ehca_01_ibmebus_loc_code.patch            |  137 +++++++++++++++++++++++
 2.6.9_U5/ehca_01_ibmebus_loc_code.patch          |  137 +++++++++++++++++++++++
 12 files changed, 1644 insertions(+)



diff -Nurp linux-2.6_old/kernel_patches/backport/2.6.16/ehca_01_ibmebus_loc_code.patch linux-2.6_new/kernel_patches/backport/2.6.16/ehca_01_ibmebus_loc_code.patch
--- linux-2.6_old/kernel_patches/backport/2.6.16/ehca_01_ibmebus_loc_code.patch	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6_new/kernel_patches/backport/2.6.16/ehca_01_ibmebus_loc_code.patch	2007-10-31 10:47:14.000000000 -0400
@@ -0,0 +1,137 @@
+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 linux-2.6_old/kernel_patches/backport/2.6.16_sles10/ehca_01_ibmebus_loc_code.patch linux-2.6_new/kernel_patches/backport/2.6.16_sles10/ehca_01_ibmebus_loc_code.patch
--- linux-2.6_old/kernel_patches/backport/2.6.16_sles10/ehca_01_ibmebus_loc_code.patch	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6_new/kernel_patches/backport/2.6.16_sles10/ehca_01_ibmebus_loc_code.patch	2007-10-31 10:47:18.000000000 -0400
@@ -0,0 +1,137 @@
+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 linux-2.6_old/kernel_patches/backport/2.6.16_sles10_sp1/ehca_01_ibmebus_loc_code.patch linux-2.6_new/kernel_patches/backport/2.6.16_sles10_sp1/ehca_01_ibmebus_loc_code.patch
--- linux-2.6_old/kernel_patches/backport/2.6.16_sles10_sp1/ehca_01_ibmebus_loc_code.patch	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6_new/kernel_patches/backport/2.6.16_sles10_sp1/ehca_01_ibmebus_loc_code.patch	2007-10-31 10:47:24.000000000 -0400
@@ -0,0 +1,137 @@
+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 linux-2.6_old/kernel_patches/backport/2.6.17/ehca_01_ibmebus_loc_code.patch linux-2.6_new/kernel_patches/backport/2.6.17/ehca_01_ibmebus_loc_code.patch
--- linux-2.6_old/kernel_patches/backport/2.6.17/ehca_01_ibmebus_loc_code.patch	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6_new/kernel_patches/backport/2.6.17/ehca_01_ibmebus_loc_code.patch	2007-10-31 10:47:28.000000000 -0400
@@ -0,0 +1,137 @@
+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 linux-2.6_old/kernel_patches/backport/2.6.18/ehca_01_ibmebus_loc_code.patch linux-2.6_new/kernel_patches/backport/2.6.18/ehca_01_ibmebus_loc_code.patch
--- linux-2.6_old/kernel_patches/backport/2.6.18/ehca_01_ibmebus_loc_code.patch	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6_new/kernel_patches/backport/2.6.18/ehca_01_ibmebus_loc_code.patch	2007-10-31 10:47:30.000000000 -0400
@@ -0,0 +1,137 @@
+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 linux-2.6_old/kernel_patches/backport/2.6.18-EL5.1/ehca_01_ibmebus_loc_code.patch linux-2.6_new/kernel_patches/backport/2.6.18-EL5.1/ehca_01_ibmebus_loc_code.patch
--- linux-2.6_old/kernel_patches/backport/2.6.18-EL5.1/ehca_01_ibmebus_loc_code.patch	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6_new/kernel_patches/backport/2.6.18-EL5.1/ehca_01_ibmebus_loc_code.patch	2007-10-31 10:47:33.000000000 -0400
@@ -0,0 +1,137 @@
+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 linux-2.6_old/kernel_patches/backport/2.6.19/ehca_01_ibmebus_loc_code.patch linux-2.6_new/kernel_patches/backport/2.6.19/ehca_01_ibmebus_loc_code.patch
--- linux-2.6_old/kernel_patches/backport/2.6.19/ehca_01_ibmebus_loc_code.patch	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6_new/kernel_patches/backport/2.6.19/ehca_01_ibmebus_loc_code.patch	2007-10-31 10:47:37.000000000 -0400
@@ -0,0 +1,137 @@
+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 linux-2.6_old/kernel_patches/backport/2.6.20/ehca_01_ibmebus_loc_code.patch linux-2.6_new/kernel_patches/backport/2.6.20/ehca_01_ibmebus_loc_code.patch
--- linux-2.6_old/kernel_patches/backport/2.6.20/ehca_01_ibmebus_loc_code.patch	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6_new/kernel_patches/backport/2.6.20/ehca_01_ibmebus_loc_code.patch	2007-10-31 10:47:39.000000000 -0400
@@ -0,0 +1,137 @@
+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 linux-2.6_old/kernel_patches/backport/2.6.21/ehca_01_ibmebus_loc_code.patch linux-2.6_new/kernel_patches/backport/2.6.21/ehca_01_ibmebus_loc_code.patch
--- linux-2.6_old/kernel_patches/backport/2.6.21/ehca_01_ibmebus_loc_code.patch	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6_new/kernel_patches/backport/2.6.21/ehca_01_ibmebus_loc_code.patch	2007-10-31 10:47:41.000000000 -0400
@@ -0,0 +1,137 @@
+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 linux-2.6_old/kernel_patches/backport/2.6.22/ehca_01_ibmebus_loc_code.patch linux-2.6_new/kernel_patches/backport/2.6.22/ehca_01_ibmebus_loc_code.patch
--- linux-2.6_old/kernel_patches/backport/2.6.22/ehca_01_ibmebus_loc_code.patch	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6_new/kernel_patches/backport/2.6.22/ehca_01_ibmebus_loc_code.patch	2007-10-31 10:47:43.000000000 -0400
@@ -0,0 +1,137 @@
+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 linux-2.6_old/kernel_patches/backport/2.6.23/ehca_01_ibmebus_loc_code.patch linux-2.6_new/kernel_patches/backport/2.6.23/ehca_01_ibmebus_loc_code.patch
--- linux-2.6_old/kernel_patches/backport/2.6.23/ehca_01_ibmebus_loc_code.patch	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6_new/kernel_patches/backport/2.6.23/ehca_01_ibmebus_loc_code.patch	2007-10-31 10:47:45.000000000 -0400
@@ -0,0 +1,137 @@
+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 linux-2.6_old/kernel_patches/backport/2.6.9_U5/ehca_01_ibmebus_loc_code.patch linux-2.6_new/kernel_patches/backport/2.6.9_U5/ehca_01_ibmebus_loc_code.patch
--- linux-2.6_old/kernel_patches/backport/2.6.9_U5/ehca_01_ibmebus_loc_code.patch	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6_new/kernel_patches/backport/2.6.9_U5/ehca_01_ibmebus_loc_code.patch	2007-10-31 10:47:50.000000000 -0400
@@ -0,0 +1,137 @@
+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)






More information about the general mailing list