All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arend van Spriel <aspriel@gmail.com>
To: Dmitry Osipenko <digetx@gmail.com>,
	Arend van Spriel <arend.vanspriel@broadcom.com>,
	Franky Lin <franky.lin@broadcom.com>,
	Hante Meuleman <hante.meuleman@broadcom.com>,
	"Chi-hsien Lin" <chi-hsien.lin@infineon.com>,
	Wright Feng <wright.feng@infineon.com>,
	"Chung-hsien Hsu" <chung-hsien.hsu@infineon.com>,
	Kalle Valo <kvalo@codeaurora.org>,
	Linus Walleij <linus.walleij@linaro.org>
Cc: <linux-wireless@vger.kernel.org>, Stefan Hansson <newbyte@disroot.org>
Subject: Re: [PATCH v5] brcmfmac: firmware: Fix firmware loading
Date: Mon, 09 Aug 2021 17:42:29 +0200	[thread overview]
Message-ID: <17b2b945e88.279b.9696ff82abe5fb6502268bdc3b0467d4@gmail.com> (raw)
In-Reply-To: <36277b51-b647-898c-c1b4-a0e363c52b0d@gmail.com>

On August 9, 2021 4:56:46 PM Dmitry Osipenko <digetx@gmail.com> wrote:

> 09.08.2021 11:23, Arend van Spriel пишет:
>> On 8/8/2021 8:05 PM, Dmitry Osipenko wrote:
>>> From: Linus Walleij <linus.walleij@linaro.org>
>>>
>>> The patch that would first try the board-specific firmware
>>> had a bug because the fallback would not be called: the
>>> asynchronous interface is used meaning request_firmware_nowait()
>>> returns 0 immediately.
>>>
>>> Harden the firmware loading like this:
>>>
>>> - If we cannot build an alt_path (like if no board_type is
>>>   specified) just request the first firmware without any
>>>   suffix, like in the past.
>>>
>>> - If the lookup of a board specific firmware fails, we get
>>>   a NULL fw in the async callback, so just try again without
>>>   the alt_path from a dedicated brcm_fw_request_done_alt_path
>>>   callback.
>>>
>>> - Drop the unnecessary prototype of brcm_fw_request_done.
>>>
>>> - Added MODULE_FIRMWARE match for per-board SDIO bins, making
>>>   userspace tools to pull all the relevant firmware files.
>> The original idea was to setup the path names in
>> brcmf_fw_alloc_request() function, but with the introduction of the
>> board_type for NVRAM files that was abandoned and we cook up alternative
>> paths. Now similar is done for the firmware files. So I would want to
>> rework the code, but for now I am going with Linus's/Your fix for the
>> sake of having the regression more or less quickly resolved.
>
> Thanks, indeed it could be improved further later on.
>
>> You reported an issue earlier where the firmware callback was called
>> from the probe context causing it to hang and it is not clear to me
>> whether that is fixed with this version of the patch.
>
> It's independent minor problem that can't be easily reproduced in
> practice and seems it existed for a long time. It's not fixed by this patch.

Ok. I understand the issue and I have a fix lined up for it. I noticed my 
reviewed-by tag got lost between V2 and latest version. Feel free to add it 
back.

Regards,
Arend



  reply	other threads:[~2021-08-09 15:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-08 18:05 [PATCH v5] brcmfmac: firmware: Fix firmware loading Dmitry Osipenko
2021-08-09  8:23 ` Arend van Spriel
2021-08-09 14:56   ` Dmitry Osipenko
2021-08-09 15:42     ` Arend van Spriel [this message]
2021-08-09 15:58       ` Dmitry Osipenko
2021-08-10 14:15 ` Dmitry Osipenko
2021-08-21 15:46 ` Kalle Valo

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=17b2b945e88.279b.9696ff82abe5fb6502268bdc3b0467d4@gmail.com \
    --to=aspriel@gmail.com \
    --cc=arend.vanspriel@broadcom.com \
    --cc=chi-hsien.lin@infineon.com \
    --cc=chung-hsien.hsu@infineon.com \
    --cc=digetx@gmail.com \
    --cc=franky.lin@broadcom.com \
    --cc=hante.meuleman@broadcom.com \
    --cc=kvalo@codeaurora.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=newbyte@disroot.org \
    --cc=wright.feng@infineon.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 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.