diff options
| author | Heiner Kallweit <[email protected]> | 2023-12-21 18:31:48 +0100 |
|---|---|---|
| committer | Lee Jones <[email protected]> | 2024-03-07 08:47:50 +0000 |
| commit | f574751cdfac6645a050e64ea3107a57ae13b816 (patch) | |
| tree | 098946693e3d6604debb1b72bdd8693d4810522e /tools/perf/scripts/python | |
| parent | 888cd6e721558a818f9900a98744088f5fca3f5c (diff) | |
leds: trigger: netdev: Skip setting baseline state in activate if hw-controlled
The current codes uses the sw_control path in set_baseline_state() when
called from netdev_trig_activate() even if we're hw-controlled. This
may result in errors when led_set_brightness() is called because we may
not have set_brightness led ops (if hw doesn't support setting a "LED"
to ON). In addition this path may schedule trigger_data->work which
doesn't make sense when being hw-controlled.
Therefore set trigger_data->hw_control = true before calling
set_device_name() from netdev_trig_activate(). In this call chain we
have to prevent set_baseline_state() from being called, because this
would call hw_control_set(). Use led_cdev->trigger_data == NULL as
indicator for being called from netdev_trig_activate().
Signed-off-by: Heiner Kallweit <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Lee Jones <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions