public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Armin Wolf <W_Armin@gmx.de>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: lenb@kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 0/4] ACPI: SBS: Fix various issues
Date: Wed, 15 Mar 2023 00:04:34 +0100	[thread overview]
Message-ID: <1de16fdb-e6e2-57eb-b074-cdd5473172ba@gmx.de> (raw)
In-Reply-To: <CAJZ5v0itUSnsxgdvw39e+YZWe4jTHA1fLjw3HZSKHTkp+eLHwQ@mail.gmail.com>

Am 14.03.23 um 20:49 schrieb Rafael J. Wysocki:

> On Sun, Mar 12, 2023 at 6:15 PM Armin Wolf <W_Armin@gmx.de> wrote:
>> Am 25.02.23 um 12:51 schrieb Armin Wolf:
>>
>>> On my Acer Travelmate 4002WLMi, the system locks up upon
>>> suspend/shutdown. After a lot of research, it turned out
>>> that the sbs module was the culprit. The driver would not
>>> correctly mask out the value used to select a battery using
>>> the "Smart Battery Selector" (subset of the "Smart Battery Manager").
>>> This accidentally caused a invalid power source to be selected,
>>> which was automatically corrected by the selector. Upon
>>> notifing the host about the corrected power source, some batteries
>>> would be selected for re-reading, causing a endless loop.
>>> This would lead to some workqueues filling up, which caused the
>>> lockup upon suspend/shutdown.
>>>
>>> The first three patches fix a stacktrace on module removal caused
>>> by some locking issues. The last patch finally fixes the
>>> suspend/shutdown issues.
>>>
>>> As a side note: This was the first machine on which i installed Linux,
>>> to finally fixing this took ~5 years of tinkering.
>> What is the status of this patchset? Should i use a SRCU notifier chain
>> for the query notifiers? I would really like to see this getting fixed,
>> as it prevents me from using linux on this machine.
> I'm not entirely convinced about the query notifiers idea TBH.

I already thought about just flushing the query workqueue, but acpi_ec_remove_query_handler()
would still also remove query handlers installed to handle _Qxx methods. This might cause errors,
as for example on the Acer Travelmate 4002WLMI, the SMBUS query handler (_Q20) resets the SMBUS
alert bit in case no EC SMBus driver is overriding it.
Is there any specific reason for your dislike of the query notifiers? I could turn them into
SRCU call chains to avoid performance issues.

Armin Wolf


      reply	other threads:[~2023-03-14 23:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-25 11:51 [PATCH v2 0/4] ACPI: SBS: Fix various issues Armin Wolf
2023-02-25 11:51 ` [PATCH v2 1/4] ACPI: EC: Add query notifier support Armin Wolf
2023-02-25 11:51 ` [PATCH v2 2/4] ACPI: sbshc: Use ec query notifier call chain Armin Wolf
2023-02-25 11:51 ` [PATCH v2 3/4] ACPI: EC: Make query handlers private Armin Wolf
2023-02-25 11:51 ` [PATCH v2 4/4] ACPI: SBS: Fix handling of Smart Battery Selectors Armin Wolf
2023-03-12 17:15 ` [PATCH v2 0/4] ACPI: SBS: Fix various issues Armin Wolf
2023-03-14 19:49   ` Rafael J. Wysocki
2023-03-14 23:04     ` Armin Wolf [this message]

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=1de16fdb-e6e2-57eb-b074-cdd5473172ba@gmx.de \
    --to=w_armin@gmx.de \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@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