From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux PCI <linux-pci@vger.kernel.org>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Yinghai Lu <yinghai@kernel.org>, Jiang Liu <liuj97@gmail.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: [PATCH 1/3] ACPI / hotplug / PCI: Always return success after adding a function
Date: Mon, 08 Jul 2013 15:28:35 +0200 [thread overview]
Message-ID: <1502675.WMZKWG2iox@vostro.rjw.lan> (raw)
In-Reply-To: <5361579.8un1t1TCfk@vostro.rjw.lan>
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
When a new ACPIPHP function is added by register_slot() and the
notify handler cannot be installed for it, register_slot() returns an
error status without cleaning up, which causes the entire namespace
walk in acpiphp_enumerate_slots() to be aborted, although it still
may be possible to successfully install the function notify handler
for other device objects under the given brigde.
To address this issue make register_slot() return success after
a new function has been added, even if the addition of the notify
handler for it has failed.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/pci/hotplug/acpiphp_glue.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
Index: linux-pm/drivers/pci/hotplug/acpiphp_glue.c
===================================================================
--- linux-pm.orig/drivers/pci/hotplug/acpiphp_glue.c
+++ linux-pm/drivers/pci/hotplug/acpiphp_glue.c
@@ -335,10 +335,9 @@ register_slot(acpi_handle handle, u32 lv
if (ACPI_FAILURE(status))
err("failed to register interrupt notify handler\n");
- } else
- status = AE_OK;
+ }
- return status;
+ return AE_OK;
err_exit:
bridge->nr_slots--;
next prev parent reply other threads:[~2013-07-08 13:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-07 23:15 [PATCH 0/2] PCI / ACPI cleanups Rafael J. Wysocki
2013-07-07 23:17 ` [PATCH 1/2] ACPI / PCI: Make bus registration and unregistration symmetric Rafael J. Wysocki
2013-07-07 23:19 ` [PATCH 2/2] ACPI / PCI: Consolidate acpiphp_enumerate_slots() Rafael J. Wysocki
2013-07-08 13:27 ` [PATCH 0/3] ACPI / hotplug / PCI: Rework of events handling Rafael J. Wysocki
2013-07-08 13:28 ` Rafael J. Wysocki [this message]
2013-07-08 13:30 ` [PATCH 2/3] ACPI / hotplug / PCI: Hotplug context objects for bridges and functions Rafael J. Wysocki
2013-07-08 23:44 ` Rafael J. Wysocki
2013-07-08 13:34 ` [PATCH 3/3] ACPI / hotplug / PCI: Unified notify handler for hotplug events Rafael J. Wysocki
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=1502675.WMZKWG2iox@vostro.rjw.lan \
--to=rjw@sisk.pl \
--cc=bhelgaas@google.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=liuj97@gmail.com \
--cc=mika.westerberg@linux.intel.com \
--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