Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 411899

Summary: kernel 3.3 fails to initialize bnx2 due to invalid firmware reference
Product: Gentoo Linux Reporter: kfm
Component: [OLD] Core systemAssignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers <kernel>
Status: RESOLVED FIXED    
Severity: normal CC: dflogeras2, dieterv, eby
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: 2400_bnx2-invalid-firmware-reference.patch

Description kfm 2012-04-13 23:45:17 UTC
Created attachment 308837 [details, diff]
2400_bnx2-invalid-firmware-reference.patch

As per inline comment from attached patch:-

Upon booting 3.3.2 with CONFIG_BNX2 and CONFIG_FIRMWARE_IN_KERNEL=y on a
PowerEdge R410 server, I was greeted with the following error:

bnx2: Can't load firmware file "bnx2/bnx2-mips-09-6.2.1b.fw"

It transpires that the source tree does not contain the above mentioned
revision. Fix that by having the bnx2 driver import "bnx2-mips-09-6.2.1a.fw".
Comment 1 Mike Pagano gentoo-dev 2012-04-26 00:03:57 UTC
How you considered upgrading to linux-fireware-20120219?
Comment 2 kfm 2012-05-28 10:19:19 UTC
Hi Mike. Sorry to have taken so long to respond. The thing is, I don't use linux-firmware. It's true that the linux-firmware tree does contain the exact revision of the firmware blob referred to. The fact remains, though, that the kernel sources themselves are currently broken. There's clearly no point in bundling a blob which cannot be used.

I contacted Michael Chan at Broadcom. According to him, the kernel maintainers would rather not carry firmware in the kernel tree and that he might submit a patch to remove the firmware.

OK. So, maybe at some point in the future, the linux kernel tree will be pristine and free of firmware blobs. But that certainly isn't the case today and I can't see it happening in the near future.

So, do we set a precedent that no kernel driver depending on loadable firmware can be expected to work unless linux-firmware is installed beforehand? That would raise a number of concerns:

* The handbook doesn't cover the linux-firmware package at all
* The kernel-2 eclass doesn't depend on linux-firmware
* How would stable keywording be handled?

The latter point is a particularly interesting one. Gentoo users are free to install, build and run a wide variety of kernels. How would one determine which revision of linux-firmware is 'stable'?

Personally, I have no intention of relying upon linux-firmware until such time as I have no other choice. The reason for that is that I deploy kernel builds to multiple distros and the expectation that the kernel tree contains the firmware that I need makes things a good deal simpler. Indeed, that's why I use CONFIG_FIRMWARE_IN_KERNEL. I can well do without the confusion as to whether the linux-firmware packages in Gentoo or Ubuntu are supplying the correct blob each on each occasion that I build a kernel (or each occasion that I reboot if I disable FIRMWARE_IN_KERNEL).

My patch would break things for linux-firmware users so, in retrospect, that's not a good solution. All I can suggest is that we instead patch in bnx2-mips-09-6.2.1b.fw itself. That would address this bug while also allowing for the firmware to be consumed from linux-firmware. Would you accept such a patch?
Comment 3 David Flogeras 2012-06-21 22:22:32 UTC
I hit this today now that 3.3.8 is stable on amd64. What I did (temporarily?) was installed the linux-firmware package (which pulled in 42 odd MB of firmwares I don't want/need).

Is linux-firmware the recommended way of moving ahead?

If so, how can I tell the kernel to build bnx2.ko but _NOT_ install its firmware files, as it will clobber the ones installed by linux-firmware whenever I make modules_install?
Comment 4 Mike Pagano gentoo-dev 2012-06-21 23:10:45 UTC
I wonder if you installed with USE=deblob that would prevent the firmware from being installed.
Comment 5 Mike Pagano gentoo-dev 2012-06-21 23:13:17 UTC
try CONFIG_FIRMWARE_IN_KERNEL=n
Comment 6 Mike Pagano gentoo-dev 2012-06-22 00:02:41 UTC
Ok, you will have to unmask it, but Kerin's patch is now in gentoo-sources-3.3.8-r1. 

I should have got this in before asking for stabilization, but real life is getting very difficult lately and I am the only one maintaining gs these days.
Comment 7 Eby 2012-06-27 20:48:00 UTC
FYI I had same issue with both the original and 3.3.8-r1. The error I got was referring to bnx2/bnx2-mips-06-6.2.3.fw instead of the 6.2.1b

I checked the firmware directory that that did not exist for 06. Instead I changed it to:

#define FW_MIPS_FILE_06         "bnx2/bnx2-mips-06-6.2.1.fw"

which exists

Not sure if anyone can confirm this is the case.

My card is 03:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5708 Gigabit Ethernet (rev 12)
Comment 8 kfm 2012-06-27 20:53:45 UTC
Re: Comment #7 - it looks like exactly the same issue, just with a different card and firmware dependency. Mine is a Broadcom NetXtreme II BCM5716.

While the long term goal is supposed to be to remove firmware from the linux sources, it's unfortunately that upstream are allowing things to rot in the meantime. Patching so as to refer to the old firmware is a simple solution but not ideal because the new firmware will usually fix bugs.