From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753773AbbIHHhq (ORCPT ); Tue, 8 Sep 2015 03:37:46 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:41094 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753574AbbIHHhi (ORCPT ); Tue, 8 Sep 2015 03:37:38 -0400 X-AuditID: cbfec7f4-f79c56d0000012ee-1f-55ee9040810e Message-id: <55EE903F.9000209@samsung.com> Date: Tue, 08 Sep 2015 09:37:35 +0200 From: Jacek Anaszewski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8 MIME-version: 1.0 To: Takashi Iwai Cc: "Kim, Milo" , linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Purdie , Bryan Wu Subject: Re: [PATCH] leds:lp55xx: Correct Kconfig dependency for f/w user helper References: <1441628701-3022-1-git-send-email-tiwai@suse.de> <55ED9CE1.1080002@samsung.com> <55EE2C0F.5040101@ti.com> In-reply-to: Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrOLMWRmVeSWpSXmKPExsVy+t/xq7oOE96FGnx/xGRxdOdEJovLu+aw WWx9s47RYvmvdSwWu3c9ZbV4ufkNkwObx85Zd9k99sz/weqx+XS1x/Eb25k8Pm+SC2CN4rJJ Sc3JLEst0rdL4MqYc2ETe8F3qYq3Xz8xNzDOEOti5OSQEDCRWLynmQXCFpO4cG89WxcjF4eQ wFJGiZVv9kM5zxgl1r07x9zFyMHBK6AlMfmiC0gDi4CqxKSOx6wgNpuAocTPF6+ZQGxRgQiJ P6f3gcV5BQQlfky+B7ZAREBB4s2re4wgM5kFFjFKrN17nhkkISwQIPFh5gx2iGUzGCXuHT7A DpLgFNCW2LpjP5jNLGAtsXLSNkYIW15i85q3zBMYBWYhWTILSdksJGULGJlXMYqmliYXFCel 5xrqFSfmFpfmpesl5+duYoQE95cdjIuPWR1iFOBgVOLh1fB4FyrEmlhWXJl7iFGCg1lJhNeG DyjEm5JYWZValB9fVJqTWnyIUZqDRUmcd+6u9yFCAumJJanZqakFqUUwWSYOTqkGxnUNC/cy vA7WP2f3ymHN9PojFhGtDIu8n27X4H05v/v59zvOe4N3WPG/ucrTa7ijI19c2X9CtMAh487T rDJHRLdJ3FM/03BX2CH12oXb35Pk51/emORuIPrA66JXzLHW47ebJc+wSC558Pwio6dk7tuN tivfRLsuSGFavjpc4eJv9r6yqeePWyqxFGckGmoxFxUnAgCVwfEOagIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: # v4.2+ >>>> Signed-off-by: Takashi Iwai >>>> --- >>>> 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