public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
From: Tang Chen <tangchen@cn.fujitsu.com>
To: yinghai@kernel.org, lenb@kernel.org, bhelgaas@google.com,
	izumi.taku@jp.fujitsu.com, jiang.liu@huawei.com,
	linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 0/3] Find pci root bridges by comparing HID from acpi_device_info, not acpi_device.
Date: Fri, 12 Oct 2012 18:31:27 +0800	[thread overview]
Message-ID: <1350037890-5899-1-git-send-email-tangchen@cn.fujitsu.com> (raw)

Hi Yinghai,

I found a little problem in your following patches. :)
[PATCH 00/40] PCI, ACPI, x86: pci root bus hotplug support.

In acpi_is_root_bridge(), it gets device's HID from acpi_device struct.
If the device is not added when the system boots, there will be no
acpi_device for it. And as a result, acpi_is_root_bridge() will fail.
But it doesn't mean that the device is not a root bridge.

In this case, the not-added root bridges have no handle_hotplug_event_root()
callback registerred. And when we hot add it later, it will do nothing.

This patch set changes the acpi_is_root_bridge()'s behavior. When we fail
to get HID from acpi_device, we will get HID from acpi_device_info by
acpi_get_object_info(), which gets the HID from ACPI namespace directly.

So no matter the device is present or not, we will always find out if it
is a pci root bridge, and register a handle_hotplug_event_root() callback
for it.

These patches are based on Lu Yinghai's for-pci-root-bus-hotplug branch.

Tang Chen (3):
  Introduce a new acpi to determine HID match.
  Do not use acpi_device to find pci root bridge in _init code.
  Check exit status of acpi_install_notify_handler() in
    find_root_bridges().

 drivers/acpi/pci_root.c    |   27 ++++++++++++++++++++++-----
 drivers/acpi/pci_root_hp.c |   12 +++++++++---
 drivers/acpi/scan.c        |   24 ++++++++++++++++++++++++
 include/acpi/acpi_bus.h    |    2 ++
 4 files changed, 57 insertions(+), 8 deletions(-)


             reply	other threads:[~2012-10-12 10:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-12 10:31 Tang Chen [this message]
2012-10-12 10:31 ` [PATCH 1/3] Introduce a new acpi to determine HID match Tang Chen
2012-10-12 10:31 ` [PATCH 2/3] Do not use acpi_device to find pci root bridge in _init code Tang Chen
2012-10-12 10:36   ` Jiang Liu
2012-10-12 10:42     ` Tang Chen
2012-10-12 10:54       ` Jiang Liu
2012-10-12 10:58         ` Tang Chen
2012-10-12 18:34         ` Yinghai Lu
2012-10-12 22:00           ` Yinghai Lu
2012-10-12 10:31 ` [PATCH 3/3] Check exit status of acpi_install_notify_handler() in find_root_bridges() Tang Chen

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=1350037890-5899-1-git-send-email-tangchen@cn.fujitsu.com \
    --to=tangchen@cn.fujitsu.com \
    --cc=bhelgaas@google.com \
    --cc=izumi.taku@jp.fujitsu.com \
    --cc=jiang.liu@huawei.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=yinghai@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