From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030260AbXBORIZ (ORCPT ); Thu, 15 Feb 2007 12:08:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1030259AbXBORIZ (ORCPT ); Thu, 15 Feb 2007 12:08:25 -0500 Received: from e32.co.us.ibm.com ([32.97.110.150]:44493 "EHLO e32.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030248AbXBORIX (ORCPT ); Thu, 15 Feb 2007 12:08:23 -0500 Subject: Re: [PATCH 2.6.21-rc1] ehea: dynamic add / remove port From: John Rose To: Jan-Bernd Themann Cc: Jeff Garzik , Christoph Raisch , Jan-Bernd Themann , linux-kernel , linux-ppc , Marcus Eder , Thomas Klein , stefan.roscher@de.ibm.com, netdev , Nathan Fontenot In-Reply-To: <1171491906.30473.3.camel@sinatra.austin.ibm.com> References: <200702141536.28665.ossthema@de.ibm.com> <1171491906.30473.3.camel@sinatra.austin.ibm.com> Content-Type: text/plain Message-Id: <1171559098.20758.70.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 11:04:58 -0600 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org > Second, the probe and remove functions do not communicate whether an add > or remove was successful. Combine this with the lack of port > information in the adapter sysfs directory, and the userspace tool has > no way of verifying a dynamic add/remove. One way to communicate a return code is by making the sysfs interface file read/write, and having the read callback give a return code. For an example of this, you can look at drivers/pci/rpadlpar_sysfs.c and rpadlpar_core.c. It would still be nice to have some way from the adapter sysfs directory to list/examine logical ports. Symlinks would work, but it would be even nicer to have a new kobject per port with attribute files for logical id, state, etc. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from e33.co.us.ibm.com (e33.co.us.ibm.com [32.97.110.151]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e33.co.us.ibm.com", Issuer "Equifax" (verified OK)) by ozlabs.org (Postfix) with ESMTP id AD069DDEA2 for ; Fri, 16 Feb 2007 04:08:27 +1100 (EST) Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e33.co.us.ibm.com (8.13.8/8.13.8) with ESMTP id l1FH8NFE028685 for ; Thu, 15 Feb 2007 12:08:23 -0500 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by westrelay02.boulder.ibm.com (8.13.8/8.13.8/NCO v8.2) with ESMTP id l1FH8MiK486812 for ; Thu, 15 Feb 2007 10:08:22 -0700 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l1FH81m5018718 for ; Thu, 15 Feb 2007 10:08:01 -0700 Subject: Re: [PATCH 2.6.21-rc1] ehea: dynamic add / remove port From: John Rose To: Jan-Bernd Themann In-Reply-To: <1171491906.30473.3.camel@sinatra.austin.ibm.com> References: <200702141536.28665.ossthema@de.ibm.com> <1171491906.30473.3.camel@sinatra.austin.ibm.com> Content-Type: text/plain Message-Id: <1171559098.20758.70.camel@sinatra.austin.ibm.com> Mime-Version: 1.0 Date: Thu, 15 Feb 2007 11:04:58 -0600 Cc: Thomas Klein , Jeff Garzik , Jan-Bernd Themann , netdev , linux-kernel , linux-ppc , Christoph Raisch , Marcus Eder , stefan.roscher@de.ibm.com List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , > Second, the probe and remove functions do not communicate whether an add > or remove was successful. Combine this with the lack of port > information in the adapter sysfs directory, and the userspace tool has > no way of verifying a dynamic add/remove. One way to communicate a return code is by making the sysfs interface file read/write, and having the read callback give a return code. For an example of this, you can look at drivers/pci/rpadlpar_sysfs.c and rpadlpar_core.c. It would still be nice to have some way from the adapter sysfs directory to list/examine logical ports. Symlinks would work, but it would be even nicer to have a new kobject per port with attribute files for logical id, state, etc.