[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1444243.g9GbxN3NM0@vostro.rjw.lan>
Date: Wed, 03 Jul 2013 23:40:42 +0200
From: "Rafael J. Wysocki" <rjw@...k.pl>
To: Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Jesse Barnes <jbarnes@...tuousgeek.org>,
Yinghai Lu <yinghai@...nel.org>, john.ronciak@...el.com,
miles.j.penner@...el.com, bruce.w.allan@...el.com,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org,
linux-pci@...r.kernel.org, x86@...nel.org
Subject: Re: [PATCH v2 6/8] PCI: acpiphp: workaround for Thunderbolt on Acer Aspire S5
On Wednesday, July 03, 2013 05:04:53 PM Mika Westerberg wrote:
> From: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
>
> 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 <kirill.shutemov@...ux.intel.com>
> Signed-off-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
> ---
> 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);
Well, calling stuff like this directly from a general function is kind of ugly.
Can we use something like a quirk instead? A DMI check or something?
> + if (ACPI_SUCCESS(status) && removable)
> + return 1;
> +
> return 0;
> }
Rafael
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists