From patchwork Tue Oct 27 02:48:41 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Chiang X-Patchwork-Id: 56021 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9R2mjDp018889 for ; Tue, 27 Oct 2009 02:48:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756158AbZJ0Csj (ORCPT ); Mon, 26 Oct 2009 22:48:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756149AbZJ0Csj (ORCPT ); Mon, 26 Oct 2009 22:48:39 -0400 Received: from g5t0009.atlanta.hp.com ([15.192.0.46]:19484 "EHLO g5t0009.atlanta.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755927AbZJ0Csi (ORCPT ); Mon, 26 Oct 2009 22:48:38 -0400 Received: from g4t0018.houston.hp.com (g4t0018.houston.hp.com [16.234.32.27]) by g5t0009.atlanta.hp.com (Postfix) with ESMTP id 5DECE30D06; Tue, 27 Oct 2009 02:48:42 +0000 (UTC) Received: from ldl (linux.corp.hp.com [15.11.146.101]) by g4t0018.houston.hp.com (Postfix) with ESMTP id E8FCE103B3; Tue, 27 Oct 2009 02:48:41 +0000 (UTC) Received: from localhost (ldl.fc.hp.com [127.0.0.1]) by ldl (Postfix) with ESMTP id C012ECF0009; Mon, 26 Oct 2009 20:48:41 -0600 (MDT) Received: from ldl ([127.0.0.1]) by localhost (ldl.fc.hp.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id daQ6HbgKDYjI; Mon, 26 Oct 2009 20:48:41 -0600 (MDT) Received: by ldl (Postfix, from userid 17609) id A8488CF0007; Mon, 26 Oct 2009 20:48:41 -0600 (MDT) Date: Mon, 26 Oct 2009 20:48:41 -0600 From: Alex Chiang To: Jens Axboe Cc: Mark Lord , Greg KH , Linux Kernel , jbarnes@virtuousgeek.org, linux-pci@vger.kernel.org Subject: Re: pci-express hotplug Message-ID: <20091027024841.GA30509@ldl.fc.hp.com> References: <20091012145254.GA1517@kroah.com> <20091012145700.GJ9228@kernel.dk> <4AD34494.7020602@rtr.ca> <20091012150603.GK9228@kernel.dk> <20091012214854.GA14102@ldl.fc.hp.com> <20091013082903.GQ9228@kernel.dk> <20091013172731.GB22797@ldl.fc.hp.com> <20091014081309.GM9228@kernel.dk> <20091020190707.GA25615@ldl.fc.hp.com> <20091026105419.GA10727@kernel.dk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20091026105419.GA10727@kernel.dk> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 58d25a1..2caa447 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c @@ -797,9 +797,13 @@ static int power_on_slot(struct acpiphp_slot *slot) struct list_head *l; int retval = 0; + printk("%s\n", __func__); + /* if already enabled, just skip */ - if (slot->flags & SLOT_POWEREDON) + if (slot->flags & SLOT_POWEREDON) { + printk(" slot %ld already powered on\n", slot->sun); goto err_exit; + } list_for_each (l, &slot->funcs) { func = list_entry(l, struct acpiphp_func, sibling); @@ -813,6 +817,8 @@ static int power_on_slot(struct acpiphp_slot *slot) goto err_exit; } else break; + } else { + printk(" no _PS0\n"); } } @@ -1122,11 +1128,14 @@ static unsigned int get_slot_status(struct acpiphp_slot *slot) struct list_head *l; struct acpiphp_func *func; + printk("%s\n", __func__); + list_for_each (l, &slot->funcs) { func = list_entry(l, struct acpiphp_func, sibling); if (func->flags & FUNC_HAS_STA) { status = acpi_evaluate_integer(func->handle, "_STA", NULL, &sta); + printk(" FUNC_HAS_STA status %d _STA %#lx\n", status, sta); if (ACPI_SUCCESS(status) && sta) break; } else { @@ -1134,6 +1143,7 @@ static unsigned int get_slot_status(struct acpiphp_slot *slot) PCI_DEVFN(slot->device, func->function), PCI_VENDOR_ID, &dvid); + printk(" reading config space dvid %#lx\n", dvid); if (dvid != 0xffffffff) { sta = ACPI_STA_ALL; break;