From: Daniel Golle <daniel@makrotopia.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: Aditya Prayoga <aditya@kobol.io>,
linux-ide@vger.kernel.org, linux-leds@vger.kernel.org,
Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
Gregory Clement <gregory.clement@bootlin.com>,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
Russell King <linux@armlinux.org.uk>,
Jens Axboe <axboe@kernel.dk>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Jacek Anaszewski <jacek.anaszewski@gmail.com>
Subject: Re: [PATCH 1/2] libata: add ledtrig support
Date: Fri, 21 Sep 2018 08:31:09 +0200 [thread overview]
Message-ID: <20180921063103.GD20006@makrotopia.org> (raw)
In-Reply-To: <20180920220449.GC27468@xo-6d-61-c0.localdomain>
Hi Pavel,
On Fri, Sep 21, 2018 at 12:04:49AM +0200, Pavel Machek wrote:
> Hi!
>
> > > > +#ifdef CONFIG_ATA_LEDS
> > > > + /* register LED triggers for all ports */
> > > > + for (i = 0; i < host->n_ports; i++) {
> > > > + if (unlikely(!host->ports[i]->ledtrig))
> > > > + continue;
> > > > +
> > > > + snprintf(host->ports[i]->ledtrig_name,
> > > > + sizeof(host->ports[i]->ledtrig_name), "ata%u",
> > > > + host->ports[i]->print_id);
> > >
> > > > + host->ports[i]->ledtrig->name = host->ports[i]->ledtrig_name;
> > > > +
> > > > + if (led_trigger_register(host->ports[i]->ledtrig)) {
> > > > + kfree(host->ports[i]->ledtrig);
> > > > + host->ports[i]->ledtrig = NULL;
> > > > + }
> > > > + }
> > > > +#endif
> > >
> > > No, we don't want you to register multiple triggers. We want one
> > > trigger, than has parameter "which port to watch". (Number of triggers
> > > is limited as by sysfs limitations).
> >
> > Back then I implemented it that way to be able to define the
> > default trigger for each LED in device tree and "trigger-sources"
> > didn't exist yet (it was introduced for USB ports and isn't yet used
> > for anything other than that)
>
> I see why you did it... BUt I believe we still want single trigger solution...
>
> > However, the problem till today is also that ATA ports are often not
> > individual device-tree objects we can refer to, see for example
> > marvell,armada-370-sata which appears as one opaque controller. Ie.
> > all SATA drivers have to be converted to expose individual ports on
> > device-tree before the trigger-sources approach can be applied...
>
> Yep, well... something to do in SATA then.
>
> Perhaps this should also have an option for single LED for _any_ SATA activity,
> and 90% devices will be happy with that?
The whole reason for not using one of the existing disk-activity
triggers was to address individual SATA ports to individual LEDs of NAS
devices (in my case Shuttle KD20)...
next prev parent reply other threads:[~2018-09-21 6:31 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-19 3:45 [PATCH 0/2] Add support per ATA port ledtrigger on armada 38x Aditya Prayoga
2018-09-19 3:45 ` [PATCH 1/2] libata: add ledtrig support Aditya Prayoga
2018-09-19 13:01 ` Andrew Lunn
2018-09-20 9:53 ` Aditya Prayoga
2018-09-19 18:36 ` kbuild test robot
2018-09-19 21:49 ` kbuild test robot
2018-09-19 21:49 ` [PATCH] libata: fix semicolon.cocci warnings kbuild test robot
2018-09-20 7:23 ` [PATCH 1/2] libata: add ledtrig support Pavel Machek
2018-09-20 8:24 ` Daniel Golle
2018-09-20 22:04 ` Pavel Machek
2018-09-21 6:31 ` Daniel Golle [this message]
2018-09-19 3:45 ` [PATCH 2/2] ARM: mvebu: Enable ARCH_WANT_LIBATA_LEDS in Armada 38x Aditya Prayoga
2018-09-20 7:26 ` Pavel Machek
2018-09-26 6:05 ` Aditya Prayoga
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=20180921063103.GD20006@makrotopia.org \
--to=daniel@makrotopia.org \
--cc=aditya@kobol.io \
--cc=andrew@lunn.ch \
--cc=axboe@kernel.dk \
--cc=gregory.clement@bootlin.com \
--cc=jacek.anaszewski@gmail.com \
--cc=jason@lakedaemon.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=pavel@ucw.cz \
--cc=sebastian.hesselbarth@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;
as well as URLs for NNTP newsgroup(s).