From: sashiko-bot@kernel.org
To: "Artem Shimko" <a.shimko.dev@gmail.com>
Cc: devicetree@vger.kernel.org, linux-leds@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org, lee@kernel.org
Subject: Re: [PATCH net-next v9 2/2] net: phy: dap8211r: add PHY LED control support
Date: Sat, 05 Dec 2026 08:15:05 +0000 [thread overview]
Message-ID: <sashiko-outbox-251259@kernel.org> (raw)
In-Reply-To: <20261204081448.3199171-3-a.shimko.dev@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] net: phy: dap8211r: dap8211r_led_hw_control_get() ignores LED
force mode
--
commit 85921fb87a4aee5097a4e8dcd4ee62712d18ce09
Author: Artem Shimko <a.shimko.dev@gmail.com>
net: phy: dap8211r: add PHY LED control support
This commit adds brightness and hardware-controlled netdev trigger LED
support for the DAP8211R PHY, along with a dap8211r_write_ext() helper.
> diff --git a/drivers/net/phy/dap8211r.c b/drivers/net/phy/dap8211r.c
> index 1fe20efd394d7..c6d18312c8c34 100644
> --- a/drivers/net/phy/dap8211r.c
> +++ b/drivers/net/phy/dap8211r.c
[ ... ]
> +static int dap8211r_led_hw_control_get(struct phy_device *phydev, u8 index, unsigned long *rules)
> +{
> + u16 led_reg;
> + int led_mode = 0;
> +
> + switch (index) {
> + case DAP8211R_LED_ID_0 ... DAP8211R_LED_ID_2:
> + led_reg = DAP8211R_LED_0_CON + index;
> + break;
> + default:
> + return -EINVAL;
> + }
> +
> + led_mode = dap8211r_read_ext(phydev, led_reg);
> + if (led_mode < 0)
> + return led_mode;
> +
> + if (led_mode & ~DAP8211R_LED_SUPPORTED_MASK)
> + return -EOPNOTSUPP;
[Severity: Medium]
Should dap8211r_led_hw_control_get() check DAP8211R_LED_FORCE_EN(index) in
DAP8211R_LED_COMCON and return -EOPNOTSUPP when force mode is active?
When force mode is enabled, the PHY drives the LED from DAP8211R_LED_COMCON
rather than led_reg. If an LED is forced on via brightness and the netdev
trigger is then activated, netdev_trig_activate() gets 0 with empty rules
and reports hardware offload in sysfs while the LED stays forced on.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261204081448.3199171-1-a.shimko.dev@gmail.com?part=2
next prev parent reply other threads:[~2026-12-05 8:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 8:14 [PATCH net-next v9 0/2] net: phy: dap8211r: add LED control support Artem Shimko
2026-12-04 8:14 ` [PATCH net-next v9 1/2] net: phy: dap8211r: fix kernel-doc comments for extended register helpers Artem Shimko
2026-12-04 8:14 ` [PATCH net-next v9 2/2] net: phy: dap8211r: add PHY LED control support Artem Shimko
2026-12-05 8:15 ` sashiko-bot [this message]
2026-12-05 8:42 ` Artem Shimko
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=sashiko-outbox-251259@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=a.shimko.dev@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lee@kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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