[openib-general] [Bug 347] New: rdma cm backport to EL4 - U3 broken
bugzilla-daemon at lists.openfabrics.org
bugzilla-daemon at lists.openfabrics.org
Tue Feb 6 11:26:23 PST 2007
https://bugs.openfabrics.org/show_bug.cgi?id=347
Summary: rdma cm backport to EL4 - U3 broken
Product: OpenFabrics Linux
Version: 1.2
Platform: X86-64
OS/Version: RHEL 4
Status: NEW
Severity: blocker
Priority: P1
Component: IB Core
AssignedTo: bugzilla at openib.org
ReportedBy: robert.j.woodruff at intel.com
librdmacm: couldn't read ABI version.
librdmacm: assuming: 4
I was able to fix this by applying the following backport patch
when running on EL4-U3
diff -Naurp linux-2.6.9/drivers/infiniband/core/ucma.c
linux-2.6.9-openib-drivers-git013007-fixups/drivers/infiniband/core/ucma.c
--- linux-2.6.9/drivers/infiniband/core/ucma.c 2007-01-30 13:13:54.000000000
-0800
+++ linux-2.6.9-openib-drivers-git013007-fixups/drivers/infiniband/core/ucma.c
2007-01-30 13:35:56.000000000 -0800
@@ -1045,13 +1045,13 @@ static struct miscdevice ucma_misc = {
.fops = &ucma_fops,
};
-static ssize_t show_abi_version(struct device *dev,
- struct device_attribute *attr,
- char *buf)
+static struct class *ucma_class;
+static ssize_t show_abi_version(struct class *class_dev, char *buf)
{
- return sprintf(buf, "%d\n", RDMA_USER_CM_ABI_VERSION);
+ return sprintf(buf, "%d\n", RDMA_USER_CM_ABI_VERSION);
}
-static DEVICE_ATTR(abi_version, S_IRUGO, show_abi_version, NULL);
+static CLASS_ATTR(abi_version, S_IRUGO, show_abi_version, NULL);
+
static int __init ucma_init(void)
{
@@ -1061,22 +1061,28 @@ static int __init ucma_init(void)
if (ret)
return ret;
- ret = device_create_file(ucma_misc.this_device, &dev_attr_abi_version);
- if (ret) {
- printk(KERN_ERR "rdma_ucm: couldn't create abi_version
attr\n");
- goto err;
- }
- return 0;
+ ucma_class = class_create(THIS_MODULE, "infiniband_ucma");
+ if (IS_ERR(ucma_class)) {
+ printk(KERN_ERR "rdma_ucm: couldn't create class
infiniband_ucma\n");
+ goto err;
+ }
+
+ ret = class_create_file(ucma_class, &class_attr_abi_version);
+ if (ret) {
+ printk(KERN_ERR "user_verbs: couldn't create abi_version
attribute\n");
+ goto err;
+ }
+
+ return 0;
err:
- misc_deregister(&ucma_misc);
- return ret;
+ misc_deregister(&ucma_misc);
+ return ret;
}
+
static void __exit ucma_cleanup(void)
{
- device_remove_file(ucma_misc.this_device, &dev_attr_abi_version);
misc_deregister(&ucma_misc);
- idr_destroy(&ctx_idr);
}
module_init(ucma_init);
--
Configure bugmail: https://bugs.openfabrics.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the general
mailing list