From: Len Brown <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Bjorn Helgaas <bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
Cc: ACPI Developers
<acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>
Subject: Re: [PATCH] Fix _STA checking in acpi_bus_add
Date: 23 Jan 2004 23:43:27 -0500 [thread overview]
Message-ID: <1074919407.14755.6.camel@dhcppc4> (raw)
In-Reply-To: <200401021635.25419.bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
Applied.
thanks Bjorn,
-Len
ps. did you find this because you've got a system where the actual
get_status failed, or the _STA returned !present and that was ignored?
On Fri, 2004-01-02 at 18:35, Bjorn Helgaas wrote:
> In 2.6.1-rc1, acpi_bus_add() calls acpi_bus_get_status() to evaluate
> _STA, but botches checking the return value. The result is that _STA
> is ignored (if it was evaluated correctly), or we check garbage (if
> the evaluation failed). Here's a patch to fix it:
>
> ===== drivers/acpi/scan.c 1.19 vs edited =====
> --- 1.19/drivers/acpi/scan.c Sun May 25 18:00:00 2003
> +++ edited/drivers/acpi/scan.c Fri Jan 2 16:14:25 2004
> @@ -703,11 +703,11 @@
> switch (type) {
> case ACPI_BUS_TYPE_DEVICE:
> result = acpi_bus_get_status(device);
> - if (!result)
> - break;
> - if (!device->status.present)
> + if (ACPI_FAILURE(result) || !device->status.present) {
> result = -ENOENT;
> - goto end;
> + goto end;
> + }
> + break;
> default:
> STRUCT_TO_INT(device->status) = 0x0F;
> break;
>
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
next prev parent reply other threads:[~2004-01-24 4:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-02 23:35 [PATCH] Fix _STA checking in acpi_bus_add Bjorn Helgaas
[not found] ` <200401021635.25419.bjorn.helgaas-VXdhtT5mjnY@public.gmane.org>
2004-01-12 19:47 ` Bjorn Helgaas
2004-01-24 4:43 ` Len Brown [this message]
[not found] ` <1074919407.14755.6.camel-D2Zvc0uNKG8@public.gmane.org>
2004-01-26 16:15 ` Bjorn Helgaas
-- strict thread matches above, loose matches on Subject: below --
2004-01-26 17:20 Brown, Len
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=1074919407.14755.6.camel@dhcppc4 \
--to=len.brown-ral2jqcrhueavxtiumwx3w@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=bjorn.helgaas-VXdhtT5mjnY@public.gmane.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