Skip to contentSkip to conversation

drivers/net/ethernet/broadcom/bnx2.c

PATCH Michael Chan 3 participants 7 messages May 1, 2014 – May 2, 2014 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 9 lines · Magnos A. Hammes

Hello,

I have a Dell server with the following Broadcom gigabit network adapter that uses the bnx2 driver:

01:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5716 Gigabit Ethernet (rev 20)

Quoted 7 lines

I was using kernel 3.2.57 and 3.13.3, but in both of them I faced some trouble to make the ethernet adapter work, whatever version of this two kernels that I try to boot I get the same error:

Can't load firmware file "bnx2/bnx2-mips-09-6.2.1b.fw" Direct firmware load failed with error -2

We no longer put the firmware in the kernel tree, so you need to download the firmware from the linux-firmware git tree:

git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git

#2 lore raw
Quoted 14 lines · Michael Chan
Quoted 13 lines · Magnos A. Hammes

Hello,

I have a Dell server with the following Broadcom gigabit network adapter that uses the bnx2 driver:

01:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5716 Gigabit Ethernet (rev 20)

I was using kernel 3.2.57 and 3.13.3, but in both of them I faced some trouble to make the ethernet adapter work, whatever version of this two kernels that I try to boot I get the same error:

Quoted 10 lines
Quoted 3 lines

Can't load firmware file "bnx2/bnx2-mips-09-6.2.1b.fw" Direct firmware load failed with error -2

We no longer put the firmware in the kernel tree, so you need to download the firmware from the linux-firmware git tree:

git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git

Ok, I cloned that git tree and used the firmwares available there, but it didn't work with this firmware: bnx2/bnx2-mips-09-6.2.1b.fw sha1sum 8f11b39a60a4e1dd3774a10218c913f1cb761353

It only works when I change the source code of "drivers/net/ethernet/broadcom/bnx2.c" and compile the kernel again, making him load this firmware "bnx2/bnx2-mips-09-6.2.1a.fw" instead of "bnx2/bnx2-mips-09-6.2.1b.fw".

Magnos A. Hammes

#3 lore raw
Quoted 4 lines · Magnos A. Hammes

Ok, I cloned that git tree and used the firmwares available there, but it didn't work with this firmware: bnx2/bnx2-mips-09-6.2.1b.fw sha1sum 8f11b39a60a4e1dd3774a10218c913f1cb761353

I have the same sha1 sum on the same firmware file on my system and it works for me.

Quoted 4 lines

It only works when I change the source code of "drivers/net/ethernet/broadcom/bnx2.c" and compile the kernel again, making him load this firmware "bnx2/bnx2-mips-09-6.2.1a.fw" instead of "bnx2/bnx2-mips-09-6.2.1b.fw".

I don't see why it wouldn't work if both firmware files are in the same location. May be you have some udev rules that are preventing it?

Quoted 2 lines
#4 lore raw
Quoted 9 lines · Michael Chan
Quoted 4 lines · Magnos A. Hammes

Ok, I cloned that git tree and used the firmwares available there, but it didn't work with this firmware: bnx2/bnx2-mips-09-6.2.1b.fw sha1sum 8f11b39a60a4e1dd3774a10218c913f1cb761353

I have the same sha1 sum on the same firmware file on my system and it works for me.

Quoted 11 lines
Quoted 4 lines

It only works when I change the source code of "drivers/net/ethernet/broadcom/bnx2.c" and compile the kernel again, making him load this firmware "bnx2/bnx2-mips-09-6.2.1a.fw" instead of "bnx2/bnx2-mips-09-6.2.1b.fw".

I don't see why it wouldn't work if both firmware files are in the same location. May be you have some udev rules that are preventing it?

Quoted 2 lines

Yes, I have some udev rules that run at system boot, but the only thing I do is:

/sbin/udevd --daemon
/sbin/udevadm trigger --type=subsystems --action=add /sbin/udevadm trigger --type=devices --action=add /sbin/udevadm settle

