2023-03-09 18:17:27

by Diederik de Haas

[permalink] [raw]
Subject: brcm/brcmfmac4356-pcie.bin failed with error -2

Hi,

In https://bugs.debian.org/1032367 we have a user who reported that the
brcm/brcmfmac4356-pcie.bin firmware file failed to load with a new firmware-
brcm80211 package, while it succeeded with an old one.

In https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/
I found 2 commits that seem relevant:
- 04f71fe564552c22dc7ece0d2b8afc11b33de392 where various cypress firmware and
clm_blob files (including 4356) were added to the *cypress* directory.
- 0f0aefd733f70beae4c0246edbd2c158d5ce974c which removed old brcm firmware files
that have a newer cypress variant ... from the *brcm* directory.

So in essence a bunch of firmware files were moved from 'brcm' dir to 'cypress'.

I don't know how the firmware file loading mechanism works, but could it be that
it (also) needs to look in the new (cypress) location for those files?

Or is the issue somewhere else (f.e. in Debian)?

Cheers,
Diederik


Attachments:
signature.asc (228.00 B)
This is a digitally signed message part.

2023-03-10 16:35:48

by Diederik de Haas

[permalink] [raw]
Subject: Re: brcm/brcmfmac4356-pcie.bin failed with error -2

On Thursday, 9 March 2023 19:17:10 CET Diederik de Haas wrote:
> In https://bugs.debian.org/1032367 we have a user who reported that the
> brcm/brcmfmac4356-pcie.bin firmware file failed to load with a new firmware-
> brcm80211 package, while it succeeded with an old one.
>
> In
> https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
> / I found 2 commits that seem relevant:
> - 04f71fe564552c22dc7ece0d2b8afc11b33de392 where various cypress firmware
> and clm_blob files (including 4356) were added to the *cypress* directory.
> - 0f0aefd733f70beae4c0246edbd2c158d5ce974c which removed old brcm firmware
> files that have a newer cypress variant ... from the *brcm* directory.
>
> So in essence a bunch of firmware files were moved from 'brcm' dir to
> 'cypress'.
>
> I don't know how the firmware file loading mechanism works, but could it be
> that it (also) needs to look in the new (cypress) location for those files?

I am now reasonably certain that that is indeed the issue.

I asked the reporter of the issue to create symlinks and that 'fixed' it:

On Friday, 10 March 2023 13:07:22 CET [email protected] wrote:
> March 10, 2023 10:57 AM, "Diederik de Haas" <[email protected]> wrote:
> > I'm 99% sure this would be a *workaround*, but let's verify anyway:
> > In the /lib/firmware directory, create a symlink from
> > brcm/brcmfmac4356-pcie.bin to cypress/cyfmac4356-pcie.bin
>
> As expected, it works with the symlink :)

AFAICT in drivers/net/wireless/broadcom/brcm80211/brcmfmac/ there is pcie.c
and firmware.[c|h] and it uses BRCMF_FW_DEFAULT_PATH (="brcm/") to construct
the location of the firmware files.

Now that several firmware files are stored in a different directory ('cypress')
and also have a different file 'prefix' ('cyfmac') the firmware files that are
stored in/moved to the cypress directory are no longer found.

Cheers,
Diederik


Attachments:
signature.asc (228.00 B)
This is a digitally signed message part.