From: Pavel Machek <pavel@ucw.cz>
To: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
craig.mcqueen@innerrange.com.au,
"Hans de Goede" <hdegoede@redhat.com>,
"Sakari Ailus" <sakari.ailus@linux.intel.com>,
"Matthieu CASTET" <matthieu.castet@parrot.com>,
"Dan Murphy" <dmurphy@ti.com>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Ben Whitten" <ben.whitten@gmail.com>,
"Bjorn Andersson" <bjorn.andersson@linaro.org>,
"Andrew Lunn" <andrew@lunn.ch>,
"Alan Mizrahi" <alan@mizrahi.com.ve>,
"Vadim Pasternak" <vadimp@mellanox.com>,
"David Lin" <dtwlin@google.com>, "Joel Stanley" <joel@jms.id.au>,
"Cédric Le Goater" <clg@kaod.org>, "Willy Tarreau" <w@1wt.eu>,
"Andrew Jeffery" <andrew@aj.id.au>,
"Javier Martinez Canillas" <javier@dowhile0.org>,
"Colin King" <colin.king@canonical.com>
Subject: Re: [PATCH] led: core: Fix race on software blink cancellation
Date: Thu, 8 Feb 2018 22:50:41 +0100 [thread overview]
Message-ID: <20180208215041.GA31216@amd> (raw)
In-Reply-To: <57a6d1f7-c1d0-3871-fed8-84d094dd079f@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1325 bytes --]
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
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2018-02-08 21:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-17 21:12 [PATCH] led: core: Fix race on software blink cancellation Jacek Anaszewski
2018-02-08 20:55 ` Jacek Anaszewski
2018-02-08 21:50 ` Pavel Machek [this message]
2018-02-09 21:35 ` Jacek Anaszewski
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=20180208215041.GA31216@amd \
--to=pavel@ucw.cz \
--cc=alan@mizrahi.com.ve \
--cc=andrew@aj.id.au \
--cc=andrew@lunn.ch \
--cc=andriy.shevchenko@linux.intel.com \
--cc=ben.whitten@gmail.com \
--cc=bjorn.andersson@linaro.org \
--cc=clg@kaod.org \
--cc=colin.king@canonical.com \
--cc=craig.mcqueen@innerrange.com.au \
--cc=dmurphy@ti.com \
--cc=dtwlin@google.com \
--cc=hdegoede@redhat.com \
--cc=jacek.anaszewski@gmail.com \
--cc=javier@dowhile0.org \
--cc=joel@jms.id.au \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=matthieu.castet@parrot.com \
--cc=sakari.ailus@linux.intel.com \
--cc=vadimp@mellanox.com \
--cc=w@1wt.eu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.