Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030565AbXBOUAc (ORCPT ); Thu, 15 Feb 2007 15:00:32 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030583AbXBOUAc (ORCPT ); Thu, 15 Feb 2007 15:00:32 -0500 Received: from e34.co.us.ibm.com ([32.97.110.152]:55959 "EHLO e34.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030565AbXBOUAc (ORCPT ); Thu, 15 Feb 2007 15:00:32 -0500 Subject: Re: [PATCH 2.6.21-rc1] ibmebus: Support dynamic addition and removal of adapters From: John Rose To: Hoang-Nam Nguyen Cc: Paul Mackerras , External List , lkml , Me Notes , fenkes@de.ibm.com, Paul Mackerras In-Reply-To: <200702151755.13009.hnguyen@linux.vnet.ibm.com> References: <200702151755.13009.hnguyen@linux.vnet.ibm.com> Content-Type: text/plain Message-Id: <1171569457.20758.76.camel@sinatra.austin.ibm.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 (1.4.6-2) Date: Thu, 15 Feb 2007 13:57:37 -0600 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1352 Lines: 40 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@xxxxxxxxx/ Thanks- John - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/