linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Hans de Goede <hdegoede@redhat.com>
Cc: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Len Brown <lenb@kernel.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH v2] ACPI: scan: Fix _STA getting called on devices with unmet dependencies
Date: Mon, 29 Mar 2021 19:33:05 +0200	[thread overview]
Message-ID: <CAJZ5v0jJrj+OjeWXJGSQfuNte90qH6pEm7cAkmKW8cVCuTFP-Q@mail.gmail.com> (raw)
In-Reply-To: <20210329154649.16056-1-hdegoede@redhat.com>

On Mon, Mar 29, 2021 at 5:47 PM Hans de Goede <hdegoede@redhat.com> wrote:
>
> Commit 71da201f38df ("ACPI: scan: Defer enumeration of devices with
> _DEP lists") dropped the following 2 lines from acpi_init_device_object():
>
>         /* Assume there are unmet deps until acpi_device_dep_initialize() runs */
>         device->dep_unmet = 1;
>
> Leaving the initial value of dep_unmet at the 0 from the kzalloc(). This
> causes the acpi_bus_get_status() call in acpi_add_single_object() to
> actually call _STA, even though there maybe unmet deps, leading to errors
> like these:
>
> [    0.123579] ACPI Error: No handler for Region [ECRM] (00000000ba9edc4c)
>                [GenericSerialBus] (20170831/evregion-166)
> [    0.123601] ACPI Error: Region GenericSerialBus (ID=9) has no handler
>                (20170831/exfldio-299)
> [    0.123618] ACPI Error: Method parse/execution failed
>                \_SB.I2C1.BAT1._STA, AE_NOT_EXIST (20170831/psparse-550)
>
> Fix this by re-adding the dep_unmet = 1 initialization to
> acpi_init_device_object() and modifying acpi_bus_check_add() to make sure
> that dep_unmet always gets setup there, overriding the initial 1 value.
>
> This re-fixes the issue initially fixed by
> commit 63347db0affa ("ACPI / scan: Use acpi_bus_get_status() to initialize
> ACPI_TYPE_DEVICE devs"), which introduced the removed
> "device->dep_unmet = 1;" statement.
>
> This issue was noticed; and the fix tested on a Dell Venue 10 Pro 5055.
>
> Fixes: 71da201f38df ("ACPI: scan: Defer enumeration of devices with _DEP lists")
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Applied as 5.12-rc material, thanks!

  reply	other threads:[~2021-03-29 17:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-29 15:46 [PATCH v2] ACPI: scan: Fix _STA getting called on devices with unmet dependencies Hans de Goede
2021-03-29 17:33 ` Rafael J. Wysocki [this message]
2021-03-30 18:46 ` Hans de Goede

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=CAJZ5v0jJrj+OjeWXJGSQfuNte90qH6pEm7cAkmKW8cVCuTFP-Q@mail.gmail.com \
    --to=rafael@kernel.org \
    --cc=hdegoede@redhat.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /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;
as well as URLs for NNTP newsgroup(s).