mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arend van Spriel <arend.vanspriel@broadcom.com>
To: "Rafał Miłecki" <zajec5@gmail.com>,
	"Luis R . Rodriguez" <mcgrof@kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: "Bjorn Andersson" <bjorn.andersson@linaro.org>,
	"Daniel Wagner" <wagi@monom.org>,
	"David Woodhouse" <dwmw2@infradead.org>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	yi1.li@linux.intel.com, atull@kernel.org,
	"Moritz Fischer" <moritz.fischer@ettus.com>,
	pmladek@suse.com, "Johannes Berg" <johannes.berg@intel.com>,
	emmanuel.grumbach@intel.com, luciano.coelho@intel.com,
	"Kalle Valo" <kvalo@codeaurora.org>,
	luto@kernel.org, "Linus Torvalds" <torvalds@linux-foundation.org>,
	"Kees Cook" <keescook@chromium.org>,
	"AKASHI Takahiro" <takahiro.akashi@linaro.org>,
	"David Howells" <dhowells@redhat.com>,
	pjones@redhat.com, "Hans de Goede" <hdegoede@redhat.com>,
	alan@linux.intel.com, tytso@mit.edu,
	lkml <linux-kernel@vger.kernel.org>,
	"Franky Lin" <franky.lin@broadcom.com>,
	"Hante Meuleman" <hante.meuleman@broadcom.com>,
	"Chi-Hsien Lin" <chi-hsien.lin@cypress.com>,
	"Wright Feng" <wright.feng@cypress.com>,
	"Pieter-Paul Giesberts" <pieter-paul.giesberts@broadcom.com>,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	"Rafał Miłecki" <rafal@milecki.pl>
Subject: Re: [PATCH V5 2/2] brcmfmac: don't warn user about NVRAM if fallback to the platform one succeeds
Date: Tue, 1 Aug 2017 23:20:32 +0200	[thread overview]
Message-ID: <d50d2577-b9d3-27f1-6e3d-8e0dc4ec2024@broadcom.com> (raw)
In-Reply-To: <20170731150945.8925-2-zajec5@gmail.com>

On 31-07-17 17:09, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> Failing to load NVRAM *file* isn't critical if we manage to get platform
> NVRAM in the fallback path. It means warnings like:
> [   10.801506] brcmfmac 0000:01:00.0: Direct firmware load for brcm/brcmfmac43602-pcie.txt failed with error -2
> are unnecessary & disturbing for people with *platform* NVRAM as they
> are not expected to have NVRAM file. This is a very common case for
> Broadcom home routers.
> 
> Instead of printing warning immediately within the firmware subsystem
> let's try our fallback code first. If that fails as well, then it's a
> right moment to print an error.
> 
> This should reduce amount of false reports from users seeing this
> warning while having wireless working perfectly fine with the platform
> NVRAM.

Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
> V2: Update commit message as it wasn't clear enough (thanks Andy) & add extra
>     messages to the firmware.c.
> V3: Set FW_OPT_UEVENT to don't change behavior
> V4: Switch to the new request_firmware_async syntax
> V5: Rebase, update commit message, resend after drvdata discussion
> ---
>  .../wireless/broadcom/brcm80211/brcmfmac/firmware.c    | 18 +++++++++++++-----
>  1 file changed, 13 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
> index d231042f19d6..524442b3870f 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c
> @@ -462,8 +462,14 @@ static void brcmf_fw_request_nvram_done(const struct firmware *fw, void *ctx)
>  		raw_nvram = false;
>  	} else {
>  		data = bcm47xx_nvram_get_contents(&data_len);
> -		if (!data && !(fwctx->flags & BRCMF_FW_REQ_NV_OPTIONAL))
> -			goto fail;
> +		if (!data) {
> +			brcmf_dbg(TRACE, "Failed to get platform NVRAM\n");

Better make this INFO level instead of TRACE. The intent of TRACE level
is for entry/exit points in functions.

Regards,
Arend

  reply	other threads:[~2017-08-01 21:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-31 15:09 [PATCH V5 1/2] firmware: add more flexible request_firmware_async function Rafał Miłecki
2017-07-31 15:09 ` [PATCH V5 2/2] brcmfmac: don't warn user about NVRAM if fallback to the platform one succeeds Rafał Miłecki
2017-08-01 21:20   ` Arend van Spriel [this message]
2017-07-31 23:01 ` [PATCH V5 1/2] firmware: add more flexible request_firmware_async function kbuild test robot
2017-08-02 21:30 ` Luis R. Rodriguez
2017-08-03  5:23   ` Kalle Valo
2017-08-03  5:55     ` Coelho, Luciano
2017-08-03 16:31       ` Luis R. Rodriguez
2017-08-10 17:07       ` Luis R. Rodriguez
2017-08-10 17:05     ` Luis R. Rodriguez

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=d50d2577-b9d3-27f1-6e3d-8e0dc4ec2024@broadcom.com \
    --to=arend.vanspriel@broadcom.com \
    --cc=alan@linux.intel.com \
    --cc=atull@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=chi-hsien.lin@cypress.com \
    --cc=dhowells@redhat.com \
    --cc=dwmw2@infradead.org \
    --cc=emmanuel.grumbach@intel.com \
    --cc=franky.lin@broadcom.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hante.meuleman@broadcom.com \
    --cc=hdegoede@redhat.com \
    --cc=johannes.berg@intel.com \
    --cc=keescook@chromium.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luciano.coelho@intel.com \
    --cc=luto@kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=moritz.fischer@ettus.com \
    --cc=netdev@vger.kernel.org \
    --cc=pieter-paul.giesberts@broadcom.com \
    --cc=pjones@redhat.com \
    --cc=pmladek@suse.com \
    --cc=rafal@milecki.pl \
    --cc=rjw@rjwysocki.net \
    --cc=takahiro.akashi@linaro.org \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    --cc=wagi@monom.org \
    --cc=wright.feng@cypress.com \
    --cc=yi1.li@linux.intel.com \
    --cc=zajec5@gmail.com \
    /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

all inboxes | Powered by JetHome®