Udev runs normally and returns no errors or warnings and dmesg shows nothing weird.

So, you think this may be a problem with my udev rules or a udev bug?

I'm using udev version 182.

#5 lore raw
Quoted 9 lines · Magnos A. Hammes

Yes, I have some udev rules that run at system boot, but the only thing
I do is:

/sbin/udevd --daemon
/sbin/udevadm trigger --type=subsystems --action=add /sbin/udevadm trigger --type=devices --action=add /sbin/udevadm settle

Quoted 6 lines

Udev runs normally and returns no errors or warnings and dmesg shows nothing weird.

So, you think this may be a problem with my udev rules or a udev bug?

I'm using udev version 182.

udev is involved in locating and loading the firmware file. On my system, I have /lib/udev/firmware.sh and a
generic /lib/udev/rules.d/50-firmware.rules to make request_firmware() work. Your system may be different.

Quoted 2 lines
#6 lore raw
Quoted 10 lines · Michael Chan
Quoted 9 lines · Magnos A. Hammes

Yes, I have some udev rules that run at system boot, but the only thing
I do is:

/sbin/udevd --daemon
/sbin/udevadm trigger --type=subsystems --action=add /sbin/udevadm trigger --type=devices --action=add /sbin/udevadm settle

Quoted 8 lines
Quoted 6 lines

Udev runs normally and returns no errors or warnings and dmesg shows nothing weird.

So, you think this may be a problem with my udev rules or a udev bug?

I'm using udev version 182.

udev is involved in locating and loading the firmware file.

It is usually not involved now. The kernel tries to load files directly from /lib/firmware. Only if that fails and if CONFIG_FW_LOADER_USER_HELPER is enabled, then it will issue a uevent which udev may respond to (I think that may have been removed from udev now).

Ben.

Quoted 4 lines

On my
system, I have /lib/udev/firmware.sh and a
generic /lib/udev/rules.d/50-firmware.rules to make request_firmware() work. Your system may be different.

Signature · 3 lines
Ben Hutchings
Lowery's Law:
             If it jams, force it. If it breaks, it needed replacing anyway.
#7 lore raw
Quoted 20 lines · Ben Hutchings
Quoted 10 lines · Michael Chan
Quoted 9 lines · Magnos A. Hammes

Yes, I have some udev rules that run at system boot, but the only thing
I do is:

/sbin/udevd --daemon
/sbin/udevadm trigger --type=subsystems --action=add /sbin/udevadm trigger --type=devices --action=add /sbin/udevadm settle

Quoted 8 lines
Quoted 6 lines

Udev runs normally and returns no errors or warnings and dmesg shows nothing weird.

So, you think this may be a problem with my udev rules or a udev bug?

I'm using udev version 182.

udev is involved in locating and loading the firmware file.

Quoted 7 lines

It is usually not involved now. The kernel tries to load files directly from /lib/firmware. Only if that fails and if CONFIG_FW_LOADER_USER_HELPER is enabled, then it will issue a uevent which udev may respond to (I think that may have been removed from udev now).

Ben.

Well, I have CONFIG_FW_LOADER_USER_HELPER enabled and Broadcom Corporation NetXtreme II BCM5716 Gigabit Ethernet only works when I change the source code of bnx2 to use firmware bnx2-mips-09-6.2.1a.fw instead of bnx2-mips-09-6.2.1b.fw, then the kernel loads the right firmware file. Or should I write a udev custom rule to load the right firmware? (I haven't tried this yet) It seems to me there is a problem here and changing bnx2 source code then recompiling the kernel isn't the best solution.
Udev is properly installed in my initrd and in my Slackware 14.0.

Magnos

Quoted 7 lines
Quoted 5 lines

On my
system, I have /lib/udev/firmware.sh and a
generic /lib/udev/rules.d/50-firmware.rules to make request_firmware() work. Your system may be different.