mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Miles J Penner <miles.j.penner@intel.com>,
	John Ronciak <john.ronciak@intel.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Tushar N Dave <tushar.n.dave@intel.com>,
	"Kirill A. Shutemov" <kirill@shutemov.name>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Mauro Carvalho Chehab <mchehab@redhat.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] PCI Hotplug: workaround for Thunderbolt on Acer Aspire S5
Date: Thu, 13 Dec 2012 21:35:50 +0200	[thread overview]
Message-ID: <20121213193550.GB23994@otc-wbsnb-06> (raw)
In-Reply-To: <20121213184441.GB12105@kroah.com>

[-- Attachment #1: Type: text/plain, Size: 2801 bytes --]

On Thu, Dec 13, 2012 at 10:44:41AM -0800, Greg KH wrote:
> On Thu, Dec 13, 2012 at 05:31:46PM +0200, Kirill A. Shutemov wrote:
> > From: "Kirill A. Shutemov" <kirill.shutemov@linux.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@linux.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);
> > +	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?

I'm new with PCI and I'm not sure what problems can cause false positive
here.
What will heppend if we find yet another PCI-to-PCI bridge in the hierarchy
and some of slots of that bridge will have _RMV method? Is it possible,
right?

I prefer postpone any generalization before we will find any similar bug
on other HW. (I naively hope BIOS developers will not repeat theirs bugs).

> Is there any test for Windows that ensures that this gets placed in the
> "correct" location that we can rely on?

No idea. I haven't seen any Windows.

-- 
 Kirill A. Shutemov

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-12-13 19:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-13 19:25 [PATCH 0/3] Thunderbolt workarounds Kirill A. Shutemov
2012-12-13 15:31 ` [PATCH 1/3] PCI Hotplug: workaround for Thunderbolt on Acer Aspire S5 Kirill A. Shutemov
2012-12-13 18:44   ` Greg KH
2012-12-13 19:35     ` Kirill A. Shutemov [this message]
2012-12-14  0:22   ` Bjorn Helgaas
2012-12-14 10:46     ` Kirill A. Shutemov
2012-12-13 15:31 ` [PATCH 2/3] PCI Hotplug: convert acpiphp_hp_work to use delayed work Kirill A. Shutemov
2012-12-13 15:31 ` [PATCH 3/3] PCI Hotplug: workaround for Thunderbolt on Intel DZ77RE-75K motherboard Kirill A. Shutemov
2012-12-13 18:48   ` Greg KH
2012-12-13 20:08     ` Kirill A. Shutemov
2012-12-13 20:25       ` Yinghai Lu
2012-12-13 20:30         ` Linus Torvalds
2012-12-13 20:49           ` Kirill A. Shutemov
2012-12-13 20:54             ` Linus Torvalds
2012-12-13 22:06             ` Rafael J. Wysocki
2012-12-14 10:34           ` Kirill A. Shutemov
2012-12-27  0:50 ` [PATCH 0/3] Thunderbolt workarounds Bjorn Helgaas
2012-12-27  9:33   ` Mika Westerberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121213193550.GB23994@otc-wbsnb-06 \
    --to=kirill.shutemov@linux.intel.com \
    --cc=bhelgaas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=john.ronciak@intel.com \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=miles.j.penner@intel.com \
    --cc=rusty@rustcorp.com.au \
    --cc=tushar.n.dave@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®