From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pb0-f46.google.com ([209.85.160.46]:51946 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756405Ab2LMSoo (ORCPT ); Thu, 13 Dec 2012 13:44:44 -0500 Received: by mail-pb0-f46.google.com with SMTP id wy7so1751484pbc.19 for ; Thu, 13 Dec 2012 10:44:44 -0800 (PST) Date: Thu, 13 Dec 2012 10:44:41 -0800 From: Greg KH To: "Kirill A. Shutemov" Cc: Miles J Penner , John Ronciak , Mika Westerberg , Tushar N Dave , "Kirill A. Shutemov" , Bjorn Helgaas , Rusty Russell , Mauro Carvalho Chehab , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] PCI Hotplug: workaround for Thunderbolt on Acer Aspire S5 Message-ID: <20121213184441.GB12105@kroah.com> References: <1355412708-20046-1-git-send-email-kirill.shutemov@linux.intel.com> <1355412708-20046-2-git-send-email-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <1355412708-20046-2-git-send-email-kirill.shutemov@linux.intel.com> Sender: linux-pci-owner@vger.kernel.org List-ID: On Thu, Dec 13, 2012 at 05:31:46PM +0200, Kirill A. Shutemov wrote: > From: "Kirill A. Shutemov" > > Correct ACPI PCI hotplug imeplementation should have _RMV method in a > PCI slot (device under pci bridge). In Acer Aspire S5 case we have it > deeper in hierarchy: > > Device (RP05) > { > // ... > Device (HRUP) > { > // ... > Device (HRDN) > { > // ... > Device (EPUP) > { > // ... > Method (_RMV, 0, NotSerialized) // _RMV: Removal Status > { > Return (One) > } > } > } > } > } > > Signed-off-by: Kirill A. Shutemov > --- > drivers/pci/hotplug/acpi_pcihp.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/drivers/pci/hotplug/acpi_pcihp.c b/drivers/pci/hotplug/acpi_pcihp.c > index 2a47e82..d92ebfb 100644 > --- a/drivers/pci/hotplug/acpi_pcihp.c > +++ b/drivers/pci/hotplug/acpi_pcihp.c > @@ -422,6 +422,19 @@ static int pcihp_is_ejectable(acpi_handle handle) > status = acpi_evaluate_integer(handle, "_RMV", NULL, &removable); > if (ACPI_SUCCESS(status) && removable) > return 1; > + > + /* > + * Workaround for Thunderbolt implementation on Acer Aspire S5. > + * > + * Correct ACPI PCI hotplug imeplementation has _RMV method in a PCI > + * slot (device under pci bridge). In Acer Aspire S5 case we have it > + * deeper in hierarchy. > + */ > + status = acpi_evaluate_integer(handle, "HRDN.EPUP._RMV", NULL, > + &removable); > + if (ACPI_SUCCESS(status) && removable) > + return 1; I have no objection to this patch as-is, but I wonder how will other BIOSes implement this "incorrectly" in the future. Should we always just try to walk the whole PCI slot heirachy looking for the _RMV attribute? That should solve the problem where someone else places this at another location for the slot, right? Is there any test for Windows that ensures that this gets placed in the "correct" location that we can rely on? thanks, greg k-h