From: Lukas Wunner <lukas@wunner.de>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: "Mariusz Tkaczyk" <mariusz.tkaczyk@linux.intel.com>,
linux-pci@vger.kernel.org, "Christoph Hellwig" <hch@lst.de>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Stuart Hayes" <stuart.w.hayes@gmail.com>,
"Arnd Bergmann" <arnd@arndb.de>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Dan Williams" <dan.j.williams@intel.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Keith Busch" <kbusch@kernel.org>,
"Marek Behun" <marek.behun@nic.cz>, "Pavel Machek" <pavel@ucw.cz>,
"Randy Dunlap" <rdunlap@infradead.org>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH v6 2/3] PCI/NPEM: Add Native PCIe Enclosure Management support
Date: Tue, 20 Aug 2024 15:52:48 +0200 [thread overview]
Message-ID: <ZsSfsPfWmrJ6PdWy@wunner.de> (raw)
In-Reply-To: <20240815174248.GA50357@bhelgaas>
On Thu, Aug 15, 2024 at 12:42:48PM -0500, Bjorn Helgaas wrote:
> The dependency of _DSM on IPMI sounds like a purely ACPI problem. Is
> there no mechanism in ACPI to express that dependency?
Unfortunately there doesn't seem to be one. :(
> If _DSM claims the function is supported before the IPMI driver is
> ready, that sounds like a BIOS defect to me.
>
> If we're stuck with this, maybe the comment can be reworded. "Lazy
> loading" in a paragraph that also mentions initcalls and the
> "ACPI_IPMI" module makes it sound like we're talking about loading the
> *module* lazily, not just (IIUC) reading the LED status lazily.
>
> Maybe it could also explicitly say that the GET_STATE_DSM function
> depends on IPMI.
>
> I'm unhappy that we're getting our arm twisted here. If functionality
> depends on IPMI, there really needs to be a way for OSPM to manage
> that dependency. If we're working around a firmware defect, we need
> to be clear about that.
AFAICS lazy initialization of active indications was architected
such that it is retried on every LED access until it succeeds:
npem->active_inds_initialized is only set to true once
npem->ops->get_active_indications() returns successfully.
I'm assuming that the DSM method fails as it should on
inaccessibility of the IPMI OpRegion.
So users may see errors in dmesg when they access LEDs if IPMI drivers
have not been loaded yet, but once they're loaded, those errors will
go away and LED access should start working flawlessly.
This way of lazily initializing the cached active_indications bit mask
doesn't cost us much as far as code complexity is concerned, but should
make things work 99.999% of the time on quirky platforms.
Thanks,
Lukas
next prev parent reply other threads:[~2024-08-20 14:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-14 12:28 [PATCH v6 0/3] PCIe Enclosure LED Management Mariusz Tkaczyk
2024-08-14 12:28 ` [PATCH v6 1/3] leds: Init leds class earlier Mariusz Tkaczyk
2024-08-14 12:28 ` [PATCH v6 2/3] PCI/NPEM: Add Native PCIe Enclosure Management support Mariusz Tkaczyk
2024-08-14 21:49 ` Bjorn Helgaas
2024-08-15 5:45 ` Lukas Wunner
2024-08-15 17:42 ` Bjorn Helgaas
2024-08-20 13:25 ` Mariusz Tkaczyk
2024-08-20 13:52 ` Lukas Wunner [this message]
2024-08-14 12:29 ` [PATCH v6 3/3] PCI/NPEM: Add _DSM PCIe SSD status LED management Mariusz Tkaczyk
2024-08-14 20:27 ` [PATCH v6 0/3] PCIe Enclosure LED Management Bjorn Helgaas
2024-08-21 14:02 ` Lee Jones
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=ZsSfsPfWmrJ6PdWy@wunner.de \
--to=lukas@wunner.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=dan.j.williams@intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=helgaas@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=kbusch@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=marek.behun@nic.cz \
--cc=mariusz.tkaczyk@linux.intel.com \
--cc=pavel@ucw.cz \
--cc=rdunlap@infradead.org \
--cc=stuart.w.hayes@gmail.com \
/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