mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Jarod Wilson <jarod@redhat.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	linux-kernel@vger.kernel.org, Len Brown <lenb@kernel.org>,
	linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH] pci/hotplug: work-around for missing _RMV on HP ZBook G2
Date: Tue, 19 May 2015 13:36:06 +0200	[thread overview]
Message-ID: <2168334.DgvA03CWPi@vostro.rjw.lan> (raw)
In-Reply-To: <555AA8CD.3010706@redhat.com>

On Monday, May 18, 2015 11:06:53 PM Jarod Wilson wrote:
> On 5/18/2015 7:06 PM, Rafael J. Wysocki wrote:
> > On Monday, May 18, 2015 04:45:28 PM Jarod Wilson wrote:
> ...
> >>>>>>> On Thu, May 14, 2015 at 03:33:58PM -0400, Jarod Wilson wrote:
> >>>>>>>> The HP ZBook 15 and 17 Mobile Workstations, generation 2, up to and
> >>>>>>>> including at least BIOS revision 01.07, do not have an ACPI _RMV
> >>>>>>>> object
> >>>>>>>> associated with their expresscard slots, so acpi-based
> >>>>>>>> hotplug-capable
> >>>>>>>> slot detection fails. If we fall back to pcie-based detection, the
> >>>>>>>> systems
> >>>>>>>> work just fine
> ...
> >> Ah, I forgot some additional details. pciehp_probe() in
> >> drivers/pci/hotplug/pciehp_core.c fails on the
> >> pciehp_acpi_slot_detection_check() call for the expresscard slot, which
> >> is why the base pciehp doesn't bind. DEVICE_ACPI_HANDLE(&dev->dev) in
> >> the slot detection check is winding up with a NULL acpi device.
> >
> > So IMO the bug is that select_detection_mode() assumes that ACPI should be
> > used as the PCIe hotplug detection method if it has found at least one
> > device that looks like an "ACPI hotplug slot" (Thuderbolt breaks that "logic").
> >
> > To be honest, I'm not sure why we need the pciehp_acpi_slot_detection_check()
> > in pciehp_probe() at all.  It doesn't add any value as far as I can say.
> >
> > If pciehp_probe() is called at all, we have registered a PCIe port service
> > and if this is a "hotplug" service, we wouldn't have registered it if the
> > _OSC handshake had not given us contol over native hotplug.
> >
> > So I wonder if the patch below makes any difference.
> 
> Yeah, that also works, for the most part. You still get spew from 
> pciehp_acpi_slot_detection_init() saying "Using ACPI for slot 
> detection.", but in re-reading pciehp_acpi.c in its entirety... I can't 
> see anything productive that it actually does. I'm of the mind that the 
> entire file should just be nuked, the path from pciehp_core.c that your 
> patch alters was the only one that called 
> pciehp_acpi_slot_detection_check(), and everything else is basically the 
> dummy probe and fluff, nothing meaningful actually happens.

Right, all that is horrible horrible garbage.

> I can whip up a follow-up patch that neuters that file entirely in the morning.

Well, let me have that pleasure. :-)

Anyway, code that is only used in one place should be dropped along with its
only user.

> At the very least, the "Using ACPI" bit needs to be beaten into submission, 
> since its not going to be accurate.

An updated patch will follow this message.


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

  reply	other threads:[~2015-05-19 11:10 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-14 19:33 Jarod Wilson
2015-05-16 14:37 ` Bjorn Helgaas
2015-05-16 14:41   ` Bjorn Helgaas
2015-05-18  0:26     ` Rafael J. Wysocki
2015-05-18 14:33       ` Jarod Wilson
2015-05-18 16:17         ` Jarod Wilson
2015-05-18 20:45           ` Jarod Wilson
2015-05-18 23:06             ` Rafael J. Wysocki
2015-05-19  3:06               ` Jarod Wilson
2015-05-19 11:36                 ` Rafael J. Wysocki [this message]
2015-05-19 11:43                   ` [PATCH] PCIe / hotplug: Drop pointless ACPI-based "slot detection" check Rafael J. Wysocki
2015-05-19 12:42                     ` Jarod Wilson
2015-05-19 13:29                       ` Rafael J. Wysocki
2015-05-19 13:27                     ` [Update][PATCH] " Rafael J. Wysocki
2015-05-19 14:40                       ` Jarod Wilson
2015-05-21 16:11                       ` Bjorn Helgaas
2015-05-22  1:21                         ` Rafael J. Wysocki
2015-06-11 17:05                           ` Jarod Wilson
2015-06-11 20:38                             ` Jarod Wilson
2015-06-11 21:16                               ` Rafael J. Wysocki
2015-06-11 21:49                                 ` Jarod Wilson
2015-05-18 21:57         ` [PATCH] pci/hotplug: work-around for missing _RMV on HP ZBook G2 Rafael J. Wysocki
2015-05-18 14:30     ` Jarod Wilson

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=2168334.DgvA03CWPi@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=bhelgaas@google.com \
    --cc=jarod@redhat.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    /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®