Bug 215627

Summary: Failed to load firmware for bnx2 / Broadcom BCM57810 NetXtreme II 10 Gigabit Ethernet
Product: Networking Reporter: Iv At (ivailo.at)
Component: OtherAssignee: Stephen Hemminger (stephen)
Status: NEW ---    
Severity: normal CC: manishc
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 5.16.7-2 Subsystem:
Regression: No Bisected commit-id:
Attachments: 5.16 Config file
5.15 config file
fix firmware load from initrd

Description Iv At 2022-02-21 09:57:09 UTC
Hi all,

Since kernel was updated to 5.16 version (Debian bookworm (testing)), there is a problem with Ethernet controller. Failed to load bnx2x firmware.

________________________________________________________________________

lcpci:

bd:00.0 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme II BCM57810 10 Gigabit Ethernet (rev 10)
bd:00.1 Ethernet controller: Broadcom Inc. and subsidiaries NetXtreme II BCM57810 10 Gigabit Ethernet (rev 10)

________________________________________________________________________

dmesg output:

[    1.555781] bnx2x 0000:bd:00.0: firmware: failed to load bnx2x/bnx2x-e2-7.13.21.0.fw (-2)
[    1.555904] bnx2x 0000:bd:00.0: Direct firmware load for bnx2x/bnx2x-e2-7.13.21.0.fw failed with error -2
[    1.555912] bnx2x 0000:bd:00.0: firmware: failed to load bnx2x/bnx2x-e2-7.13.15.0.fw (-2)
[    1.555971] bnx2x 0000:bd:00.0: Direct firmware load for bnx2x/bnx2x-e2-7.13.15.0.fw failed with error -2
[    1.556091] bnx2x: probe of 0000:bd:00.0 failed with error -2


[    1.556115] bnx2x 0000:bd:00.1: msix capability found
[    1.556288] bnx2x 0000:bd:00.1: part number 0-0-0-0
[    1.604171] bnx2x 0000:bd:00.1: firmware: failed to load bnx2x/bnx2x-e2-7.13.21.0.fw (-2)
[    1.604242] bnx2x 0000:bd:00.1: Direct firmware load for bnx2x/bnx2x-e2-7.13.21.0.fw failed with error -2
[    1.604259] bnx2x 0000:bd:00.1: firmware: failed to load bnx2x/bnx2x-e2-7.13.15.0.fw (-2)
[    1.604327] bnx2x 0000:bd:00.1: Direct firmware load for bnx2x/bnx2x-e2-7.13.15.0.fw failed with error -2
[    1.604491] bnx2x: probe of 0000:bd:00.1 failed with error -2
______________________________________________________________________

Kernel: linux-image-5.16.0-1-amd64  5.16.7-2  

firmware-bnx2x: 20210818-1  all  Binary firmware for Broadcom NetXtreme II 10Gb
_______________________________________________________________________

Thank you!
Comment 1 Iv At 2022-02-21 14:42:12 UTC
Everything is working as expected when boot in 5.15.15 - on the same system. 

udev  250.3-2
Comment 2 Manish Chopra 2022-02-21 18:12:15 UTC
Hello,

I see that driver is trying to load FW files (from /lib/firmware/bnx2x/) in that kernel, looks like FW files are missing (probably they are present on the file system but missing from new kernel initrd image) which causes driver to fail.  

dracut --install-optional /usr/lib/firmware/bnx2x/bnx2x-e2-7.13.15.0.fw
dracut --install-optional /usr/lib/firmware/bnx2x/bnx2x-e2-7.13.21.0.fw

Above commands might help in making FW files as a part of initrd.

