Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Markus Probst <markus.probst@posteo.de>
To: Niklas Cassel <cassel@kernel.org>
Cc: Lee Jones <lee@kernel.org>, Pavel Machek <pavel@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley	 <conor+dt@kernel.org>,
	Jacek Anaszewski <jacek.anaszewski@gmail.com>,
	Damien Le Moal <dlemoal@kernel.org>,
	John Garry <john.g.garry@oracle.com>,
	Jason Yan <yanaijie@huawei.com>,
	 "James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Pavel Machek	 <pavel@ucw.cz>,
	linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	 linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
	 linux-scsi@vger.kernel.org, Ian Pilcher <arequipeno@gmail.com>
Subject: Re: [PATCH RFC 0/4] leds: extend disk trigger
Date: Mon, 26 Jan 2026 22:06:02 +0000	[thread overview]
Message-ID: <ce454969b83dbb0e3bb4ea78f682603cc328ceb9.camel@posteo.de> (raw)
In-Reply-To: <aXctPaaXFYemV20T@ryzen>

[-- Attachment #1: Type: text/plain, Size: 3154 bytes --]

On Mon, 2026-01-26 at 10:00 +0100, Niklas Cassel wrote:
> Hello Markus,
> 
> On Fri, Jan 23, 2026 at 07:05:03PM +0000, Markus Probst wrote:
> > Extend the disk trigger
> > - to allow configuration of the blinking delays
> >   and whether the led should be kept on, on idle.
> > - to allow an individual led to be mapped to an ata port
> > 
> > I would also like to add another patch to this series, only leaving the led
> > on with invert 1 if also at least one disk is present on the ata port.
> > The led would then not only indicate activity, but also if a disk is
> > present.
> > That is why it is an RFC.
> > 
> > @Damien,Niclas: What would be the most straightforward way of telling
> > the led trigger if at least one disk is present on the ata port and
> > notifing it when this changes?
> 
> Why do we want to have this in kernel space?
Because there are more than enough devices that could make use of it.

Just search the term "NAS device" and you see rarely any devices for
which this wouldn't be useful.

The only reason the leds work on those devices currently, is because
they get shipped with a custom modified kernel by the manufacturer.
This shouldn't be a requirement for running Linux properly on a NAS
device with disk leds.


> Sure, there is already the very simple ledtrig-disk driver.
> 
> But I'm not a fan of making the driver more complex.
Do you mean the complexity it would introduce in libata or for the led
trigger itself?

At least with the current patches it looks fairly maintainable.
For instance the pattern led trigger is more complex in my opinion.

In the case of libata and the indication for a presence of a disk, I
would suggest that I implement it first and we can see after I have a
working version if it is acceptable or not.

I am still asking for guidance on checking if at least one disk is
present on a ata port.

> If we want something more complex than what is already there, then it
> is probably much better handled in user space, considering the amount
> of possible configuration options.
A userspace daemon by itself is possible, but I don't think it is the
best solution. Having an indicator for disk activity on a per-disk
basis seems like basic led functionality that should be present in the
kernel.

It is a very minor detail, but I would prefer to have "linux,default-
trigger" set on the led in the fwnode and having the functionality
automatically for every linux system on the hardware, instead of having
to deal with a userspace daemon.
If this is the easiest solution for nas manufacturer to do disk leds,
there is a good chance it getting adopted some day in the future by
those manufacturer and thus making it work out of the box when
switching away from their proprietary os.

> 
> Basically the same argument as used in:
> https://lore.kernel.org/linux-nvme/20220227234258.24619-1-ematsumiya@suse.de/T/#u
If I understood it corretly, the argument there is that led code
shouldn't be present in a fast path.

This does not apply to this scenario.

Thanks
- Markus Probst

> 
> 
> Kind regards,
> Niklas

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 870 bytes --]

  parent reply	other threads:[~2026-01-26 22:06 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-23 19:05 [PATCH RFC 0/4] leds: extend disk trigger Markus Probst
2026-01-23 19:05 ` [PATCH RFC 1/4] leds: dt-bindings: add disk trigger led pattern Markus Probst
2026-01-23 19:05 ` [PATCH RFC 2/4] leds: dt-bindings: add disk trigger for each ata port Markus Probst
2026-01-23 19:05 ` [PATCH RFC 3/4] leds: add delay_on, delay_off and invert attributes to disk trigger Markus Probst
2026-01-23 19:18   ` Markus Probst
2026-01-23 19:05 ` [PATCH RFC 4/4] leds: add disk trigger for each ata port Markus Probst
2026-01-26  6:34   ` Damien Le Moal
2026-01-24 23:21 ` [PATCH RFC 0/4] leds: extend disk trigger Pavel Machek
2026-01-25  0:19   ` Markus Probst
2026-01-26  9:00 ` Niklas Cassel
2026-01-26 16:19   ` Ian Pilcher
2026-01-26 19:03     ` Niklas Cassel
2026-01-26 22:06   ` Markus Probst [this message]
2026-01-27  9:32     ` Niklas Cassel
2026-01-27 15:34       ` Markus Probst
2026-01-28  6:34         ` Damien Le Moal
2026-01-28 15:44           ` Markus Probst
2026-01-28 21:51             ` Niklas Cassel
2026-01-29  4:41             ` Damien Le Moal

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=ce454969b83dbb0e3bb4ea78f682603cc328ceb9.camel@posteo.de \
    --to=markus.probst@posteo.de \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=arequipeno@gmail.com \
    --cc=cassel@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=jacek.anaszewski@gmail.com \
    --cc=john.g.garry@oracle.com \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=pavel@kernel.org \
    --cc=pavel@ucw.cz \
    --cc=robh@kernel.org \
    --cc=yanaijie@huawei.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