From: Keith Busch <kbusch@kernel.org>
To: "Krzysztof Wilczyński" <kw@linux.com>
Cc: Stuart Hayes <stuart.w.hayes@gmail.com>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-pci@vger.kernel.org
Subject: Re: [PATCH] Add support for PCIe SSD status LED management
Date: Wed, 5 May 2021 19:34:03 -0700 [thread overview]
Message-ID: <20210506023403.GB1187168@dhcp-10-100-145-180.wdc.com> (raw)
In-Reply-To: <20210506014827.GA175453@rocinante.localdomain>
On Thu, May 06, 2021 at 03:48:27AM +0200, Krzysztof Wilczyński wrote:
> > >cat /sys/class/leds/0000:88:00.0::pcie_ssd_status/supported_states
> > ok 0x0004 [ ]
> > locate 0x0008 [*]
> > fail 0x0010 [ ]
> > rebuild 0x0020 [ ]
> > pfa 0x0040 [ ]
> > hotspare 0x0080 [ ]
> > criticalarray 0x0100 [ ]
> > failedarray 0x0200 [ ]
> > invaliddevice 0x0400 [ ]
> > disabled 0x0800 [ ]
> > --
> > supported_states = 0x0008
> >
> > >cat /sys/class/leds/0000:88:00.0::pcie_ssd_status/current_states
> > locate 0x0008 [ ]
>
> As per what Keith already noted, this is a very elaborate output as far
> as sysfs goes - very human-readable, but it would be complex to parse
> should some software would be interested in showing this values in a way
> or another.
>
> I would propose output similar to this one:
>
> $ cat /sys/block/sda/queue/scheduler
> mq-deadline-nodefault [bfq] none
>
> If you prefer to show the end-user a string, rather than a numeric
> value. This approach could support both the supported and current
> states (similarly to how it works for the I/O scheduler), thus there
> would be no need to duplicate the code between the two attributes.
>
> What do you think?
Some enclosures may support just one blinky state at a time. Other
implementations might have multiple LEDs and colors, so you could, for
example, "locate" something that is also "failed", with both states
visible simultaneously. You could capture the current states with the
"scheduler" type display, but setting new states may be more
complicated.
next prev parent reply other threads:[~2021-05-06 2:34 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-16 19:20 [PATCH] Add support for PCIe SSD status LED management Stuart Hayes
2021-05-05 16:01 ` stuart hayes
2021-05-05 16:12 ` Keith Busch
[not found] ` <CAL5oW00Pmnhqi1KZ9-jqFwLXQWBO0ddCyv+dr6qkry7iqZNQsw@mail.gmail.com>
2021-05-24 18:56 ` stuart hayes
2021-05-06 1:48 ` Krzysztof Wilczyński
2021-05-06 2:34 ` Keith Busch [this message]
2021-05-06 2:46 ` Krzysztof Wilczyński
2021-05-06 21:04 ` stuart hayes
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=20210506023403.GB1187168@dhcp-10-100-145-180.wdc.com \
--to=kbusch@kernel.org \
--cc=bhelgaas@google.com \
--cc=kw@linux.com \
--cc=linux-pci@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.