Re: [PATCH net-next v6 2/2] net: pse-pd: add LED trigger support via notification path
From: Carlo Szelinsky
Date: Wed Dec 02 2026 - 12:37:13 EST
On Sun, 29 Nov 2026 12:15, sashiko-bot@xxxxxxxxxx wrote:
> In pse_controller_register(), pse_led_triggers_register() runs before
> pse_register_pw_ds() populates pcdev->pi[id].pw_d. If an LED with a
> matching default_trigger activates during trigger registration,
> pse_pw_d_is_sw_pw_control() sees pw_d == NULL and queries
> ops->pi_get_admin_state() instead of admin_state_enabled.
This is fine. pcdev->pi is zeroed, so pw_d is NULL, and then the core
reads the admin state from the hardware. That is the right state at
this point, as no PHY can get the PI yet.
> Even after pse_register_pw_ds() runs, pcdev->pi[id].admin_state_enabled
> remains zero-initialized until a consumer calls of_pse_control_get() ->
> pse_control_get_internal(), which then initializes admin_state_enabled
> without holding pcdev->lock or calling pse_led_update():
This one is right. If a port is already on when its PHY gets the PI,
the "enabled" LED can stay off until the next event. I'll fix it in
v7: pse_control_get_internal() will set admin_state_enabled under
pcdev->lock and call pse_led_update(). That lock order already exists
through __pse_control_release().
Carlo