Thread (7 messages) flat view 7 messages, 4 authors, 2021-08-21

Re: [PATCH v5] brcmfmac: firmware: Fix firmware loading

From: Arend van Spriel <arend.vanspriel@broadcom.com>
Date: 2021-08-09 08:23:57

On 8/8/2021 8:05 PM, Dmitry Osipenko wrote:
From: Linus Walleij <redacted>

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.

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.

Regards,
Arend

-- 
This electronic communication and the information and any files transmitted 
with it, or attached to it, are confidential and are intended solely for 
the use of the individual or entity to whom it is addressed and may contain 
information that is confidential, legally privileged, protected by privacy 
laws, or otherwise restricted from disclosure to anyone else. If you are 
not the intended recipient or the person responsible for delivering the 
e-mail to the intended recipient, you are hereby notified that any use, 
copying, distributing, dissemination, forwarding, printing, or copying of 
this e-mail is strictly prohibited. If you received this e-mail in error, 
please return the e-mail to the sender, delete it from your computer, and 
destroy any printed copy of it.

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help