From: Lee Jones <lee@kernel.org>
To: Liang Haowen <nbg2974@gmail.com>
Cc: linux-leds@vger.kernel.org, Pavel Machek <pavel@kernel.org>,
"Martin K . Petersen" <mkp@kernel.org>,
linux-scsi@vger.kernel.org, platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org,
Denis Benato <denis.benato@linux.dev>,
Armin Wolf <W_Armin@gmx.de>, Hans de Goede <hansg@kernel.org>,
Ilpo Jarvinen <ilpo.jarvinen@linux.intel.com>
Subject: Re: [RFC v7 1/1] leds: asus-aura-scsi: Add ASUS Aura RGB LED driver for ROG NVMe enclosures
Date: Wed, 23 Sep 2026 11:45:59 +0100 [thread overview]
Message-ID: <20260923104559.GF3864833@google.com> (raw)
In-Reply-To: <20260923103015.2365773-2-nbg2974@gmail.com>
On Wed, 23 Sep 2026, Liang Haowen wrote:
> ASUS ROG external NVMe enclosures (ROG STRIX Arion, USB 0b05:1932) are
> plain USB mass-storage devices with no HID interface: the Aura LEDs
> hang off an ENE controller driven by vendor SCSI commands on the same
> LUN as the disk. The enclosure has 4 independently addressable LEDs,
> verified on hardware.
>
> Register a scsi_device_handler matched by INQUIRY (vendor "ROG",
> model "ESD-S1C"); it does not claim the sdev (sd keeps owning the
> disk) and exposes each LED as a multicolor LED class device,
> /sys/class/leds/asus-arion-0-0-0-0::led-0 through led-3. The
> H:C:T:L part of the sdev name keeps the names unique when more than
> one enclosure is connected, with its colons flattened to dashes. The
> color section stays empty, since multicolor LEDs enumerate their
> palette via multi_intensity, and the four identical zones use the
> function name with a "-N" ordinal, as the naming section in
> Documentation/leds/leds-class.rst asks for.
>
> Protocol: a 16-byte vendor CDB (opcode 0xec, 'A' 'S' signature,
> register index, argument count in cdb[13]). MODE 0x8021 (Static) must
> be written first in every sequence or the device ignores it; colours
> go to 0x8160 + 3 * led and 0x8100 + 3 * led (3 bytes, order R, B, G;
> both tables are written because firmware revisions pull from one or
> the other); APPLY 0x80a0 takes 0x01 to apply and 0xaa to save.
>
> The CDB cannot go through scsi_execute_cmd(): it sizes the command
> via scsi_command_size(opcode), which maps vendor opcode 0xec to
> 10 bytes, so cdb[13] is dropped and the device silently ignores the
> write (GOOD status, no error). The request is built with
> scsi_alloc_request() instead, which initializes the scsi_cmnd parts a
> passthrough needs (command buffer, lengths, rcu head), with cmd_len
> forced to 16, mirroring what SG_IO does from userspace.
>
> brightness_set only caches the colour and marks the LED in a per-zone
> dirty mask under a spinlock; led_mc_calc_color_components() runs under
> that lock too, because it writes the shared subled_info array and
> trigger events call led_set_brightness() without the led_access lock
> that serializes sysfs stores. A single work item per zone then
> snapshots the mask and colours and runs one ENE sequence for all
> pending LEDs (MODE, colour slots, APPLY, SAVE). Funneling every
> update through one work item keeps the sequences from interleaving
> between concurrent LED updates and batches multi-LED updates into a
> single APPLY/SAVE. A re-queued run with nothing pending returns
> before touching the device, so it cannot wear the flash with a
> pointless SAVE, and the lock keeps a colour write from being
> reordered after its dirty bit on weakly ordered architectures.
>
> This is the monolithic out-of-tree version as verified on hardware;
> the Kconfig/Makefile/MAINTAINERS wiring lands with the agreed split
> into a SCSI transport helper and a shared ASUS Aura LED interface.
>
> Signed-off-by: Liang Haowen <nbg2974@gmail.com>
> ---
> drivers/leds/rgb/leds-asus-aura-scsi.c | 392 +++++++++++++++++++++++++
> 1 file changed, 392 insertions(+)
> create mode 100644 drivers/leds/rgb/leds-asus-aura-scsi.c
Many (if not all?) of my review comments from v6 still stand.
I will not be reviewing this submission.
--
Lee Jones
next prev parent reply other threads:[~2026-09-23 10:46 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 10:30 [RFC v7 0/1] " Liang Haowen
2026-09-23 10:30 ` [RFC v7 1/1] " Liang Haowen
2026-09-23 10:45 ` Lee Jones [this message]
2026-09-23 11:19 ` Liang Haowen
2026-09-23 10:41 ` [RFC v7 0/1] " Ilpo Järvinen
2026-09-23 12:35 ` Denis Benato
2026-09-23 12:59 ` Liang Haowen
2026-09-23 15:11 ` Marco Scardovi
-- strict thread matches above, loose matches on Subject: below --
2026-09-01 14:26 [PATCH RFC 0/1] leds: add ASUS Aura SCSI " Liang Haowen
2026-09-01 14:34 ` [PATCH RFC 1/1] " Liang Haowen
2026-09-03 12:00 ` [PATCH RFC v2 0/1] leds: asus-aura-scsi: Add ASUS Aura RGB LED " Liang Haowen
2026-09-03 12:00 ` [PATCH RFC v2 1/1] " Liang Haowen
[not found] ` <20260903161357.GX2133376@google.com>
2026-09-04 12:30 ` [PATCH RFC v3 0/1] " Liang Haowen
2026-09-04 12:30 ` [PATCH RFC v3 1/1] " Liang Haowen
[not found] ` <20260904131503.355C41F00A3E@smtp.kernel.org>
[not found] ` <20260910093232.GO2133376@google.com>
2026-09-15 12:48 ` [PATCH RFC v4 0/1] " Liang Haowen
2026-09-15 12:49 ` [PATCH RFC v4 1/1] " Liang Haowen
[not found] ` <20260915130050.E8CDB1F000FF@smtp.kernel.org>
[not found] ` <20260916104305.GM11487@google.com>
2026-09-16 12:15 ` [PATCH RFC v5 0/1] " Liang Haowen
2026-09-16 12:15 ` [PATCH RFC v5 1/1] " Liang Haowen
[not found] ` <20260916122740.921E51F000FF@smtp.kernel.org>
[not found] ` <20260916130602.GS11487@google.com>
2026-09-16 14:22 ` [PATCH RFC v6 0/1] " Liang Haowen
2026-09-16 14:22 ` [PATCH RFC v6 1/1] " Liang Haowen
[not found] ` <20260916143832.520721F000FF@smtp.kernel.org>
[not found] ` <20260917112840.GJ1605367@google.com>
2026-09-17 11:49 ` Liang Haowen
2026-09-23 9:45 ` Lee Jones
2026-09-23 10:18 ` Liang Haowen
[not found] ` <20260923102812.2353292-1-nbg2974@gmail.com>
2026-09-23 10:12 ` Ilpo Järvinen
2026-09-16 14:23 ` [PATCH RFC v5 " Liang Haowen
2026-09-16 12:15 ` [PATCH RFC v4 " Liang Haowen
2026-09-15 12:49 ` [PATCH RFC v3 " Liang Haowen
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=20260923104559.GF3864833@google.com \
--to=lee@kernel.org \
--cc=W_Armin@gmx.de \
--cc=denis.benato@linux.dev \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mkp@kernel.org \
--cc=nbg2974@gmail.com \
--cc=pavel@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/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
all inboxes | Powered by JetHome®