Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751216AbdHCFz2 (ORCPT ); Thu, 3 Aug 2017 01:55:28 -0400 Received: from mga06.intel.com ([134.134.136.31]:15643 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751079AbdHCFz0 (ORCPT ); Thu, 3 Aug 2017 01:55:26 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,314,1498546800"; d="scan'208";a="1158511641" From: "Coelho, Luciano" To: "kvalo@codeaurora.org" , "mcgrof@kernel.org" CC: "pieter-paul.giesberts@broadcom.com" , "bjorn.andersson@linaro.org" , "arend.vanspriel@broadcom.com" , "hante.meuleman@broadcom.com" , "gregkh@linuxfoundation.org" , "keescook@chromium.org" , "linux-wireless@vger.kernel.org" , "alan@linux.intel.com" , "moritz.fischer@ettus.com" , "pjones@redhat.com" , "wagi@monom.org" , "pmladek@suse.com" , "atull@kernel.org" , "yi1.li@linux.intel.com" , "wright.feng@cypress.com" , "torvalds@linux-foundation.org" , "netdev@vger.kernel.org" , "luto@kernel.org" , "dwmw2@infradead.org" , "takahiro.akashi@linaro.org" , "rjw@rjwysocki.net" , "hdegoede@redhat.com" , "rafal@milecki.pl" , "Berg, Johannes" , "zajec5@gmail.com" , "tytso@mit.edu" , "dhowells@redhat.com" , "Grumbach, Emmanuel" , "chi-hsien.lin@cypress.com" , "linux-kernel@vger.kernel.org" , "franky.lin@broadcom.com" Subject: Re: [PATCH V5 1/2] firmware: add more flexible request_firmware_async function Thread-Topic: [PATCH V5 1/2] firmware: add more flexible request_firmware_async function Thread-Index: AQHTDBiSWvNlLlZZC0eAt1I8q/Vrx6JyETWA Date: Thu, 3 Aug 2017 05:55:18 +0000 Message-ID: <1501739717.15969.26.camel@intel.com> References: <20170731150945.8925-1-zajec5@gmail.com> <20170802213010.GM18884@wotan.suse.de> <878tj1ql6z.fsf@kamboji.qca.qualcomm.com> In-Reply-To: <878tj1ql6z.fsf@kamboji.qca.qualcomm.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.252.1.64] Content-Type: text/plain; charset="utf-8" Content-ID: <4AB7B851FAA7AE4099970A3B579A0A7A@intel.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id v735taWl020290 Content-Length: 1831 Lines: 43 On Thu, 2017-08-03 at 08:23 +0300, Kalle Valo wrote: > "Luis R. Rodriguez" writes: > > > > +int request_firmware_nowait(struct module *module, bool uevent, > > > + const char *name, struct device *device, gfp_t gfp, > > > + void *context, > > > + void (*cont)(const struct firmware *fw, void *context)) > > > +{ > > > + unsigned int opt_flags = FW_OPT_FALLBACK | > > > + (uevent ? FW_OPT_UEVENT : FW_OPT_USERHELPER); > > > + > > > + return __request_firmware_nowait(module, opt_flags, name, device, gfp, > > > + context, cont); > > > +} > > > EXPORT_SYMBOL(request_firmware_nowait); > > > > > > +int __request_firmware_async(struct module *module, const char *name, > > > + struct firmware_opts *fw_opts, struct device *dev, > > > + void *context, > > > + void (*cont)(const struct firmware *fw, void *context)) > > > +{ > > > + unsigned int opt_flags = FW_OPT_UEVENT; > > > > This exposes a long issue. Think -- why do we want this enabled by default? Its > > actually because even though the fallback stuff is optional and can be, the uevent > > internal flag *also* provides caching support as a side consequence only. We > > don't want to add a new API without first cleaning up that mess. > > > > This is a slipery slope and best to clean that up before adding any new API. > > > > That and also Greg recently stated he would like to see at least 3 users of > > a feature before adding it. Although I think that's pretty arbitrary, and > > considering that request_firmware_into_buf() only has *one* user -- its what > > he wishes. > > ath10k at least needs a way to silence the warning for missing firmware > and I think iwlwifi also. Yes, iwlwifi needs to silence the warning. It the feature (only one, really) that I've been waiting for. -- Luca.