Thanks,
Manish
Comment 3 Manish Chopra 2022-02-21 18:24:34 UTC
(In reply to Iv At from comment #1)
> Everything is working as expected when boot in 5.15.15 - on the same system. 
> 
> udev  250.3-2

Okay, was the working kernel having FW files part of it's initrd/initramfs ?
If so, I would have expected them to be part of newer kernel as well as a part of upgrade (not sure if there is any such configurable option in the kernel to make such FW files to be part of initrd ?).

Thanks,
Manish
Comment 4 Iv At 2022-02-21 18:51:08 UTC
(In reply to Manish Chopra from comment #2)
> Hello,
> 
> I see that driver is trying to load FW files (from /lib/firmware/bnx2x/) in
> that kernel, looks like FW files are missing (probably they are present on
> the file system but missing from new kernel initrd image) which causes
> driver to fail.  
> 
> dracut --install-optional /usr/lib/firmware/bnx2x/bnx2x-e2-7.13.15.0.fw
> dracut --install-optional /usr/lib/firmware/bnx2x/bnx2x-e2-7.13.21.0.fw
> 
> Above commands might help in making FW files as a part of initrd.
> 
> Thanks,
> Manish

Thank you for your answer and suggestions Manish!

Files are present in /lib/firmware/bnx2x/ :

total 3876
-rw-r--r-- 1 root root 161368 Jul 26  2021 bnx2x-e1-7.0.29.0.fw
-rw-r--r-- 1 root root 164392 Jul 26  2021 bnx2x-e1-7.10.51.0.fw
-rw-r--r-- 1 root root 170192 Jul 26  2021 bnx2x-e1-7.12.30.0.fw
-rw-r--r-- 1 root root 170096 Jul 26  2021 bnx2x-e1-7.13.1.0.fw
-rw-r--r-- 1 root root 170168 Jul 26  2021 bnx2x-e1-7.13.15.0.fw
-rw-r--r-- 1 root root 163592 Jul 26  2021 bnx2x-e1-7.8.19.0.fw
-rw-r--r-- 1 root root 168680 Jul 26  2021 bnx2x-e1h-7.0.29.0.fw
-rw-r--r-- 1 root root 173016 Jul 26  2021 bnx2x-e1h-7.10.51.0.fw
-rw-r--r-- 1 root root 178984 Jul 26  2021 bnx2x-e1h-7.12.30.0.fw
-rw-r--r-- 1 root root 178992 Jul 26  2021 bnx2x-e1h-7.13.1.0.fw
-rw-r--r-- 1 root root 178608 Jul 26  2021 bnx2x-e1h-7.13.15.0.fw
-rw-r--r-- 1 root root 171920 Jul 26  2021 bnx2x-e1h-7.8.19.0.fw
-rw-r--r-- 1 root root 289848 Jul 26  2021 bnx2x-e2-7.0.29.0.fw
-rw-r--r-- 1 root root 321456 Jul 26  2021 bnx2x-e2-7.10.51.0.fw
-rw-r--r-- 1 root root 321320 Jul 26  2021 bnx2x-e2-7.12.30.0.fw
-rw-r--r-- 1 root root 320936 Jul 26  2021 bnx2x-e2-7.13.1.0.fw
-rw-r--r-- 1 root root 323360 Jul 26  2021 bnx2x-e2-7.13.15.0.fw
-rw-r--r-- 1 root root 310440 Jul 26  2021 bnx2x-e2-7.8.19.0.fw


I reinstalled the "firmware-bnx2x" and initframs was rebuild. 
And result is the same with 5.16. 5.15 - no problem.
Comment 5 Manish Chopra 2022-02-21 19:10:21 UTC
(In reply to Iv At from comment #4)
> (In reply to Manish Chopra from comment #2)
> > Hello,
> > 
> > I see that driver is trying to load FW files (from /lib/firmware/bnx2x/) in
> > that kernel, looks like FW files are missing (probably they are present on
> > the file system but missing from new kernel initrd image) which causes
> > driver to fail.  
> > 
> > dracut --install-optional /usr/lib/firmware/bnx2x/bnx2x-e2-7.13.15.0.fw
> > dracut --install-optional /usr/lib/firmware/bnx2x/bnx2x-e2-7.13.21.0.fw
> > 
> > Above commands might help in making FW files as a part of initrd.
> > 
> > Thanks,
> > Manish
> 
> Thank you for your answer and suggestions Manish!
> 
> Files are present in /lib/firmware/bnx2x/ :
> 
> total 3876
> -rw-r--r-- 1 root root 161368 Jul 26  2021 bnx2x-e1-7.0.29.0.fw
> -rw-r--r-- 1 root root 164392 Jul 26  2021 bnx2x-e1-7.10.51.0.fw
> -rw-r--r-- 1 root root 170192 Jul 26  2021 bnx2x-e1-7.12.30.0.fw
> -rw-r--r-- 1 root root 170096 Jul 26  2021 bnx2x-e1-7.13.1.0.fw
> -rw-r--r-- 1 root root 170168 Jul 26  2021 bnx2x-e1-7.13.15.0.fw
> -rw-r--r-- 1 root root 163592 Jul 26  2021 bnx2x-e1-7.8.19.0.fw
> -rw-r--r-- 1 root root 168680 Jul 26  2021 bnx2x-e1h-7.0.29.0.fw
> -rw-r--r-- 1 root root 173016 Jul 26  2021 bnx2x-e1h-7.10.51.0.fw
> -rw-r--r-- 1 root root 178984 Jul 26  2021 bnx2x-e1h-7.12.30.0.fw
> -rw-r--r-- 1 root root 178992 Jul 26  2021 bnx2x-e1h-7.13.1.0.fw
> -rw-r--r-- 1 root root 178608 Jul 26  2021 bnx2x-e1h-7.13.15.0.fw
> -rw-r--r-- 1 root root 171920 Jul 26  2021 bnx2x-e1h-7.8.19.0.fw
> -rw-r--r-- 1 root root 289848 Jul 26  2021 bnx2x-e2-7.0.29.0.fw
> -rw-r--r-- 1 root root 321456 Jul 26  2021 bnx2x-e2-7.10.51.0.fw
> -rw-r--r-- 1 root root 321320 Jul 26  2021 bnx2x-e2-7.12.30.0.fw
> -rw-r--r-- 1 root root 320936 Jul 26  2021 bnx2x-e2-7.13.1.0.fw
> -rw-r--r-- 1 root root 323360 Jul 26  2021 bnx2x-e2-7.13.15.0.fw
> -rw-r--r-- 1 root root 310440 Jul 26  2021 bnx2x-e2-7.8.19.0.fw
> 
> 
> I reinstalled the "firmware-bnx2x" and initframs was rebuild. 
> And result is the same with 5.16. 5.15 - no problem.

Hi,

Did you use the suggested dracut commands above to install FW in initrd ?
Could you please send me the output from both the kernels for below -

lsinitrd | grep bnx2x

Thanks,
Manish
Comment 6 Manish Chopra 2022-02-21 19:16:25 UTC
(In reply to Manish Chopra from comment #5)
> (In reply to Iv At from comment #4)
> > (In reply to Manish Chopra from comment #2)
> > > Hello,
> > > 
> > > I see that driver is trying to load FW files (from /lib/firmware/bnx2x/)
> in
> > > that kernel, looks like FW files are missing (probably they are present
> on
> > > the file system but missing from new kernel initrd image) which causes
> > > driver to fail.  
> > > 
> > > dracut --install-optional /usr/lib/firmware/bnx2x/bnx2x-e2-7.13.15.0.fw
> > > dracut --install-optional /usr/lib/firmware/bnx2x/bnx2x-e2-7.13.21.0.fw
> > > 
> > > Above commands might help in making FW files as a part of initrd.
> > > 
> > > Thanks,
> > > Manish
> > 
> > Thank you for your answer and suggestions Manish!
> > 
> > Files are present in /lib/firmware/bnx2x/ :
> > 
> > total 3876
> > -rw-r--r-- 1 root root 161368 Jul 26  2021 bnx2x-e1-7.0.29.0.fw
> > -rw-r--r-- 1 root root 164392 Jul 26  2021 bnx2x-e1-7.10.51.0.fw
> > -rw-r--r-- 1 root root 170192 Jul 26  2021 bnx2x-e1-7.12.30.0.fw
> > -rw-r--r-- 1 root root 170096 Jul 26  2021 bnx2x-e1-7.13.1.0.fw
> > -rw-r--r-- 1 root root 170168 Jul 26  2021 bnx2x-e1-7.13.15.0.fw
> > -rw-r--r-- 1 root root 163592 Jul 26  2021 bnx2x-e1-7.8.19.0.fw
> > -rw-r--r-- 1 root root 168680 Jul 26  2021 bnx2x-e1h-7.0.29.0.fw
> > -rw-r--r-- 1 root root 173016 Jul 26  2021 bnx2x-e1h-7.10.51.0.fw
> > -rw-r--r-- 1 root root 178984 Jul 26  2021 bnx2x-e1h-7.12.30.0.fw
> > -rw-r--r-- 1 root root 178992 Jul 26  2021 bnx2x-e1h-7.13.1.0.fw
> > -rw-r--r-- 1 root root 178608 Jul 26  2021 bnx2x-e1h-7.13.15.0.fw
> > -rw-r--r-- 1 root root 171920 Jul 26  2021 bnx2x-e1h-7.8.19.0.fw
> > -rw-r--r-- 1 root root 289848 Jul 26  2021 bnx2x-e2-7.0.29.0.fw
> > -rw-r--r-- 1 root root 321456 Jul 26  2021 bnx2x-e2-7.10.51.0.fw
> > -rw-r--r-- 1 root root 321320 Jul 26  2021 bnx2x-e2-7.12.30.0.fw
> > -rw-r--r-- 1 root root 320936 Jul 26  2021 bnx2x-e2-7.13.1.0.fw
> > -rw-r--r-- 1 root root 323360 Jul 26  2021 bnx2x-e2-7.13.15.0.fw
> > -rw-r--r-- 1 root root 310440 Jul 26  2021 bnx2x-e2-7.8.19.0.fw
> > 
> > 
> > I reinstalled the "firmware-bnx2x" and initframs was rebuild. 
> > And result is the same with 5.16. 5.15 - no problem.
> 
> Hi,
> 
> Did you use the suggested dracut commands above to install FW in initrd ?
> Could you please send me the output from both the kernels for below -
> 
> lsinitrd | grep bnx2x
> 
> Thanks,
> Manish

Also, is it possible for you to upload kernel ".config" files for both of these kernels ?

Thanks,
Manish
Comment 7 Iv At 2022-02-21 19:18:36 UTC
(In reply to Manish Chopra from comment #5)
> (In reply to Iv At from comment #4)
> > (In reply to Manish Chopra from comment #2)
> > > Hello,
> > > 
> > > I see that driver is trying to load FW files (from /lib/firmware/bnx2x/)
> in
> > > that kernel, looks like FW files are missing (probably they are present
> on
> > > the file system but missing from new kernel initrd image) which causes
> > > driver to fail.  
> > > 
> > > dracut --install-optional /usr/lib/firmware/bnx2x/bnx2x-e2-7.13.15.0.fw
> > > dracut --install-optional /usr/lib/firmware/bnx2x/bnx2x-e2-7.13.21.0.fw
> > > 
> > > Above commands might help in making FW files as a part of initrd.
> > > 
> > > Thanks,
> > > Manish
> > 
> > Thank you for your answer and suggestions Manish!
> > 
> > Files are present in /lib/firmware/bnx2x/ :
> > 
> > total 3876
> > -rw-r--r-- 1 root root 161368 Jul 26  2021 bnx2x-e1-7.0.29.0.fw
> > -rw-r--r-- 1 root root 164392 Jul 26  2021 bnx2x-e1-7.10.51.0.fw
> > -rw-r--r-- 1 root root 170192 Jul 26  2021 bnx2x-e1-7.12.30.0.fw
> > -rw-r--r-- 1 root root 170096 Jul 26  2021 bnx2x-e1-7.13.1.0.fw
> > -rw-r--r-- 1 root root 170168 Jul 26  2021 bnx2x-e1-7.13.15.0.fw
> > -rw-r--r-- 1 root root 163592 Jul 26  2021 bnx2x-e1-7.8.19.0.fw
> > -rw-r--r-- 1 root root 168680 Jul 26  2021 bnx2x-e1h-7.0.29.0.fw
> > -rw-r--r-- 1 root root 173016 Jul 26  2021 bnx2x-e1h-7.10.51.0.fw
> > -rw-r--r-- 1 root root 178984 Jul 26  2021 bnx2x-e1h-7.12.30.0.fw
> > -rw-r--r-- 1 root root 178992 Jul 26  2021 bnx2x-e1h-7.13.1.0.fw
> > -rw-r--r-- 1 root root 178608 Jul 26  2021 bnx2x-e1h-7.13.15.0.fw
> > -rw-r--r-- 1 root root 171920 Jul 26  2021 bnx2x-e1h-7.8.19.0.fw
> > -rw-r--r-- 1 root root 289848 Jul 26  2021 bnx2x-e2-7.0.29.0.fw
> > -rw-r--r-- 1 root root 321456 Jul 26  2021 bnx2x-e2-7.10.51.0.fw
> > -rw-r--r-- 1 root root 321320 Jul 26  2021 bnx2x-e2-7.12.30.0.fw
> > -rw-r--r-- 1 root root 320936 Jul 26  2021 bnx2x-e2-7.13.1.0.fw
> > -rw-r--r-- 1 root root 323360 Jul 26  2021 bnx2x-e2-7.13.15.0.fw
> > -rw-r--r-- 1 root root 310440 Jul 26  2021 bnx2x-e2-7.8.19.0.fw
> > 
> > 
> > I reinstalled the "firmware-bnx2x" and initframs was rebuild. 
> > And result is the same with 5.16. 5.15 - no problem.
> 
> Hi,
> 
> Did you use the suggested dracut commands above to install FW in initrd ?
> Could you please send me the output from both the kernels for below -
> 
> lsinitrd | grep bnx2x
> 
> Thanks,
> Manish


Hi Manish, 

here the output:


 lsinitramfs -l /boot/initrd.img-5.16.0-1-amd64 | grep bnx2
-rw-r--r--   1 root     root       270483 Feb  9 10:35 usr/lib/modules/5.16.0-1-amd64/kernel/drivers/net/ethernet/broadcom/bnx2.ko
drwxr-xr-x   2 root     root            0 Feb 21 21:08 usr/lib/modules/5.16.0-1-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x
-rw-r--r--   1 root     root      1739963 Feb  9 10:35 usr/lib/modules/5.16.0-1-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x/bnx2x.ko
drwxr-xr-x   2 root     root            0 Feb 21 21:08 usr/lib/modules/5.16.0-1-amd64/kernel/drivers/scsi/bnx2fc
-rw-r--r--   1 root     root       303675 Feb  9 10:35 usr/lib/modules/5.16.0-1-amd64/kernel/drivers/scsi/bnx2fc/bnx2fc.ko
drwxr-xr-x   2 root     root            0 Feb 21 21:08 usr/lib/modules/5.16.0-1-amd64/kernel/drivers/scsi/bnx2i
-rw-r--r--   1 root     root       164915 Feb  9 10:35 usr/lib/modules/5.16.0-1-amd64/kernel/drivers/scsi/bnx2i/bnx2i.ko

-----------------------------------------------------------------------------

 lsinitramfs -l /boot/initrd.img-5.15.0-3-amd64 | grep bnx2
-rw-r--r--   1 root     root       195475 Jan 30 12:14 usr/lib/modules/5.15.0-3-amd64/kernel/drivers/net/ethernet/broadcom/bnx2.ko
drwxr-xr-x   2 root     root            0 Feb 13 11:19 usr/lib/modules/5.15.0-3-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x
-rw-r--r--   1 root     root      1668323 Jan 30 12:14 usr/lib/modules/5.15.0-3-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x/bnx2x.ko
drwxr-xr-x   2 root     root            0 Feb 13 11:19 usr/lib/modules/5.15.0-3-amd64/kernel/drivers/scsi/bnx2fc
-rw-r--r--   1 root     root       302003 Jan 30 12:14 usr/lib/modules/5.15.0-3-amd64/kernel/drivers/scsi/bnx2fc/bnx2fc.ko
drwxr-xr-x   2 root     root            0 Feb 13 11:19 usr/lib/modules/5.15.0-3-amd64/kernel/drivers/scsi/bnx2i
-rw-r--r--   1 root     root       165443 Jan 30 12:14 usr/lib/modules/5.15.0-3-amd64/kernel/drivers/scsi/bnx2i/bnx2i.ko
Comment 8 Manish Chopra 2022-02-21 19:28:46 UTC
(In reply to Iv At from comment #7)
> (In reply to Manish Chopra from comment #5)
> > (In reply to Iv At from comment #4)
> > > (In reply to Manish Chopra from comment #2)
> > > > Hello,
> > > > 
> > > > I see that driver is trying to load FW files (from
> /lib/firmware/bnx2x/)
> > in
> > > > that kernel, looks like FW files are missing (probably they are present
> > on
> > > > the file system but missing from new kernel initrd image) which causes
> > > > driver to fail.  
> > > > 
> > > > dracut --install-optional /usr/lib/firmware/bnx2x/bnx2x-e2-7.13.15.0.fw
> > > > dracut --install-optional /usr/lib/firmware/bnx2x/bnx2x-e2-7.13.21.0.fw
> > > > 
> > > > Above commands might help in making FW files as a part of initrd.
> > > > 
> > > > Thanks,
> > > > Manish
> > > 
> > > Thank you for your answer and suggestions Manish!
> > > 
> > > Files are present in /lib/firmware/bnx2x/ :
> > > 
> > > total 3876
> > > -rw-r--r-- 1 root root 161368 Jul 26  2021 bnx2x-e1-7.0.29.0.fw
> > > -rw-r--r-- 1 root root 164392 Jul 26  2021 bnx2x-e1-7.10.51.0.fw
> > > -rw-r--r-- 1 root root 170192 Jul 26  2021 bnx2x-e1-7.12.30.0.fw
> > > -rw-r--r-- 1 root root 170096 Jul 26  2021 bnx2x-e1-7.13.1.0.fw
> > > -rw-r--r-- 1 root root 170168 Jul 26  2021 bnx2x-e1-7.13.15.0.fw
> > > -rw-r--r-- 1 root root 163592 Jul 26  2021 bnx2x-e1-7.8.19.0.fw
> > > -rw-r--r-- 1 root root 168680 Jul 26  2021 bnx2x-e1h-7.0.29.0.fw
> > > -rw-r--r-- 1 root root 173016 Jul 26  2021 bnx2x-e1h-7.10.51.0.fw
> > > -rw-r--r-- 1 root root 178984 Jul 26  2021 bnx2x-e1h-7.12.30.0.fw
> > > -rw-r--r-- 1 root root 178992 Jul 26  2021 bnx2x-e1h-7.13.1.0.fw
> > > -rw-r--r-- 1 root root 178608 Jul 26  2021 bnx2x-e1h-7.13.15.0.fw
> > > -rw-r--r-- 1 root root 171920 Jul 26  2021 bnx2x-e1h-7.8.19.0.fw
> > > -rw-r--r-- 1 root root 289848 Jul 26  2021 bnx2x-e2-7.0.29.0.fw
> > > -rw-r--r-- 1 root root 321456 Jul 26  2021 bnx2x-e2-7.10.51.0.fw
> > > -rw-r--r-- 1 root root 321320 Jul 26  2021 bnx2x-e2-7.12.30.0.fw
> > > -rw-r--r-- 1 root root 320936 Jul 26  2021 bnx2x-e2-7.13.1.0.fw
> > > -rw-r--r-- 1 root root 323360 Jul 26  2021 bnx2x-e2-7.13.15.0.fw
> > > -rw-r--r-- 1 root root 310440 Jul 26  2021 bnx2x-e2-7.8.19.0.fw
> > > 
> > > 
> > > I reinstalled the "firmware-bnx2x" and initframs was rebuild. 
> > > And result is the same with 5.16. 5.15 - no problem.
> > 
> > Hi,
> > 
> > Did you use the suggested dracut commands above to install FW in initrd ?
> > Could you please send me the output from both the kernels for below -
> > 
> > lsinitrd | grep bnx2x
> > 
> > Thanks,
> > Manish
> 
> 
> Hi Manish, 
> 
> here the output:
> 
> 
>  lsinitramfs -l /boot/initrd.img-5.16.0-1-amd64 | grep bnx2
> -rw-r--r--   1 root     root       270483 Feb  9 10:35
> usr/lib/modules/5.16.0-1-amd64/kernel/drivers/net/ethernet/broadcom/bnx2.ko
> drwxr-xr-x   2 root     root            0 Feb 21 21:08
> usr/lib/modules/5.16.0-1-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x
> -rw-r--r--   1 root     root      1739963 Feb  9 10:35
> usr/lib/modules/5.16.0-1-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x/
> bnx2x.ko
> drwxr-xr-x   2 root     root            0 Feb 21 21:08
> usr/lib/modules/5.16.0-1-amd64/kernel/drivers/scsi/bnx2fc
> -rw-r--r--   1 root     root       303675 Feb  9 10:35
> usr/lib/modules/5.16.0-1-amd64/kernel/drivers/scsi/bnx2fc/bnx2fc.ko
> drwxr-xr-x   2 root     root            0 Feb 21 21:08
> usr/lib/modules/5.16.0-1-amd64/kernel/drivers/scsi/bnx2i
> -rw-r--r--   1 root     root       164915 Feb  9 10:35
> usr/lib/modules/5.16.0-1-amd64/kernel/drivers/scsi/bnx2i/bnx2i.ko
> 
> -----------------------------------------------------------------------------
> 
>  lsinitramfs -l /boot/initrd.img-5.15.0-3-amd64 | grep bnx2
> -rw-r--r--   1 root     root       195475 Jan 30 12:14
> usr/lib/modules/5.15.0-3-amd64/kernel/drivers/net/ethernet/broadcom/bnx2.ko
> drwxr-xr-x   2 root     root            0 Feb 13 11:19
> usr/lib/modules/5.15.0-3-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x
> -rw-r--r--   1 root     root      1668323 Jan 30 12:14
> usr/lib/modules/5.15.0-3-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x/
> bnx2x.ko
> drwxr-xr-x   2 root     root            0 Feb 13 11:19
> usr/lib/modules/5.15.0-3-amd64/kernel/drivers/scsi/bnx2fc
> -rw-r--r--   1 root     root       302003 Jan 30 12:14
> usr/lib/modules/5.15.0-3-amd64/kernel/drivers/scsi/bnx2fc/bnx2fc.ko
> drwxr-xr-x   2 root     root            0 Feb 13 11:19
> usr/lib/modules/5.15.0-3-amd64/kernel/drivers/scsi/bnx2i
> -rw-r--r--   1 root     root       165443 Jan 30 12:14
> usr/lib/modules/5.15.0-3-amd64/kernel/drivers/scsi/bnx2i/bnx2i.ko


Okay, I could see FW is not part of any of the kernel's initrd. Typically if it's part of initrd - it will look like below -

# lsinitrd | grep bnx2x
Arguments: --install-optional '/usr/lib/firmware/bnx2x/bnx2x-e2-7.13.15.0.fw' --force

I believe the driver in newer kernel trying to load the FW file from initrd (although not sure why it's not the case with older kernel - may be if you could supply ".config" files for both the kernels it may tell the config differences relevant to this). Please run the dracut command below to make/install the FW in initrd on newer kernel and again check "lsinitrd | grep bnx2x".

dracut --install-optional /usr/lib/firmware/bnx2x/bnx2x-e2-7.13.15.0.fw

Thanks,
Manish
Comment 9 Iv At 2022-02-21 19:29:00 UTC
Created attachment 300499 [details]
5.16 Config file
Comment 10 Iv At 2022-02-21 19:29:24 UTC
Created attachment 300500 [details]
5.15 config file
Comment 11 Iv At 2022-02-21 19:34:15 UTC
(In reply to Manish Chopra from comment #8)
> (In reply to Iv At from comment #7)
> > (In reply to Manish Chopra from comment #5)
> > > (In reply to Iv At from comment #4)
> > > > (In reply to Manish Chopra from comment #2)
> > > > > Hello,
> > > > > 
> > > > > I see that driver is trying to load FW files (from
> > /lib/firmware/bnx2x/)
> > > in
> > > > > that kernel, looks like FW files are missing (probably they are
> present
> > > on
> > > > > the file system but missing from new kernel initrd image) which
> causes
> > > > > driver to fail.  
> > > > > 
> > > > > dracut --install-optional
> /usr/lib/firmware/bnx2x/bnx2x-e2-7.13.15.0.fw
> > > > > dracut --install-optional
> /usr/lib/firmware/bnx2x/bnx2x-e2-7.13.21.0.fw
> > > > > 
> > > > > Above commands might help in making FW files as a part of initrd.
> > > > > 
> > > > > Thanks,
> > > > > Manish
> > > > 
> > > > Thank you for your answer and suggestions Manish!
> > > > 
> > > > Files are present in /lib/firmware/bnx2x/ :
> > > > 
> > > > total 3876
> > > > -rw-r--r-- 1 root root 161368 Jul 26  2021 bnx2x-e1-7.0.29.0.fw
> > > > -rw-r--r-- 1 root root 164392 Jul 26  2021 bnx2x-e1-7.10.51.0.fw
> > > > -rw-r--r-- 1 root root 170192 Jul 26  2021 bnx2x-e1-7.12.30.0.fw
> > > > -rw-r--r-- 1 root root 170096 Jul 26  2021 bnx2x-e1-7.13.1.0.fw
> > > > -rw-r--r-- 1 root root 170168 Jul 26  2021 bnx2x-e1-7.13.15.0.fw
> > > > -rw-r--r-- 1 root root 163592 Jul 26  2021 bnx2x-e1-7.8.19.0.fw
> > > > -rw-r--r-- 1 root root 168680 Jul 26  2021 bnx2x-e1h-7.0.29.0.fw
> > > > -rw-r--r-- 1 root root 173016 Jul 26  2021 bnx2x-e1h-7.10.51.0.fw
> > > > -rw-r--r-- 1 root root 178984 Jul 26  2021 bnx2x-e1h-7.12.30.0.fw
> > > > -rw-r--r-- 1 root root 178992 Jul 26  2021 bnx2x-e1h-7.13.1.0.fw
> > > > -rw-r--r-- 1 root root 178608 Jul 26  2021 bnx2x-e1h-7.13.15.0.fw
> > > > -rw-r--r-- 1 root root 171920 Jul 26  2021 bnx2x-e1h-7.8.19.0.fw
> > > > -rw-r--r-- 1 root root 289848 Jul 26  2021 bnx2x-e2-7.0.29.0.fw
> > > > -rw-r--r-- 1 root root 321456 Jul 26  2021 bnx2x-e2-7.10.51.0.fw
> > > > -rw-r--r-- 1 root root 321320 Jul 26  2021 bnx2x-e2-7.12.30.0.fw
> > > > -rw-r--r-- 1 root root 320936 Jul 26  2021 bnx2x-e2-7.13.1.0.fw
> > > > -rw-r--r-- 1 root root 323360 Jul 26  2021 bnx2x-e2-7.13.15.0.fw
> > > > -rw-r--r-- 1 root root 310440 Jul 26  2021 bnx2x-e2-7.8.19.0.fw
> > > > 
> > > > 
> > > > I reinstalled the "firmware-bnx2x" and initframs was rebuild. 
> > > > And result is the same with 5.16. 5.15 - no problem.
> > > 
> > > Hi,
> > > 
> > > Did you use the suggested dracut commands above to install FW in initrd ?
> > > Could you please send me the output from both the kernels for below -
> > > 
> > > lsinitrd | grep bnx2x
> > > 
> > > Thanks,
> > > Manish
> > 
> > 
> > Hi Manish, 
> > 
> > here the output:
> > 
> > 
> >  lsinitramfs -l /boot/initrd.img-5.16.0-1-amd64 | grep bnx2
> > -rw-r--r--   1 root     root       270483 Feb  9 10:35
> > usr/lib/modules/5.16.0-1-amd64/kernel/drivers/net/ethernet/broadcom/bnx2.ko
> > drwxr-xr-x   2 root     root            0 Feb 21 21:08
> > usr/lib/modules/5.16.0-1-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x
> > -rw-r--r--   1 root     root      1739963 Feb  9 10:35
> > usr/lib/modules/5.16.0-1-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x/
> > bnx2x.ko
> > drwxr-xr-x   2 root     root            0 Feb 21 21:08
> > usr/lib/modules/5.16.0-1-amd64/kernel/drivers/scsi/bnx2fc
> > -rw-r--r--   1 root     root       303675 Feb  9 10:35
> > usr/lib/modules/5.16.0-1-amd64/kernel/drivers/scsi/bnx2fc/bnx2fc.ko
> > drwxr-xr-x   2 root     root            0 Feb 21 21:08
> > usr/lib/modules/5.16.0-1-amd64/kernel/drivers/scsi/bnx2i
> > -rw-r--r--   1 root     root       164915 Feb  9 10:35
> > usr/lib/modules/5.16.0-1-amd64/kernel/drivers/scsi/bnx2i/bnx2i.ko
> > 
> >
> -----------------------------------------------------------------------------
> > 
> >  lsinitramfs -l /boot/initrd.img-5.15.0-3-amd64 | grep bnx2
> > -rw-r--r--   1 root     root       195475 Jan 30 12:14
> > usr/lib/modules/5.15.0-3-amd64/kernel/drivers/net/ethernet/broadcom/bnx2.ko
> > drwxr-xr-x   2 root     root            0 Feb 13 11:19
> > usr/lib/modules/5.15.0-3-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x
> > -rw-r--r--   1 root     root      1668323 Jan 30 12:14
> > usr/lib/modules/5.15.0-3-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x/
> > bnx2x.ko
> > drwxr-xr-x   2 root     root            0 Feb 13 11:19
> > usr/lib/modules/5.15.0-3-amd64/kernel/drivers/scsi/bnx2fc
> > -rw-r--r--   1 root     root       302003 Jan 30 12:14
> > usr/lib/modules/5.15.0-3-amd64/kernel/drivers/scsi/bnx2fc/bnx2fc.ko
> > drwxr-xr-x   2 root     root            0 Feb 13 11:19
> > usr/lib/modules/5.15.0-3-amd64/kernel/drivers/scsi/bnx2i
> > -rw-r--r--   1 root     root       165443 Jan 30 12:14
> > usr/lib/modules/5.15.0-3-amd64/kernel/drivers/scsi/bnx2i/bnx2i.ko
> 
> 
> Okay, I could see FW is not part of any of the kernel's initrd. Typically if
> it's part of initrd - it will look like below -
> 
> # lsinitrd | grep bnx2x
> Arguments: --install-optional
> '/usr/lib/firmware/bnx2x/bnx2x-e2-7.13.15.0.fw' --force
> 
> I believe the driver in newer kernel trying to load the FW file from initrd
> (although not sure why it's not the case with older kernel - may be if you
> could supply ".config" files for both the kernels it may tell the config
> differences relevant to this). Please run the dracut command below to
> make/install the FW in initrd on newer kernel and again check "lsinitrd |
> grep bnx2x".
> 
> dracut --install-optional /usr/lib/firmware/bnx2x/bnx2x-e2-7.13.15.0.fw
> 
> Thanks,
> Manish

Hi again,

I'm using Debian and initramfs-tools not dracut . And the firmware is under:
/lib/firmware/bnx2x/

Config files attached

Ivaylo
Comment 12 Iv At 2022-02-21 19:36:55 UTC
under kernel 5.10:

lsinitramfs -l /boot/initrd.img-5.10.0-11-amd64 | grep bnx2


-rw-r--r--   1 root     root       172739 Jan 18 17:54 usr/lib/modules/5.10.0-11-amd64/kernel/drivers/net/ethernet/broadcom/bnx2.ko
drwxr-xr-x   2 root     root            0 Feb 21 06:44 usr/lib/modules/5.10.0-11-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x
-rw-r--r--   1 root     root      1522675 Jan 18 17:54 usr/lib/modules/5.10.0-11-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x/bnx2x.ko
drwxr-xr-x   2 root     root            0 Feb 21 06:44 usr/lib/modules/5.10.0-11-amd64/kernel/drivers/scsi/bnx2fc
-rw-r--r--   1 root     root       243251 Jan 18 17:54 usr/lib/modules/5.10.0-11-amd64/kernel/drivers/scsi/bnx2fc/bnx2fc.ko
drwxr-xr-x   2 root     root            0 Feb 21 06:44 usr/lib/modules/5.10.0-11-amd64/kernel/drivers/scsi/bnx2i
-rw-r--r--   1 root     root       113827 Jan 18 17:54 usr/lib/modules/5.10.0-11-amd64/kernel/drivers/scsi/bnx2i/bnx2i.ko
Comment 13 Iv At 2022-02-21 19:39:36 UTC
(In reply to Iv At from comment #12)
> under kernel 5.10:
> 
> lsinitramfs -l /boot/initrd.img-5.10.0-11-amd64 | grep bnx2
> 
> 
> -rw-r--r--   1 root     root       172739 Jan 18 17:54
> usr/lib/modules/5.10.0-11-amd64/kernel/drivers/net/ethernet/broadcom/bnx2.ko
> drwxr-xr-x   2 root     root            0 Feb 21 06:44
> usr/lib/modules/5.10.0-11-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x
> -rw-r--r--   1 root     root      1522675 Jan 18 17:54
> usr/lib/modules/5.10.0-11-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x/
> bnx2x.ko
> drwxr-xr-x   2 root     root            0 Feb 21 06:44
> usr/lib/modules/5.10.0-11-amd64/kernel/drivers/scsi/bnx2fc
> -rw-r--r--   1 root     root       243251 Jan 18 17:54
> usr/lib/modules/5.10.0-11-amd64/kernel/drivers/scsi/bnx2fc/bnx2fc.ko
> drwxr-xr-x   2 root     root            0 Feb 21 06:44
> usr/lib/modules/5.10.0-11-amd64/kernel/drivers/scsi/bnx2i
> -rw-r--r--   1 root     root       113827 Jan 18 17:54
> usr/lib/modules/5.10.0-11-amd64/kernel/drivers/scsi/bnx2i/bnx2i.ko


Currently I can't boot @ 5.15 to see what is the situation
Comment 14 Manish Chopra 2022-02-21 20:58:03 UTC
(In reply to Iv At from comment #11)
> (In reply to Manish Chopra from comment #8)
> > (In reply to Iv At from comment #7)
> > > (In reply to Manish Chopra from comment #5)
> > > > (In reply to Iv At from comment #4)
> > > > > (In reply to Manish Chopra from comment #2)
> > > > > > Hello,
> > > > > > 
> > > > > > I see that driver is trying to load FW files (from
> > > /lib/firmware/bnx2x/)
> > > > in
> > > > > > that kernel, looks like FW files are missing (probably they are
> > present
> > > > on
> > > > > > the file system but missing from new kernel initrd image) which
> > causes
> > > > > > driver to fail.  
> > > > > > 
> > > > > > dracut --install-optional
> > /usr/lib/firmware/bnx2x/bnx2x-e2-7.13.15.0.fw
> > > > > > dracut --install-optional
> > /usr/lib/firmware/bnx2x/bnx2x-e2-7.13.21.0.fw
> > > > > > 
> > > > > > Above commands might help in making FW files as a part of initrd.
> > > > > > 
> > > > > > Thanks,
> > > > > > Manish
> > > > > 
> > > > > Thank you for your answer and suggestions Manish!
> > > > > 
> > > > > Files are present in /lib/firmware/bnx2x/ :
> > > > > 
> > > > > total 3876
> > > > > -rw-r--r-- 1 root root 161368 Jul 26  2021 bnx2x-e1-7.0.29.0.fw
> > > > > -rw-r--r-- 1 root root 164392 Jul 26  2021 bnx2x-e1-7.10.51.0.fw
> > > > > -rw-r--r-- 1 root root 170192 Jul 26  2021 bnx2x-e1-7.12.30.0.fw
> > > > > -rw-r--r-- 1 root root 170096 Jul 26  2021 bnx2x-e1-7.13.1.0.fw
> > > > > -rw-r--r-- 1 root root 170168 Jul 26  2021 bnx2x-e1-7.13.15.0.fw
> > > > > -rw-r--r-- 1 root root 163592 Jul 26  2021 bnx2x-e1-7.8.19.0.fw
> > > > > -rw-r--r-- 1 root root 168680 Jul 26  2021 bnx2x-e1h-7.0.29.0.fw
> > > > > -rw-r--r-- 1 root root 173016 Jul 26  2021 bnx2x-e1h-7.10.51.0.fw
> > > > > -rw-r--r-- 1 root root 178984 Jul 26  2021 bnx2x-e1h-7.12.30.0.fw
> > > > > -rw-r--r-- 1 root root 178992 Jul 26  2021 bnx2x-e1h-7.13.1.0.fw
> > > > > -rw-r--r-- 1 root root 178608 Jul 26  2021 bnx2x-e1h-7.13.15.0.fw
> > > > > -rw-r--r-- 1 root root 171920 Jul 26  2021 bnx2x-e1h-7.8.19.0.fw
> > > > > -rw-r--r-- 1 root root 289848 Jul 26  2021 bnx2x-e2-7.0.29.0.fw
> > > > > -rw-r--r-- 1 root root 321456 Jul 26  2021 bnx2x-e2-7.10.51.0.fw
> > > > > -rw-r--r-- 1 root root 321320 Jul 26  2021 bnx2x-e2-7.12.30.0.fw
> > > > > -rw-r--r-- 1 root root 320936 Jul 26  2021 bnx2x-e2-7.13.1.0.fw
> > > > > -rw-r--r-- 1 root root 323360 Jul 26  2021 bnx2x-e2-7.13.15.0.fw
> > > > > -rw-r--r-- 1 root root 310440 Jul 26  2021 bnx2x-e2-7.8.19.0.fw
> > > > > 
> > > > > 
> > > > > I reinstalled the "firmware-bnx2x" and initframs was rebuild. 
> > > > > And result is the same with 5.16. 5.15 - no problem.
> > > > 
> > > > Hi,
> > > > 
> > > > Did you use the suggested dracut commands above to install FW in initrd
> ?
> > > > Could you please send me the output from both the kernels for below -
> > > > 
> > > > lsinitrd | grep bnx2x
> > > > 
> > > > Thanks,
> > > > Manish
> > > 
> > > 
> > > Hi Manish, 
> > > 
> > > here the output:
> > > 
> > > 
> > >  lsinitramfs -l /boot/initrd.img-5.16.0-1-amd64 | grep bnx2
> > > -rw-r--r--   1 root     root       270483 Feb  9 10:35
> > >
> usr/lib/modules/5.16.0-1-amd64/kernel/drivers/net/ethernet/broadcom/bnx2.ko
> > > drwxr-xr-x   2 root     root            0 Feb 21 21:08
> > > usr/lib/modules/5.16.0-1-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x
> > > -rw-r--r--   1 root     root      1739963 Feb  9 10:35
> > >
> usr/lib/modules/5.16.0-1-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x/
> > > bnx2x.ko
> > > drwxr-xr-x   2 root     root            0 Feb 21 21:08
> > > usr/lib/modules/5.16.0-1-amd64/kernel/drivers/scsi/bnx2fc
> > > -rw-r--r--   1 root     root       303675 Feb  9 10:35
> > > usr/lib/modules/5.16.0-1-amd64/kernel/drivers/scsi/bnx2fc/bnx2fc.ko
> > > drwxr-xr-x   2 root     root            0 Feb 21 21:08
> > > usr/lib/modules/5.16.0-1-amd64/kernel/drivers/scsi/bnx2i
> > > -rw-r--r--   1 root     root       164915 Feb  9 10:35
> > > usr/lib/modules/5.16.0-1-amd64/kernel/drivers/scsi/bnx2i/bnx2i.ko
> > > 
> > >
> >
> -----------------------------------------------------------------------------
> > > 
> > >  lsinitramfs -l /boot/initrd.img-5.15.0-3-amd64 | grep bnx2
> > > -rw-r--r--   1 root     root       195475 Jan 30 12:14
> > >
> usr/lib/modules/5.15.0-3-amd64/kernel/drivers/net/ethernet/broadcom/bnx2.ko
> > > drwxr-xr-x   2 root     root            0 Feb 13 11:19
> > > usr/lib/modules/5.15.0-3-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x
> > > -rw-r--r--   1 root     root      1668323 Jan 30 12:14
> > >
> usr/lib/modules/5.15.0-3-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x/
> > > bnx2x.ko
> > > drwxr-xr-x   2 root     root            0 Feb 13 11:19
> > > usr/lib/modules/5.15.0-3-amd64/kernel/drivers/scsi/bnx2fc
> > > -rw-r--r--   1 root     root       302003 Jan 30 12:14
> > > usr/lib/modules/5.15.0-3-amd64/kernel/drivers/scsi/bnx2fc/bnx2fc.ko
> > > drwxr-xr-x   2 root     root            0 Feb 13 11:19
> > > usr/lib/modules/5.15.0-3-amd64/kernel/drivers/scsi/bnx2i
> > > -rw-r--r--   1 root     root       165443 Jan 30 12:14
> > > usr/lib/modules/5.15.0-3-amd64/kernel/drivers/scsi/bnx2i/bnx2i.ko
> > 
> > 
> > Okay, I could see FW is not part of any of the kernel's initrd. Typically
> if
> > it's part of initrd - it will look like below -
> > 
> > # lsinitrd | grep bnx2x
> > Arguments: --install-optional
> > '/usr/lib/firmware/bnx2x/bnx2x-e2-7.13.15.0.fw' --force
> > 
> > I believe the driver in newer kernel trying to load the FW file from initrd
> > (although not sure why it's not the case with older kernel - may be if you
> > could supply ".config" files for both the kernels it may tell the config
> > differences relevant to this). Please run the dracut command below to
> > make/install the FW in initrd on newer kernel and again check "lsinitrd |
> > grep bnx2x".
> > 
> > dracut --install-optional /usr/lib/firmware/bnx2x/bnx2x-e2-7.13.15.0.fw
> > 
> > Thanks,
> > Manish
> 
> Hi again,
> 
> I'm using Debian and initramfs-tools not dracut . And the firmware is under:
> /lib/firmware/bnx2x/
> 
> Config files attached
> 
> Ivaylo

Hi Ivaylo,

I don't see any much differences in kernel CONFIGs, Still I don't have any insight why modules from initrd may be in picture here with newer kernel.

For Debian initramfs-tools, there should be some method of adding/updating files in initramfs/initrd via some initramfs hooks just like dracut does.

https://unix.stackexchange.com/questions/92853/adding-a-file-to-etc-of-initramfs-in-debian-wheezy

https://stackoverflow.com/questions/54150332/generate-custom-initramfs-image-with-additional-configuration-files


Thanks,
Manish
Comment 15 Iv At 2022-02-22 07:10:27 UTC
(In reply to Manish Chopra from comment #14)
> (In reply to Iv At from comment #11)
> > (In reply to Manish Chopra from comment #8)
> > > (In reply to Iv At from comment #7)
> > > > (In reply to Manish Chopra from comment #5)
> > > > > (In reply to Iv At from comment #4)
> > > > > > (In reply to Manish Chopra from comment #2)
> > > > > > > Hello,
> > > > > > > 
> > > > > > > I see that driver is trying to load FW files (from
> > > > /lib/firmware/bnx2x/)
> > > > > in
> > > > > > > that kernel, looks like FW files are missing (probably they are
> > > present
> > > > > on
> > > > > > > the file system but missing from new kernel initrd image) which
> > > causes
> > > > > > > driver to fail.  
> > > > > > > 
> > > > > > > dracut --install-optional
> > > /usr/lib/firmware/bnx2x/bnx2x-e2-7.13.15.0.fw
> > > > > > > dracut --install-optional
> > > /usr/lib/firmware/bnx2x/bnx2x-e2-7.13.21.0.fw
> > > > > > > 
> > > > > > > Above commands might help in making FW files as a part of initrd.
> > > > > > > 
> > > > > > > Thanks,
> > > > > > > Manish
> > > > > > 
> > > > > > Thank you for your answer and suggestions Manish!
> > > > > > 
> > > > > > Files are present in /lib/firmware/bnx2x/ :
> > > > > > 
> > > > > > total 3876
> > > > > > -rw-r--r-- 1 root root 161368 Jul 26  2021 bnx2x-e1-7.0.29.0.fw
> > > > > > -rw-r--r-- 1 root root 164392 Jul 26  2021 bnx2x-e1-7.10.51.0.fw
> > > > > > -rw-r--r-- 1 root root 170192 Jul 26  2021 bnx2x-e1-7.12.30.0.fw
> > > > > > -rw-r--r-- 1 root root 170096 Jul 26  2021 bnx2x-e1-7.13.1.0.fw
> > > > > > -rw-r--r-- 1 root root 170168 Jul 26  2021 bnx2x-e1-7.13.15.0.fw
> > > > > > -rw-r--r-- 1 root root 163592 Jul 26  2021 bnx2x-e1-7.8.19.0.fw
> > > > > > -rw-r--r-- 1 root root 168680 Jul 26  2021 bnx2x-e1h-7.0.29.0.fw
> > > > > > -rw-r--r-- 1 root root 173016 Jul 26  2021 bnx2x-e1h-7.10.51.0.fw
> > > > > > -rw-r--r-- 1 root root 178984 Jul 26  2021 bnx2x-e1h-7.12.30.0.fw
> > > > > > -rw-r--r-- 1 root root 178992 Jul 26  2021 bnx2x-e1h-7.13.1.0.fw
> > > > > > -rw-r--r-- 1 root root 178608 Jul 26  2021 bnx2x-e1h-7.13.15.0.fw
> > > > > > -rw-r--r-- 1 root root 171920 Jul 26  2021 bnx2x-e1h-7.8.19.0.fw
> > > > > > -rw-r--r-- 1 root root 289848 Jul 26  2021 bnx2x-e2-7.0.29.0.fw
> > > > > > -rw-r--r-- 1 root root 321456 Jul 26  2021 bnx2x-e2-7.10.51.0.fw
> > > > > > -rw-r--r-- 1 root root 321320 Jul 26  2021 bnx2x-e2-7.12.30.0.fw
> > > > > > -rw-r--r-- 1 root root 320936 Jul 26  2021 bnx2x-e2-7.13.1.0.fw
> > > > > > -rw-r--r-- 1 root root 323360 Jul 26  2021 bnx2x-e2-7.13.15.0.fw
> > > > > > -rw-r--r-- 1 root root 310440 Jul 26  2021 bnx2x-e2-7.8.19.0.fw
> > > > > > 
> > > > > > 
> > > > > > I reinstalled the "firmware-bnx2x" and initframs was rebuild. 
> > > > > > And result is the same with 5.16. 5.15 - no problem.
> > > > > 
> > > > > Hi,
> > > > > 
> > > > > Did you use the suggested dracut commands above to install FW in
> initrd
> > ?
> > > > > Could you please send me the output from both the kernels for below -
> > > > > 
> > > > > lsinitrd | grep bnx2x
> > > > > 
> > > > > Thanks,
> > > > > Manish
> > > > 
> > > > 
> > > > Hi Manish, 
> > > > 
> > > > here the output:
> > > > 
> > > > 
> > > >  lsinitramfs -l /boot/initrd.img-5.16.0-1-amd64 | grep bnx2
> > > > -rw-r--r--   1 root     root       270483 Feb  9 10:35
> > > >
> > usr/lib/modules/5.16.0-1-amd64/kernel/drivers/net/ethernet/broadcom/bnx2.ko
> > > > drwxr-xr-x   2 root     root            0 Feb 21 21:08
> > > >
> usr/lib/modules/5.16.0-1-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x
> > > > -rw-r--r--   1 root     root      1739963 Feb  9 10:35
> > > >
> > usr/lib/modules/5.16.0-1-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x/
> > > > bnx2x.ko
> > > > drwxr-xr-x   2 root     root            0 Feb 21 21:08
> > > > usr/lib/modules/5.16.0-1-amd64/kernel/drivers/scsi/bnx2fc
> > > > -rw-r--r--   1 root     root       303675 Feb  9 10:35
> > > > usr/lib/modules/5.16.0-1-amd64/kernel/drivers/scsi/bnx2fc/bnx2fc.ko
> > > > drwxr-xr-x   2 root     root            0 Feb 21 21:08
> > > > usr/lib/modules/5.16.0-1-amd64/kernel/drivers/scsi/bnx2i
> > > > -rw-r--r--   1 root     root       164915 Feb  9 10:35
> > > > usr/lib/modules/5.16.0-1-amd64/kernel/drivers/scsi/bnx2i/bnx2i.ko
> > > > 
> > > >
> > >
> >
> -----------------------------------------------------------------------------
> > > > 
> > > >  lsinitramfs -l /boot/initrd.img-5.15.0-3-amd64 | grep bnx2
> > > > -rw-r--r--   1 root     root       195475 Jan 30 12:14
> > > >
> > usr/lib/modules/5.15.0-3-amd64/kernel/drivers/net/ethernet/broadcom/bnx2.ko
> > > > drwxr-xr-x   2 root     root            0 Feb 13 11:19
> > > >
> usr/lib/modules/5.15.0-3-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x
> > > > -rw-r--r--   1 root     root      1668323 Jan 30 12:14
> > > >
> > usr/lib/modules/5.15.0-3-amd64/kernel/drivers/net/ethernet/broadcom/bnx2x/
> > > > bnx2x.ko
> > > > drwxr-xr-x   2 root     root            0 Feb 13 11:19
> > > > usr/lib/modules/5.15.0-3-amd64/kernel/drivers/scsi/bnx2fc
> > > > -rw-r--r--   1 root     root       302003 Jan 30 12:14
> > > > usr/lib/modules/5.15.0-3-amd64/kernel/drivers/scsi/bnx2fc/bnx2fc.ko
> > > > drwxr-xr-x   2 root     root            0 Feb 13 11:19
> > > > usr/lib/modules/5.15.0-3-amd64/kernel/drivers/scsi/bnx2i
> > > > -rw-r--r--   1 root     root       165443 Jan 30 12:14
> > > > usr/lib/modules/5.15.0-3-amd64/kernel/drivers/scsi/bnx2i/bnx2i.ko
> > > 
> > > 
> > > Okay, I could see FW is not part of any of the kernel's initrd. Typically
> > if
> > > it's part of initrd - it will look like below -
> > > 
> > > # lsinitrd | grep bnx2x
> > > Arguments: --install-optional
> > > '/usr/lib/firmware/bnx2x/bnx2x-e2-7.13.15.0.fw' --force
> > > 
> > > I believe the driver in newer kernel trying to load the FW file from
> initrd
> > > (although not sure why it's not the case with older kernel - may be if
> you
> > > could supply ".config" files for both the kernels it may tell the config
> > > differences relevant to this). Please run the dracut command below to
> > > make/install the FW in initrd on newer kernel and again check "lsinitrd |
> > > grep bnx2x".
> > > 
> > > dracut --install-optional /usr/lib/firmware/bnx2x/bnx2x-e2-7.13.15.0.fw
> > > 
> > > Thanks,
> > > Manish
> > 
> > Hi again,
> > 
> > I'm using Debian and initramfs-tools not dracut . And the firmware is
> under:
> > /lib/firmware/bnx2x/
> > 
> > Config files attached
> > 
> > Ivaylo
> 
> Hi Ivaylo,
> 
> I don't see any much differences in kernel CONFIGs, Still I don't have any
> insight why modules from initrd may be in picture here with newer kernel.
> 
> For Debian initramfs-tools, there should be some method of adding/updating
> files in initramfs/initrd via some initramfs hooks just like dracut does.
> 
> https://unix.stackexchange.com/questions/92853/adding-a-file-to-etc-of-
> initramfs-in-debian-wheezy
> 
> https://stackoverflow.com/questions/54150332/generate-custom-initramfs-image-
> with-additional-configuration-files
> 
> 
> Thanks,
> Manish


Hi Manish,

Yes, you are right. 

But still I can figure out where is the problem with this kernel.
We have following workaround (still not tested by me):

$ cat /etc/initramfs-tools/hooks/fix-missing-firmware
  #!/bin/sh

  PREREQ=""
  prereqs()
  {
      echo "$PREREQ"
  }
  case $1 in
  # get pre-requisites
  prereqs)
      prereqs
      exit 0
      ;;
  esac

  . /usr/share/initramfs-tools/hook-functions

  for file in /lib/firmware/bnx2x/*; do
      if test -e $file; then
          copy_exec $file
      fi
  done


I found this here:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=857054

Thanks,
Ivaylo
Comment 16 Manish Chopra 2022-02-22 09:56:28 UTC
Created attachment 300502 [details]
fix firmware load from initrd

Hi,

It seems like it could be driver bug which is not adding FW to new kernel initrd.
I have attached a driver patch, can you please apply it on 5.16 problematic kernel and see if it helps resolving the issue ?

Thanks,
Manish
Comment 17 Iv At 2022-02-22 10:17:22 UTC
Hi Manish,

Thank you.

I will test tomorrow and will give you a feedback.

Cheers,
Ivaylo
Comment 18 Iv At 2022-02-23 06:51:23 UTC
Hi again Manish


Seems to be the module declares dependency only on version 21 of the firmware, and these files(v21) are missing in the firmware-bnx2x. When I check in /lib/firmware/bnx2x there are no *21.0.fw(you can see this in earlier post). 
V15 are not declared in the module, so it will be not included in the initrd by initramfs-tools.

When I update initframs looks like:

~#update-initramfs -u -k all

update-initramfs: Generating /boot/initrd.img-5.16.0-1-amd64
W: Possible missing firmware /lib/firmware/bnx2x/bnx2x-e2-7.13.21.0.fw for module bnx2x
W: Possible missing firmware /lib/firmware/bnx2x/bnx2x-e1h-7.13.21.0.fw for module bnx2x
W: Possible missing firmware /lib/firmware/bnx2x/bnx2x-e1-7.13.21.0.fw for module bnx2x
update-initramfs: Generating /boot/initrd.img-5.15.0-3-amd64
~#



I accept your solution with patch, however easiest way for me was to download the bnx2x-e2-7.13.21.0.fw and update the initramfs.

Here is the download link for bnx2x firmware containing version 21 :

https://anduin.linuxfromscratch.org/sources/linux-firmware/bnx2x/


And now you can see that the firmware is loading :

dmesg | grep bnx2

[    1.534145] bnx2x 0000:bd:00.0: msix capability found
[    1.534463] bnx2x 0000:bd:00.0: part number 0-0-0-0
[    1.568934] bnx2x 0000:bd:00.0: firmware: direct-loading firmware bnx2x/bnx2x-e2-7.13.21.0.fw
[    1.709799] bnx2x 0000:bd:00.0: 32.000 Gb/s available PCIe bandwidth (5.0 GT/s PCIe x8 link)
[    1.709948] bnx2x 0000:bd:00.1: msix capability found
[    1.710306] bnx2x 0000:bd:00.1: part number 0-0-0-0
[    1.866286] bnx2x 0000:bd:00.1: 32.000 Gb/s available PCIe bandwidth (5.0 GT/s PCIe x8 link)
[    1.868330] bnx2x 0000:bd:00.1 enp189s0f1: renamed from eth1
[    1.892454] bnx2x 0000:bd:00.0 enp189s0f0: renamed from eth0
[   10.399825] bnx2x 0000:bd:00.0 enp189s0f0: using MSI-X  IRQs: sp 61  fp[0] 63 ... fp[7] 70
[   11.233330] bnx2x 0000:bd:00.1 enp189s0f1: using MSI-X  IRQs: sp 72  fp[0] 74 ... fp[7] 81
[   11.539940] bnx2x 0000:bd:00.1 enp189s0f1: NIC Link is Up, 10000 Mbps full duplex, Flow control: ON - receive & transmit
[  137.867842] bnx2x 0000:bd:00.1 enp189s0f1: using MSI-X  IRQs: sp 72  fp[0] 74 ... fp[7] 81
[  138.059183] bnx2x 0000:bd:00.1 enp189s0f1: NIC Link is Up, 10000 Mbps full duplex, Flow control: ON - receive & transmit

Thank you,
Ivaylo
Comment 19 Manish Chopra 2022-02-23 10:34:41 UTC
Hello Ivaylo,

That's great. Thanks for the update.
I have posted the patch upstream as well.

https://patchwork.kernel.org/project/netdevbpf/patch/20220223085720.12021-1-manishc@marvell.com/

Thanks
Manish
Comment 20 Iv At 2022-02-26 10:49:11 UTC
Thank you Manish!