public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jacek Anaszewski <j.anaszewski@samsung.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: "Kim, Milo" <milo.kim@ti.com>,
	linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
	Richard Purdie <rpurdie@rpsys.net>, Bryan Wu <cooloney@gmail.com>
Subject: Re: [PATCH] leds:lp55xx: Correct Kconfig dependency for f/w user helper
Date: Tue, 08 Sep 2015 09:37:35 +0200	[thread overview]
Message-ID: <55EE903F.9000209@samsung.com> (raw)
In-Reply-To: <s5hwpw1fqjl.wl-tiwai@suse.de>

On 09/08/2015 07:06 AM, Takashi Iwai wrote:
> On Tue, 08 Sep 2015 02:30:07 +0200,
> Kim, Milo wrote:
>>
>> Hi Takashi,
>>
>> On 9/7/2015 11:19 PM, Jacek Anaszewski wrote:
>>> Hi Takashi,
>>>
>>> Thanks for chasing this.
>>> Milo, could you express your opinion?
>>>
>>> On 09/07/2015 02:25 PM, Takashi Iwai wrote:
>>>> The commit [b67893206fc0: leds:lp55xx: fix firmware loading error]
>>>> tries to address the firmware file handling with user helper, but it
>>>> sets a wrong Kconfig CONFIG_FW_LOADER_USER_HELPER_FALLBACK.  Since the
>>>> wrong option was enabled, the system got a regression -- it suffers
>>>> from the unexpected long delays for non-present firmware files.
>>>>
>>>> This patch corrects the Kconfig dependency to the right one,
>>>> CONFIG_FW_LOADER_USER_HELPER.  This doesn't change the fallback
>>>> behavior but only enables UMH when needed.
>>>>
>>>> Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=944661
>>>> Fixes: b67893206fc0 ('leds:lp55xx: fix firmware loading error')
>>>> Cc: <stable@vger.kernel.org> # v4.2+
>>>> Signed-off-by: Takashi Iwai <tiwai@suse.de>
>>>> ---
>>>>     drivers/leds/Kconfig | 2 +-
>>>>     1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
>>>> index 70f4255ff291..2ba52bc2e174 100644
>>>> --- a/drivers/leds/Kconfig
>>>> +++ b/drivers/leds/Kconfig
>>>> @@ -229,7 +229,7 @@ config LEDS_LP55XX_COMMON
>>>>     	tristate "Common Driver for TI/National LP5521/5523/55231/5562/8501"
>>>>     	depends on LEDS_LP5521 || LEDS_LP5523 || LEDS_LP5562 || LEDS_LP8501
>>>>     	select FW_LOADER
>>>> -	select FW_LOADER_USER_HELPER_FALLBACK
>>>> +	select FW_LOADER_USER_HELPER
>>>>     	help
>>>>     	  This option supports common operations for LP5521/5523/55231/5562/8501
>>>>     	  devices.
>>
>> Thank for catching this. It seems I misunderstood firmware helper
>> configuration. LP55xx driver uses firmware interface to activate LED
>> visual effect. So this driver enables FW_LOADER_USER_HELPER_FALLBACK and
>> calls request_firmware_nowait() without uevent. Then, it will try to
>> load raw data manually when binary(firmware) file doesn't exist.
>>
>> I'm still not clear what the difference is between FW_LOADER_USER_HELPER
>> and FW_LOADER_USER_HELPER_FALLBACK. Kconfig description makes me confused.
>> Could you explain it in more details?
>
> FW_LOADER_USER_HELPER_FALLBACK globally enables the fallback to user
> helper mode when no file is loaded by the direct f/w loader.  It
> automatically sets FW_LOADER_USER_HELPER.
>
> OTOH, when FW_LOADER_USER_HELPER is set, requeset_firmware_nowait()
> does user mode fallback only when uevent (the second) argument is
> false.  Note that this is a special case.  In the usual cases --
> uevent = true or request_firmware() -- its doesn't enable the
> fallback.
>
> The fallback to user helper mode is bad for the recent udev, since
> udev already dropped the f/w support code completely.  Thus every
> non-existing f/w load will result in 60 seconds stall.
>
> In short, FW_LOAD_USER_HELPER_FALLBACK is present mostly only for
> older systems, just for compatibility.  For drivers that need the no
> direct f/w load and no udev interaction, set FW_LOAD_USER_HELPER
> instead.

Merged to fixes-for-4.3 branch of linux-leds.git.
Thanks for this explanation.

-- 
Best Regards,
Jacek Anaszewski

  reply	other threads:[~2015-09-08  7:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-07 12:25 [PATCH] leds:lp55xx: Correct Kconfig dependency for f/w user helper Takashi Iwai
2015-09-07 14:19 ` Jacek Anaszewski
2015-09-08  0:30   ` Kim, Milo
2015-09-08  5:06     ` Takashi Iwai
2015-09-08  7:37       ` Jacek Anaszewski [this message]
2015-09-08  8:25       ` Kim, Milo
2015-09-08  9:03         ` Takashi Iwai

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=55EE903F.9000209@samsung.com \
    --to=j.anaszewski@samsung.com \
    --cc=cooloney@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=milo.kim@ti.com \
    --cc=rpurdie@rpsys.net \
    --cc=tiwai@suse.de \
    /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