From: Lukas Wunner <lukas@wunner.de>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Tony Hutter <hutter2@llnl.gov>,
mariusz.tkaczyk@linux.intel.com, minyard@acm.org,
linux-pci@vger.kernel.org,
openipmi-developer@lists.sourceforge.net,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] PCI: Introduce Cray ClusterStor E1000 NVMe slot LED driver
Date: Thu, 30 Oct 2025 10:30:13 +0100 [thread overview]
Message-ID: <aQMwJZlHtP99brn-@wunner.de> (raw)
In-Reply-To: <20240926210259.GA13456@bhelgaas>
On Thu, Sep 26, 2024 at 04:02:59PM -0500, Bjorn Helgaas wrote:
> On Mon, Sep 23, 2024 at 05:06:05PM -0700, Tony Hutter wrote:
> > +++ b/drivers/pci/hotplug/pciehp_core.c
> > @@ -73,6 +73,13 @@ static int init_slot(struct controller *ctrl)
> > ops->get_attention_status = pciehp_get_raw_indicator_status;
> > ops->set_attention_status = pciehp_set_raw_indicator_status;
> > }
> > +#ifdef CONFIG_HOTPLUG_PCI_PCIE_CRAY_E1000
> > + if (is_craye1k_slot(ctrl)) {
> > + /* slots 1-24 on Cray E1000s are controlled differently */
> > + ops->get_attention_status = craye1k_get_attention_status;
> > + ops->set_attention_status = craye1k_set_attention_status;
> > + }
> > +#endif
>
> I'm not really thrilled about dropping device-specific code in here,
> but I don't have a better suggestion yet.
For acpiphp, we have an elaborate mechanism to register attention LED
drivers via acpiphp_register_attention() / acpiphp_unregister_attention().
So far it's only used by two drivers (acpiphp_ampere_altra.c and
acpiphp_ibm.c).
For pciehp we have one custom attention LED mechanism for VMD
(enabled through pci_dev->hotplug_user_indicators) and now
this Cray E1000 mechanism.
Personally I'm fine with keeping this lightweight and not add
a similar register/unregister mechanism as we did for acpiphp.
However I think it might make sense to drop the hotplug_user_indicators
flag and instead invoke the is_vmd() check directly from init_slot()
to make it more explicit what this is about and to allow the code to be
optimized away on non-x86.
Thanks,
Lukas
prev parent reply other threads:[~2025-10-30 9:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-24 0:06 [PATCH v2] PCI: Introduce Cray ClusterStor E1000 NVMe slot LED driver Tony Hutter
2024-09-26 21:02 ` Bjorn Helgaas
2024-10-10 18:53 ` Tony Hutter
2024-10-10 19:29 ` Bjorn Helgaas
2025-10-30 9:30 ` Lukas Wunner [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=aQMwJZlHtP99brn-@wunner.de \
--to=lukas@wunner.de \
--cc=helgaas@kernel.org \
--cc=hutter2@llnl.gov \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mariusz.tkaczyk@linux.intel.com \
--cc=minyard@acm.org \
--cc=openipmi-developer@lists.sourceforge.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