[PATCH 2.6.21-rc1] ibmebus: Support dynamic addition and removal of adapters

John Rose johnrose at austin.ibm.com
Fri Feb 16 06:57:37 EST 2007


Hi-

Looks good.  Questions: how can the user space tools verify the success
of an add or remove?  

Also, will /sys/bus/ibmebus exist even if the system booted with no LHEA
nodes?

One more comment below.

@@ -161,7 +161,9 @@ static void __devinit ibmebus_dev_releas
 static ssize_t ibmebusdev_show_name(struct device *dev, 
 				    struct device_attribute *attr, char *buf)
 {
-	return sprintf(buf, "%s\n", to_ibmebus_dev(dev)->name);
+	struct ibmebus_dev *ebus_dev = to_ibmebus_dev(dev);
+	char *name = (char*)get_property(ebus_dev->ofdev.node, "name", NULL);
+	return sprintf(buf, "%s\n", name);
 }
 static DEVICE_ATTR(name, S_IRUSR | S_IRGRP | S_IROTH, ibmebusdev_show_name, 
 		   NULL);


Can we also have an attribute "devspec" that communicates the open
firmware path through sysfs?  User space DLPAR tools need a way to make
this correlation.  This is consistent with other dynamic-capable sysfs
objects (cpus, etc).  I assume you could get this string with something
like ebus_dev->ofdev.node->full_name.  For example:

# cat /sys/bus/ibmebus/$ebus_device/devspec
/lhea at xxxxxxxxx/

Thanks-
John




More information about the Linuxppc-dev mailing list