lkml.org 
[lkml]   [2018]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] led: core: Fix race on software blink cancellation
Hi!

> Any comments? I'd like to have some acks before applying
> this patch.

I can't say I like it.

> > Commit d23a22a74fde ("leds: delay led_set_brightness if stopping soft-blink")
> > made a modifications to the LED core allowing for led_set_brightness() to be
> > called from hard-irq context when soft blink is being handled in soft-irq.
> >
> > Since that time LED core has undergone modifications related to addition of
> > generic support for delegating brightness setting to a workqueue as well as
> > subsequent fixes for blink setting use cases.
> >
> > After that the LED core code became hard to maintain and analyze, especially
> > due to the imposed hard-irq context compatibility. It also turned out that
> > in some cases a LED remained off after executing following sequence of commands:
> >
> > 1. echo timer > trigger
> > 2. echo 0 > brightness
> > 3. echo 100 > brightness
> >
> > The reason was LED_BLINK_DISABLE operation delegated to a set_brightness_work,
> > triggered in 2., which was handled after 3. took effect.

Could we wait for delayed work to be done before setting the
brightness to fix this one?

Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2018-02-08 22:51    [W:0.077 / U:0.856 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site