Bug 217245

Summary: mt7921e tries to load unnecessary firmware
Product: Drivers Reporter: kitestramuort
Component: network-wirelessAssignee: drivers_network-wireless (drivers_network-wireless)
Status: NEW ---    
Severity: low CC: lorenzo.bianconi83, regressions
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 6.2 Subsystem:
Regression: Yes Bisected commit-id:

Description kitestramuort 2023-03-24 21:53:01 UTC
I compile mt7921e statically into the kernel, along with the firmware binaries needed for my MT7922 chip: WIFI_MT7922_patch_mcu_1_1_hdr.bin, WIFI_MT7922_patch_mcu_1_1_hdr.bin and BT_RAM_CODE_MT7922_1_1_hdr.bin

Since 6.2, mt7921e also tries to load WIFI_RAM_CODE_MT7961_1.bin and fails with

mt7921e 0000:02:00.0: Direct firmware load for mediatek/WIFI_RAM_CODE_MT7961_1.bin failed with error -2

The card seems to work normally without that binary, so I guess it is not needed and it shouldn't be requested. The error doesn't happen with the 6.1 kernel
Comment 1 Artem S. Tashkinov 2023-03-25 18:15:14 UTC
Please find the maintainer of this driver and send them an email.

You can check kernel git log to find the relevant people.

It would even be greater if you could git bisect https://docs.kernel.org/admin-guide/bug-bisect.html
Comment 2 The Linux kernel's regression tracker (Thorsten Leemhuis) 2023-03-26 05:37:18 UTC
Forwarded the report to the maintainers of the driver:

https://lore.kernel.org/regressions/dbb0d402-ac95-6355-03aa-42c2671727d7@leemhuis.info/
Comment 3 Lorenzo Bianconi 2023-03-28 08:56:38 UTC
(In reply to kitestramuort from comment #0)
> I compile mt7921e statically into the kernel, along with the firmware
> binaries needed for my MT7922 chip: WIFI_MT7922_patch_mcu_1_1_hdr.bin,
> WIFI_MT7922_patch_mcu_1_1_hdr.bin and BT_RAM_CODE_MT7922_1_1_hdr.bin
> 
> Since 6.2, mt7921e also tries to load WIFI_RAM_CODE_MT7961_1.bin and fails
> with
> 
> mt7921e 0000:02:00.0: Direct firmware load for
> mediatek/WIFI_RAM_CODE_MT7961_1.bin failed with error -2
> 
> The card seems to work normally without that binary, so I guess it is not
> needed and it shouldn't be requested. The error doesn't happen with the 6.1
> kernel

What is the pci id of your card? I think this message is from the offload capability check.
Comment 4 kitestramuort 2023-03-28 09:56:23 UTC
(In reply to Lorenzo Bianconi from comment #3)
> (In reply to kitestramuort from comment #0)
> > I compile mt7921e statically into the kernel, along with the firmware
> > binaries needed for my MT7922 chip: WIFI_MT7922_patch_mcu_1_1_hdr.bin,
> > WIFI_MT7922_patch_mcu_1_1_hdr.bin and BT_RAM_CODE_MT7922_1_1_hdr.bin
> > 
> > Since 6.2, mt7921e also tries to load WIFI_RAM_CODE_MT7961_1.bin and fails
> > with
> > 
> > mt7921e 0000:02:00.0: Direct firmware load for
> > mediatek/WIFI_RAM_CODE_MT7961_1.bin failed with error -2
> > 
> > The card seems to work normally without that binary, so I guess it is not
> > needed and it shouldn't be requested. The error doesn't happen with the 6.1
> > kernel
> 
> What is the pci id of your card? I think this message is from the offload
> capability check.

Hi, 
Vendor is 14c3
device is 0616
(subsystem_device shows 0xc616)
Comment 5 Lorenzo Bianconi 2023-03-28 10:07:10 UTC
(In reply to kitestramuort from comment #4)
> (In reply to Lorenzo Bianconi from comment #3)
> > (In reply to kitestramuort from comment #0)
> > > I compile mt7921e statically into the kernel, along with the firmware
> > > binaries needed for my MT7922 chip: WIFI_MT7922_patch_mcu_1_1_hdr.bin,
> > > WIFI_MT7922_patch_mcu_1_1_hdr.bin and BT_RAM_CODE_MT7922_1_1_hdr.bin
> > > 
> > > Since 6.2, mt7921e also tries to load WIFI_RAM_CODE_MT7961_1.bin and
> fails
> > > with
> > > 
> > > mt7921e 0000:02:00.0: Direct firmware load for
> > > mediatek/WIFI_RAM_CODE_MT7961_1.bin failed with error -2
> > > 
> > > The card seems to work normally without that binary, so I guess it is not
> > > needed and it shouldn't be requested. The error doesn't happen with the
> 6.1
> > > kernel
> > 
> > What is the pci id of your card? I think this message is from the offload
> > capability check.
> 
> Hi, 
> Vendor is 14c3
> device is 0616
> (subsystem_device shows 0xc616)

Can you please try this patch? https://patchwork.kernel.org/project/linux-wireless/patch/632d8f0c9781c9902d7160e2c080aa7e9232d50d.1679997487.git.lorenzo@kernel.org/
Comment 6 kitestramuort 2023-03-28 11:38:46 UTC
(In reply to Lorenzo Bianconi from comment #5)
> (In reply to kitestramuort from comment #4)
> > (In reply to Lorenzo Bianconi from comment #3)
> > > (In reply to kitestramuort from comment #0)
> > > > I compile mt7921e statically into the kernel, along with the firmware
> > > > binaries needed for my MT7922 chip: WIFI_MT7922_patch_mcu_1_1_hdr.bin,
> > > > WIFI_MT7922_patch_mcu_1_1_hdr.bin and BT_RAM_CODE_MT7922_1_1_hdr.bin
> > > > 
> > > > Since 6.2, mt7921e also tries to load WIFI_RAM_CODE_MT7961_1.bin and
> > fails
> > > > with
> > > > 
> > > > mt7921e 0000:02:00.0: Direct firmware load for
> > > > mediatek/WIFI_RAM_CODE_MT7961_1.bin failed with error -2
> > > > 
> > > > The card seems to work normally without that binary, so I guess it is
> not
> > > > needed and it shouldn't be requested. The error doesn't happen with the
> > 6.1
> > > > kernel
> > > 
> > > What is the pci id of your card? I think this message is from the offload
> > > capability check.
> > 
> > Hi, 
> > Vendor is 14c3
> > device is 0616
> > (subsystem_device shows 0xc616)
> 
> Can you please try this patch?
> https://patchwork.kernel.org/project/linux-wireless/patch/
> 632d8f0c9781c9902d7160e2c080aa7e9232d50d.1679997487.git.lorenzo@kernel.org/

That fixes it, the message is gone. Thank you